From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail.mainlining.org (mail.mainlining.org [5.75.144.95]) (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 D0E2D495AC5; Wed, 16 Sep 2026 18:30:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=5.75.144.95 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789583425; cv=none; b=hqxGjdYDHw9XSSDECaSwLbVc+R4rrboc3j1wKaSnQRb/jkClXPiybAjsMPsqypdpvsRD1ivx/Tx4DhWMtG2SG5Nz24PadoB5US/cGMepTWF781gM5ghLoRwigKxhIwF4i4zEzaxUPNLQpRf76PIjprRqfyV1jK80gxK1QGuI+ss= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789583425; c=relaxed/simple; bh=zKxViaEOvaJzgG6/gJIg519i1+dW6Lo821cxpbNjvLA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=X+sG8QZJhCk9l3ZdyGUs5kY/nQlfrRxFH02TRmtVclT79wXZyAWreOpxj+TaXooOeCewxEKlB0bTkFvVOHZ6P24ltG8XuLLwvDpwWe8GkRDHbSOF+fIcG5HAQjcBI/fm8VGaAN9NGB3Vdc6QGtMzj3a8qi1iz+nKj/P45ytZDqQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=mainlining.org; spf=pass smtp.helo=mail.mainlining.org; arc=none smtp.client-ip=5.75.144.95 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=mainlining.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.helo=mail.mainlining.org From: Bradley Morgan To: Andrew Morton Cc: Petr Mladek , Jinchao Wang , Craig Lamparter , Wim Van Sebroeck , Guenter Roeck , linux-watchdog@vger.kernel.org, linux-kernel@vger.kernel.org, Bradley Morgan Subject: [PATCH v7 2/6] panic: flatten nmi_panic control flow Date: Wed, 16 Sep 2026 18:29:53 +0000 Message-ID: <20260916182957.7788-3-brads@mainlining.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260916182957.7788-1-brads@mainlining.org> References: <20260916182957.7788-1-brads@mainlining.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit panic() is __noreturn, so the else after panic_try_start() is dead. Drop it so the force_cpu path can be added cleanly on top. Reviewed-by: Petr Mladek Signed-off-by: Bradley Morgan --- kernel/panic.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kernel/panic.c b/kernel/panic.c index 08072bfae422..5646d4fb82b7 100644 --- a/kernel/panic.c +++ b/kernel/panic.c @@ -517,7 +517,8 @@ void nmi_panic(struct pt_regs *regs, const char *msg) { if (panic_try_start()) panic("%s", msg); - else if (panic_on_other_cpu()) + + if (panic_on_other_cpu()) nmi_panic_self_stop(regs); } EXPORT_SYMBOL(nmi_panic); -- 2.47.3