From nobody Tue Apr 7 04:21:21 2026 Received: from sg-1-103.ptr.blmpb.com (sg-1-103.ptr.blmpb.com [118.26.132.103]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 012D7374729 for ; Mon, 16 Mar 2026 08:29:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=118.26.132.103 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773649803; cv=none; b=gcCIL0oBgM9BGkBsn0EhQqwM1+p7okAw2LpLBkCxgt8o+wj7tdtBkhsVWjKwdpJlsPI+5icQXheQPJoiA2Kf+iu/IiAQut1Cx5OseW7UkBbs6fiPQjL4tMmSGCMWxZx3bAwH8+REQ/mWYLAvplVN7Pha4mwfBoNAEJOsDEE4CuQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773649803; c=relaxed/simple; bh=NmQNEqO3tX+TCydY5W9I9c8mVbtqmR9Xn20hY/Z/s3g=; h=To:Cc:From:Mime-Version:Subject:Date:Message-Id:Content-Type; b=dFPLU2ltPw5mGBWvbeWCoJbSE+YfadpllrlxmZr5TNq+wLur87ferm7Q5N0gKZhC13UVFa4ze/Xllk87Z8TQF1edJcInHvT4m2XrYjCbxVJc9TtwxQSCuPbStUzZGGtGcPna180wcS8u1XwyeZsVq0nmRRrBbUm6niVlV1M1r1I= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=bytedance.com; spf=pass smtp.mailfrom=bytedance.com; dkim=pass (2048-bit key) header.d=bytedance.com header.i=@bytedance.com header.b=j33xHTVK; arc=none smtp.client-ip=118.26.132.103 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=bytedance.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bytedance.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bytedance.com header.i=@bytedance.com header.b="j33xHTVK" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; s=2212171451; d=bytedance.com; t=1773649747; h=from:subject: mime-version:from:date:message-id:subject:to:cc:reply-to:content-type: mime-version:in-reply-to:message-id; bh=CaODVYT1W+HmNgf0WhuFC3XQzz/ERUN8c5DJldcMgNQ=; b=j33xHTVKOpHeO9XWNzl91zzuJ+PS/CKe2SKA0hJFKcyMuGE/EzsPT5C2zpLa9ZIYNnSCxA Nwv92axP8dgDr5V5RF7DYDrK5D/CVAmnp3+KGOTpXmOD6t8Lxanggj9zffFEJab6nmk58e wLPfA/7x2gjtB/0SkjxIvTBO++5uq5PpUH3sWHyvYGYQXgJKpi7bkbV2vS13VAsR51gKAr vNmzitl9pw8kH4T2kT8pMttnAPGdCavwrMYVRBmVb2RvpeZq/BeCcOPv4q2O5zrlaWYhYI 9bNrnCsc83yz8aKlzp7YYURxSn8yUvUzbxhpwGntPz5eb1m5imBCZx0i81beAw== To: , , , , , , , , , , , , , , Cc: , , , "Rui Qi" X-Mailer: git-send-email 2.52.0 X-Lms-Return-Path: From: "Rui Qi" Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 X-Original-From: Rui Qi Content-Transfer-Encoding: quoted-printable Subject: [PATCH] ACPI: APEI: ghes: mark ghes_in_nmi_spool_from_list maybe unused Date: Mon, 16 Mar 2026 16:28:42 +0800 Message-Id: <20260316082842.84356-1-qirui.001@bytedance.com> Content-Type: text/plain; charset="utf-8" When CONFIG_ACPI_APEI_SEA and CONFIG_HAVE_ACPI_APEI_NMI are both disabled, ghes_in_nmi_spool_from_list() becomes an unused static function and triggers -Werror=3Dunused-function in some configs (e.g. riscv defconfig with APEI disabled). Mark it as __maybe_unused to silence the warning while keeping the code available for configurations that use SEA or APEI NMI. Signed-off-by: Rui Qi Reviewed-by: Breno Leitao Reviewed-by: Hanjun Guo Reviewed-by: Shuai Xue --- drivers/acpi/apei/ghes.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/acpi/apei/ghes.c b/drivers/acpi/apei/ghes.c index 8acd2742bb27..1fe45949749f 100644 --- a/drivers/acpi/apei/ghes.c +++ b/drivers/acpi/apei/ghes.c @@ -1379,8 +1379,8 @@ static int ghes_in_nmi_queue_one_entry(struct ghes *g= hes, return rc; } =20 -static int ghes_in_nmi_spool_from_list(struct list_head *rcu_list, - enum fixed_addresses fixmap_idx) +static int __maybe_unused ghes_in_nmi_spool_from_list(struct list_head *rc= u_list, + enum fixed_addresses fixmap_idx) { int ret =3D -ENOENT; struct ghes *ghes; --=20 2.20.1