From nobody Sun Feb 8 11:16:32 2026 Received: from esa3.hc555-34.eu.iphmx.com (esa3.hc555-34.eu.iphmx.com [207.54.77.50]) (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 54A1D336EC9 for ; Mon, 26 Jan 2026 12:26:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=207.54.77.50 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769430391; cv=none; b=MxVH7es1y25NlEdjygPdbqNvtp1NEfFGi6thJpD4WjnX0r0x8RAsBSrZEmdijAAtRL40D0oEa4NT+O6CyiK34sd+DcTCWecvp3Cn2sMVodm3ZhX4XlBFjSHxDq6jN20oJcbSfZtu8Cju4d6ZBWWpUTpqDizoIAGRogkr2AsQwW8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769430391; c=relaxed/simple; bh=Ie6Kuj0FgVeXHurobAYMKY08O3j/piF3nJjoxXJQD2k=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=o8k4zjJrIm//A79DdKMVNFTJs/pcQACPp2WtG3AqIynUsWdD3eaeHkTdS1DCXsPNLrXG5hbD6U9gnbobLDiKmUTTUU8AxGpa86bC9pM5yC3WYAEuJ+2a8PJLLqObBlrv69ljV7G5zKVZJZVgzQvMjlMMf9X2uEQ7nThYlSaibVs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=mobileye.com; spf=pass smtp.mailfrom=mobileye.com; dkim=fail (0-bit key) header.d=mobileye.com header.i=@mobileye.com header.b=fJZdFZOe reason="key not found in DNS"; arc=none smtp.client-ip=207.54.77.50 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=mobileye.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=mobileye.com Authentication-Results: smtp.subspace.kernel.org; dkim=fail reason="key not found in DNS" (0-bit key) header.d=mobileye.com header.i=@mobileye.com header.b="fJZdFZOe" DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=mobileye.com; i=@mobileye.com; q=dns/txt; s=MoEyIP; t=1769430388; x=1800966388; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Ie6Kuj0FgVeXHurobAYMKY08O3j/piF3nJjoxXJQD2k=; b=fJZdFZOe75gIbUE5ZsS3r+/VQNL+KA/yu9lyGKXm5sAuHUWxljVcmXIu zb6Py6TI9ycPZbzM6hvDAcn1O1qniymGdzp3Xm7/lZbdlxUsJkYo7fFZ/ H++rnobTaHpgLbUbx0qVlTWDbeThDzpfFHLOKsiO3LEJwmpt2HAwRwIcD Y3+0ID20bfTz1X1iV5LB+pZL9BsvL5LPYEd5vc7wfr1iG3rZzvB8DITWi lQWBEFm4kn8hunJA9yzSf0C0r5/9htD+QmJWHJcJ0k/pnfUiNjoAlBWbo UvVDNE26jwZ07SvtOpciIaJHF70nY80VsRFErFhvAqBl7OKjHFCcwOhCr Q==; X-CSE-ConnectionGUID: OIoK17ewTS+ogTHmthk5lA== X-CSE-MsgGUID: 81LaGiyeTWeKAdfgcsUJxg== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from unknown (HELO ces04_data.me-crop.lan) ([146.255.191.134]) by esa3.hc555-34.eu.iphmx.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Jan 2026 14:26:21 +0200 X-CSE-ConnectionGUID: SQeHZ1ynRLmVlDMjYddU/g== X-CSE-MsgGUID: hV5/DMetTdOD0RrcB4OUag== Received: from unknown (HELO epgd034.me-corp.lan) ([10.154.54.2]) by ces04_data.me-crop.lan with SMTP; 26 Jan 2026 14:28:20 +0200 Received: by epgd034.me-corp.lan (sSMTP sendmail emulation); Mon, 26 Jan 2026 14:26:19 +0200 From: Pnina Feder To: pnina.feder@mobileye.com Cc: akpm@linux-foundation.org, bhe@redhat.com, linux-kernel@vger.kernel.org, lkp@intel.com, mgorman@suse.de, mingo@redhat.com, peterz@infradead.org, pmladek@suse.com, rostedt@goodmis.org, senozhatsky@chromium.org, tglx@linutronix.de, vkondra@mobileye.com Subject: [PATCH] panic: fix unused variable warning when SMP or CRASH_DUMP disabled Date: Mon, 26 Jan 2026 14:26:18 +0200 Message-ID: <20260126122618.2967950-1-pnina.feder@mobileye.com> In-Reply-To: <20260122102457.1154599-1-pnina.feder@mobileye.com> References: <20260122102457.1154599-1-pnina.feder@mobileye.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Fix for pending patch: "panic: add panic_force_cpu=3D parameter to redirect panic to a specific CP= U" Move panic_force_buf inside the #ifdef block to fix unused variable warning when CONFIG_SMP or CONFIG_CRASH_DUMP is not enabled. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202601222042.OSZryOnl-lkp@int= el.com/ Closes: https://lore.kernel.org/oe-kbuild-all/202601230908.0vB3SoHM-lkp@int= el.com/ Closes: https://lore.kernel.org/oe-kbuild-all/202601231058.Q6hDGfoT-lkp@int= el.com/ Signed-off-by: Pnina Feder --- kernel/panic.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kernel/panic.c b/kernel/panic.c index 970b7dd7b4c5..ee408ca76211 100644 --- a/kernel/panic.c +++ b/kernel/panic.c @@ -76,7 +76,6 @@ EXPORT_SYMBOL_GPL(panic_timeout); unsigned long panic_print; =20 static int panic_force_cpu =3D -1; -static char *panic_force_buf; =20 ATOMIC_NOTIFIER_HEAD(panic_notifier_list); =20 @@ -306,6 +305,8 @@ atomic_t panic_cpu =3D ATOMIC_INIT(PANIC_CPU_INVALID); atomic_t panic_redirect_cpu =3D ATOMIC_INIT(PANIC_CPU_INVALID); =20 #if defined(CONFIG_SMP) && defined(CONFIG_CRASH_DUMP) +static char *panic_force_buf; + static int __init panic_force_cpu_setup(char *str) { int cpu; --=20 2.43.0