From: Shuai Xue <xueshuai@linux.alibaba.com>
To: Rui Qi <qirui.001@bytedance.com>,
rafael@kernel.org, tony.luck@intel.com, bp@alien8.de,
guohanjun@huawei.com, mchehab@kernel.org, lenb@kernel.org,
pjw@kernel.org, palmer@dabbelt.com, aou@eecs.berkeley.edu,
alex@ghiti.fr, jonathan.cameron@huawei.com,
fabio.m.de.francesco@linux.intel.com, leitao@debian.org,
jason@os.amperecomputing.com
Cc: inux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org,
inux-riscv@lists.infradead.org
Subject: Re: [PATCH] ACPI: APEI: ghes: mark ghes_in_nmi_spool_from_list maybe unused
Date: Tue, 7 Apr 2026 09:31:50 +0800 [thread overview]
Message-ID: <f322db28-7333-4fde-bfd1-3e78f01dc9e8@linux.alibaba.com> (raw)
In-Reply-To: <20260316082842.84356-1-qirui.001@bytedance.com>
On 3/16/26 4:28 PM, Rui Qi wrote:
> 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=unused-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 <qirui.001@bytedance.com>
> ---
> 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 *ghes,
> return rc;
> }
>
> -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 *rcu_list,
> + enum fixed_addresses fixmap_idx)
> {
> int ret = -ENOENT;
> struct ghes *ghes;
This approach is consistent with the existing pattern in the file,
where several functions are already marked as __maybe_unused:
$cat drivers/acpi/apei/ghes.c | grep __maybe_unused
static bool __maybe_unused ghes_has_active_errors(struct list_head *ghes_list)
static int __maybe_unused ghes_map_error_status(struct ghes *ghes)
static void __maybe_unused ghes_unmap_error_status(struct ghes *ghes)
LGTM.
Reviewed-by: Shuai Xue <xueshuai@linux.alibaba.com>
Thanks.
Shuai
prev parent reply other threads:[~2026-04-07 1:31 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-16 8:28 Rui Qi
2026-03-16 9:03 ` Breno Leitao
2026-03-17 3:55 ` Rui Qi
2026-03-17 9:39 ` Breno Leitao
2026-03-23 8:14 ` Hanjun Guo
2026-03-17 9:39 ` Breno Leitao
2026-03-23 8:15 ` Hanjun Guo
2026-04-07 1:31 ` Shuai Xue [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f322db28-7333-4fde-bfd1-3e78f01dc9e8@linux.alibaba.com \
--to=xueshuai@linux.alibaba.com \
--cc=alex@ghiti.fr \
--cc=aou@eecs.berkeley.edu \
--cc=bp@alien8.de \
--cc=fabio.m.de.francesco@linux.intel.com \
--cc=guohanjun@huawei.com \
--cc=inux-acpi@vger.kernel.org \
--cc=inux-riscv@lists.infradead.org \
--cc=jason@os.amperecomputing.com \
--cc=jonathan.cameron@huawei.com \
--cc=leitao@debian.org \
--cc=lenb@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=palmer@dabbelt.com \
--cc=pjw@kernel.org \
--cc=qirui.001@bytedance.com \
--cc=rafael@kernel.org \
--cc=tony.luck@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®