From patchwork Mon Jul 3 23:02:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Randy Dunlap X-Patchwork-Id: 115511 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f45:0:b0:3ea:f831:8777 with SMTP id v5csp847789vqx; Mon, 3 Jul 2023 16:20:46 -0700 (PDT) X-Google-Smtp-Source: APBJJlFouNa0RrpGtYBgLFdufH8d9FUSDx8OwV4SmV/QInI8WLlc+dXXmcuiD9UpiZC0SScW6QEN X-Received: by 2002:a17:902:c9c5:b0:1b8:50a9:6874 with SMTP id q5-20020a170902c9c500b001b850a96874mr11512973pld.5.1688426446063; Mon, 03 Jul 2023 16:20:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688426446; cv=none; d=google.com; s=arc-20160816; b=kYioMF8zqaNdXCkUV62rH+mdNG60tnanl7aAE0yfzMNImNG6RZSSVJv2MHKRxKP+bp zJiUJrGySkPYqNZM/aKBtXfDJrXDtN1DIwUkSr8xjVsWCKi2ysAWe2tTnyXJ2GaNvzZ8 HY+9Sk8GVkuQGeTHH9rZEH/Yf8sH6zP2eO6Q3ehNH7YBYRVnGldhwdBwMNiDHABPYtCc +3mAqtlJUMXZHp6Yxj98mZIX/NVD0WaszoPBw/WEsg3ko7STHHcng5kbbVF6Ng8mHlye FFiAntvFDu+schRnrLPX1zs3zEj4OCxYfLUpI6qCnGYv7sTVQp5Nv+UmSyhSmieeIKmA ReTw== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=1rtcPybyM5MqfBvMrkvocPzhfGVv/+DMp2tXnRIeTf4=; fh=hZmkBRafAFHjp1Yjz5Zpc+/NJzJdpx5IIAQ+BSOKs/o=; b=PiNBLb1Gl/KFrzN8HFtsI8RpQU6jPGfW6puEQ3BDtK6mtTF33cQDt8FxUpQhY7G8NY +u+Iz1DcFeKm+1MDGH8vYxRxz4xneosL5ugHtpNAon2Tk/Vyau/T+gRKjNdsb34yreB/ ogVO/zsv+3JP0vdbAb+iih8i8WK3zyAqPLlQ1B9tMUr4V3MIHkyw9e45NCsGaqI9ZhxF 4zQlci6VWsao2LXhKqjzvLEanO8phoSFQmgVJzt/oL4NKGoiyGYrN8k5RWbGg+d/XBu9 bHlR/TTQpQwqn3teYtT2tYPjWoEMVjtyba2klT50AdF//2yjS5XKc4jQSAdUWHYu7exB qd4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=PXfaaU+B; 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 s2-20020a170902ea0200b001b89cda5e12si2556218plg.546.2023.07.03.16.20.29; Mon, 03 Jul 2023 16:20:46 -0700 (PDT) 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=PXfaaU+B; 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 S230379AbjGCXCK (ORCPT + 99 others); Mon, 3 Jul 2023 19:02:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43946 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230384AbjGCXCE (ORCPT ); Mon, 3 Jul 2023 19:02:04 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0166CE6D; Mon, 3 Jul 2023 16:02:03 -0700 (PDT) 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:Message-ID:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type: Content-ID:Content-Description:In-Reply-To:References; bh=1rtcPybyM5MqfBvMrkvocPzhfGVv/+DMp2tXnRIeTf4=; b=PXfaaU+BYNjGFWCf5aiibLVahl cFEfwzIQHmgIKhrvoGbTVY9biuglzEl8sLI3BpJoxV23m6YtVh0qFWQSTxie/NydYgiwmlg/+yfLp ns1ghEntAfD9STYmkivXNJsTRKtTyl7YzyDwvavQGhcxNZZwIOln1Nt4HY3Yu+dIaeUp3uIcc2bsR VqDqs735F4L2BuZacw+rQIvJZl5Q8qBOxytmImIU0jj3Uowh6J9JEP76yDEJpXHlr8rYU0FojiQp+ oxDDuaTLeW6fvqc7Z0ZzHSpGdni2wrUG9MSSyP0H0ZkBsyOKMre8n/E5pdbMJzVD9cK0EInjIEdKt HQebaVBg==; Received: from [2601:1c2:980:9ec0::2764] (helo=bombadil.infradead.org) by bombadil.infradead.org with esmtpsa (Exim 4.96 #2 (Red Hat Linux)) id 1qGSYV-00Bbd5-2b; Mon, 03 Jul 2023 23:02:03 +0000 From: Randy Dunlap To: linux-kernel@vger.kernel.org Cc: Randy Dunlap , Igor Zhbanov , "David S. Miller" , sparclinux@vger.kernel.org, Sam Ravnborg , Andrew Morton , stable@vger.kernel.org, Arnd Bergmann Subject: [PATCH v4 RESEND] sparc64: NMI watchdog: fix return value of __setup handler Date: Mon, 3 Jul 2023 16:02:02 -0700 Message-ID: <20230703230202.19844-1-rdunlap@infradead.org> X-Mailer: git-send-email 2.41.0 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,T_SCC_BODY_TEXT_LINE 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?1770443449242747607?= X-GMAIL-MSGID: =?utf-8?q?1770443449242747607?= __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 setup_nmi_watchdog(). Fixes: e5553a6d0442 ("sparc64: Implement NMI watchdog on capable cpus.") Signed-off-by: Randy Dunlap Reported-by: Igor Zhbanov Link: lore.kernel.org/r/64644a2f-4a20-bab3-1e15-3b2cdd0defe3@omprussia.ru Cc: "David S. Miller" Cc: sparclinux@vger.kernel.org Cc: Sam Ravnborg Cc: Andrew Morton Cc: stable@vger.kernel.org Cc: Arnd Bergmann --- v2: change From: Igor to Reported-by: add more Cc's v3: use Igor's current email address v4: add Arnd to Cc: list arch/sparc/kernel/nmi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff -- a/arch/sparc/kernel/nmi.c b/arch/sparc/kernel/nmi.c --- a/arch/sparc/kernel/nmi.c +++ b/arch/sparc/kernel/nmi.c @@ -279,7 +279,7 @@ static int __init setup_nmi_watchdog(cha if (!strncmp(str, "panic", 5)) panic_on_timeout = 1; - return 0; + return 1; } __setup("nmi_watchdog=", setup_nmi_watchdog);