From patchwork Sun Feb 11 05:28:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Randy Dunlap X-Patchwork-Id: 199394 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:50ea:b0:106:860b:bbdd with SMTP id r10csp1839564dyd; Sun, 11 Feb 2024 01:06:44 -0800 (PST) X-Google-Smtp-Source: AGHT+IHa+hwukqv+jUAS8GcUnxuHvvu414Tp4/gM0BVcIZwsaeo5X5Q+88Ce9ABjHSjqG8jnDs9Q X-Received: by 2002:a17:906:f18e:b0:a3c:5d90:5332 with SMTP id gs14-20020a170906f18e00b00a3c5d905332mr1169532ejb.32.1707642404381; Sun, 11 Feb 2024 01:06:44 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707642404; cv=pass; d=google.com; s=arc-20160816; b=mvNPKYThJOCi5SqTCecoRR1Xmjfz9i6jkRSHE+tNyPyfJQ4umpi+UUkYCLBG8HOS3t oMhsmp78muRTkiDs+I9ZKPVJG/0bU7csQLe4RKDEm6QTTY4WMWqk0MV7kPDxxFcjzoEo 2FD4zHRA1yBd/ItF/P2uY+Dk3/Ao1CuVtWheBc+Vc5BDWj+ih1zV1qqc6vVxy3Mo2h70 4gD6ehtESo9mGBjAkh8Ngh4PITjM0zx0e0xscscp1rZRG8ueP3wYfeiuGn7GC9nZy94w +RBNlv6MOu43sbxKemRrA2D91g4AaDfEO3SsOCxXwCoLF0YrG1SWGkVszFQOHbQ+XA+U IkVA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=P+G/gr3dpwkYnrJHOwZ1xhtBo+38a0UA9vbSN3e/DkQ=; fh=QSPQQAPmb6Ou7CaTJJF1sAPiYc5KX88Q5Jqm7nnmgx0=; b=lq2XRVcnCZdQY2lgWWkxVbxqSJ75yCsWygSsNG8UfY/sXMLGmE3FQlU5DeN90PDcZH 9mqhHmNn+9puee5aHQBpTfr9nbZSGo/D153SimDrD5OYP89Km3V0jU65vwU6QFbw2CEo 92FAcCu6qJg6oTmU6HxmWuF8hoq4QzXoc2JElKG4ghKMFXJI1PRl0gRFrQOMBTldipmC 6Ge4RZczLAtJL/SPEhYxa1SDLivAY4f48yN84VdnEqPdswzCOFc5m34kYmfxq4kovrAG jJ7PuhXljw9bRxiW5K5eOSxNTxMKisFxC4r+owF0UBXdLVfUcicpMyptL7yapJIA6Iiw hx+A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=bT35LFlh; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-kernel+bounces-60638-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-60638-ouuuleilei=gmail.com@vger.kernel.org" X-Forwarded-Encrypted: i=2; AJvYcCXKvhWvT6N4OfGCjmr1Qj69cv+3eVapph8GZKMO90X/kkbzQ5EJZjMDVteH52++LyVik9bKj8gGWVwX+oOLfGWxx5ILkQ== Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id v8-20020a1709063bc800b00a37329acb9esi2681979ejf.18.2024.02.11.01.06.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 11 Feb 2024 01:06:44 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-60638-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=bT35LFlh; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-kernel+bounces-60638-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-60638-ouuuleilei=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id EA32B1F24083 for ; Sun, 11 Feb 2024 05:28:32 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6AE0717550; Sun, 11 Feb 2024 05:28:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="bT35LFlh" Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C126D179; Sun, 11 Feb 2024 05:28:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.137.202.133 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707629289; cv=none; b=VsVCr4mZzS5gY6YdYE1ncVJ1j/1yfArd+04mpVzw+O7AhFQoy8pO8+FzUDDoozqhL60/DH35wZKT+d8K/KjrROIbjBMQPtJmj3GdB1C/SAgg636YresZPMNwBSGEl0r95NUPT+V8JAtUd475ZkVeIzqq31omkgN7a+ZPPyShiqc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707629289; c=relaxed/simple; bh=i0Nhzbsc3qnry4feuPLAhZuqnBIdJRfPzmCcqKOp+K8=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=UcoqFovlEYY6SRx2FZNDiNZfYs96xXgXDN7XryExEoMSiD7hODOq5o433ERroy2z1jddej9dnvRXQmv+NvxWcWrpuCBbmJzhAMpW7iQtAI3z3T39RhkFXybd1jKg26ZHl2wrC8/qu88nXtFha4RCU7WaKyhKxWSjCkhb6OafeO4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org; spf=none smtp.mailfrom=infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=bT35LFlh; arc=none smtp.client-ip=198.137.202.133 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=infradead.org 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=P+G/gr3dpwkYnrJHOwZ1xhtBo+38a0UA9vbSN3e/DkQ=; b=bT35LFlhKw4oOkmhZqKE1Yyaz3 rk4C7RY2dPjW6o0LN3MjTGVcreO3WHsGhmQ1mLuFiNCogrOUW6EzKWaSLH+QJbnf4DNpa3XTGpGVf GkKfIL1XQgvPAolcfInud0leHUedJLVp6ukAxHbMnsDLJwmLLztfcxMqrQchBOhM0aGDf7zzOTWNL 3/ol72nJnoyDJL/CPyTRDfdW267zi7BT+iX4zqhy98zE+AXVpsOSx7q+tO8uyQaMfx7H7FaDDRdi1 IA7z8QFA+b4hbNSj50R/DhNwJ0cnXVj3/cJxCo2gKKxlDBtkQ4ngSBeMcKFTBTVCpljTJFn9J4RCD cpopOUog==; Received: from [50.53.50.0] (helo=bombadil.infradead.org) by bombadil.infradead.org with esmtpsa (Exim 4.97.1 #2 (Red Hat Linux)) id 1rZ2Nn-00000002Mxq-2f5q; Sun, 11 Feb 2024 05:28:04 +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 , Andreas Larsson Subject: [PATCH v5] sparc64: NMI watchdog: fix return value of __setup handler Date: Sat, 10 Feb 2024 21:28:02 -0800 Message-ID: <20240211052802.22612-1-rdunlap@infradead.org> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790592841956735757 X-GMAIL-MSGID: 1790592841956735757 __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 Cc: Andreas Larsson --- v2: change From: Igor to Reported-by: add more Cc's v3: use Igor's current email address v4: add Arnd to Cc: list v5: add Andreas 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);