From patchwork Mon Mar 6 04:00:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Randy Dunlap X-Patchwork-Id: 64424 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp1647658wrd; Sun, 5 Mar 2023 20:03:50 -0800 (PST) X-Google-Smtp-Source: AK7set9dwo4VGn89yopWuupRd4cgmJ4R76Wv8RRWaibYzS17i+bE6vnWNbWgewZZwPF6WmOpgbu6 X-Received: by 2002:a17:903:120b:b0:19e:82aa:dc8a with SMTP id l11-20020a170903120b00b0019e82aadc8amr12425134plh.22.1678075429926; Sun, 05 Mar 2023 20:03:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1678075429; cv=none; d=google.com; s=arc-20160816; b=yY40hMsXOADzAnS7h5JGiqvoy1KH0spT8fx9jufe4srnACtzn3w9YNv79j9DnlWFEB iwcKKpimlNy646nZVw0YRbeNavr2a594BbyTfoi+w8m+qMNm8kjejcFha9j5SY9NaNgT qm+8FP6RhWjGO4B83i8S3HHKvPIwoed9xJ7o+75oTZOIit4g7EBLDeW3MqPUE78MEL6p Ea7q70C7XWr1h9ML9JQQBfawjrjY4fX2NlVizrQt2PvWuDvnSOiYsf59njg4odOIW3EC beoJSETisCZKdsrFKsrzvLGdY9u96vcyHD5ONIpBRGtHbkIOXAz0RtO5yyiSBWo9HS8T Nftw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=q4i2L9mFgoWjrsHlBXky+D6dbfsBgFxhqp15flWkw9k=; b=T3lKM2D7EPv6L42v3OC2U7oL16WPuJ9g/cEdozStYtyyHK0I0Kpk+L3WFz+WHvnNKe an3M0ZloZkvTAInFemm5oa1ud3FQUazPZRqAY/ux18f34B4I6k4NH0xwPYdyKbctb717 5OuGv3Ts/t6P1qxWTsLFsTKUATzAR0Ni4CwHAuUKi8FJu1Op73NMU7WsDWJS72GWZsSY KtOvdLZm/JzxLDFD+J87P766uiyU6cXzZazTqVV0sATwR7I9AqsKLxVpZCdD8TkLorL/ h9Iny2IoQbWliAl80JogsAfvylgvA6ZVNFedResZXqme0YOsUB/XVCxQUCDzupsltTuF rSsg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=2Fzol0Pc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f7-20020a17090274c700b0019ac69e7385si8001278plt.123.2023.03.05.20.03.37; Sun, 05 Mar 2023 20:03:49 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=2Fzol0Pc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229717AbjCFEAo (ORCPT + 99 others); Sun, 5 Mar 2023 23:00:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34284 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229457AbjCFEAm (ORCPT ); Sun, 5 Mar 2023 23:00:42 -0500 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2325AF74B; Sun, 5 Mar 2023 20:00:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=q4i2L9mFgoWjrsHlBXky+D6dbfsBgFxhqp15flWkw9k=; b=2Fzol0PcE0ZfGAK4Yenf3qfW1z zwKzKQ8wu4rEHZme/FrfCmoqKeW4wUil7Fj8RApgHgpJLePU+ThWlt03qdxhURSc20gxd+xqt8Hx3 f9GW2U76lHsp8McuSzwMfu/ehyP1f6TuFRBXyQcjgWHzsk5vx8SOd7uXIOcNUGDhnDw7LIIb3yPqO ZJvoLp06YlqmwKlzSweL9C5CU0tXH9MXAE6FLl1y/Z1wdPBXk7zMih+VKWjZsJS5soEkEvIbtYki1 42imzvQdXwiDJrHUlkgJgabfcDO4jzA3GTMAyS28aUnZspWNoDA7sYxk1kGNJVT86YC7qrwtDZViB F1zPvhDw==; Received: from [2601:1c2:980:9ec0::df2f] (helo=bombadil.infradead.org) by bombadil.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1pZ21g-00B9yD-GM; Mon, 06 Mar 2023 04:00:40 +0000 From: Randy Dunlap To: linux-kernel@vger.kernel.org Cc: Randy Dunlap , Igor Zhbanov , John Paul Adrian Glaubitz , Yoshinori Sato , Rich Felker , linux-sh@vger.kernel.org, stable@vger.kernel.org Subject: [PATCH 2/7 v4] sh: nmi_debug: fix return value of __setup handler Date: Sun, 5 Mar 2023 20:00:32 -0800 Message-Id: <20230306040037.20350-3-rdunlap@infradead.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230306040037.20350-1-rdunlap@infradead.org> References: <20230306040037.20350-1-rdunlap@infradead.org> MIME-Version: 1.0 X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1759589622506485896?= X-GMAIL-MSGID: =?utf-8?q?1759589622506485896?= __setup() handlers should return 1 to obsolete_checksetup() in init/main.c to indicate that the boot option has been handled. A return of 0 causes the boot option/value to be listed as an Unknown kernel parameter and added to init's (limited) argument or environment strings. Also, error return codes don't mean anything to obsolete_checksetup() -- only non-zero (usually 1) or zero. So return 1 from nmi_debug_setup(). Fixes: 1e1030dccb10 ("sh: nmi_debug support.") Signed-off-by: Randy Dunlap Reported-by: Igor Zhbanov Link: lore.kernel.org/r/64644a2f-4a20-bab3-1e15-3b2cdd0defe3@omprussia.ru Cc: John Paul Adrian Glaubitz Cc: Yoshinori Sato Cc: Rich Felker Cc: linux-sh@vger.kernel.org Cc: stable@vger.kernel.org Reviewed-by: John Paul Adrian Glaubitz --- v2: add more Cc's; refresh and resend; v3: add Arnd to Cc: list v4: update Cc: list, refresh & resend arch/sh/kernel/nmi_debug.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff -- a/arch/sh/kernel/nmi_debug.c b/arch/sh/kernel/nmi_debug.c --- a/arch/sh/kernel/nmi_debug.c +++ b/arch/sh/kernel/nmi_debug.c @@ -49,7 +49,7 @@ static int __init nmi_debug_setup(char * register_die_notifier(&nmi_debug_nb); if (*str != '=') - return 0; + return 1; for (p = str + 1; *p; p = sep + 1) { sep = strchr(p, ','); @@ -70,6 +70,6 @@ static int __init nmi_debug_setup(char * break; } - return 0; + return 1; } __setup("nmi_debug", nmi_debug_setup);