[PATCH] ipmi: scope ipmi_si_irq_handler() to CONFIG_ACPI
From: Pengpeng Hou
Date: Mon Mar 09 2026 - 05:16:19 EST
In current linux.git (1954c4f01220), ipmi_si_irq_handler() is
defined and declared unconditionally. However, its only in-tree caller
is the ACPI GPE helper in drivers/char/ipmi/ipmi_si_platform.c, which
lives inside #ifdef CONFIG_ACPI.
Match the helper declaration and definition to that scope by wrapping
them in #ifdef CONFIG_ACPI. This fixes the config-scope mismatch and
reduces unnecessary code footprint for non-ACPI systems.
Signed-off-by: Pengpeng Hou <pengpeng.hou@xxxxxxxxxxxxxxxx>
---
diff --git a/drivers/char/ipmi/ipmi_si.h b/drivers/char/ipmi/ipmi_si.h
--- a/drivers/char/ipmi/ipmi_si.h
+++ b/drivers/char/ipmi/ipmi_si.h
@@
int ipmi_si_add_smi(struct si_sm_io *io);
+#ifdef CONFIG_ACPI
irqreturn_t ipmi_si_irq_handler(int irq, void *data);
+#endif
void ipmi_irq_start_cleanup(struct si_sm_io *io);
int ipmi_std_irq_setup(struct si_sm_io *io);
void ipmi_irq_finish_setup(struct si_sm_io *io);
diff --git a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c
--- a/drivers/char/ipmi/ipmi_si_intf.c
+++ b/drivers/char/ipmi/ipmi_si_intf.c
@@
spin_unlock_irqrestore(&(smi_info->si_lock), flags);
}
+#ifdef CONFIG_ACPI
irqreturn_t ipmi_si_irq_handler(int irq, void *data)
{
struct smi_info *smi_info = data;
unsigned long flags;
@@
return IRQ_HANDLED;
}
+#endif
static unsigned int ipmi_shift_irq_cleanup(unsigned int cleanup_period,
struct si_sm_io *io)
{