mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] irqchip/irq-pic32-evic: add __maybe_unused for board_bind_eic_interrupt in COMPILE_TEST
@ 2026-04-03 21:12 Brian Masney
  2026-04-07  9:20 ` [tip: irq/drivers] irqchip/irq-pic32-evic: Add " tip-bot2 for Brian Masney
  0 siblings, 1 reply; 2+ messages in thread
From: Brian Masney @ 2026-04-03 21:12 UTC (permalink / raw)
  To: Thomas Gleixner; +Cc: linux-kernel, kernel test robot, Brian Masney

There are a few ifdefs in this driver so that it can be compiled on all
architectures when COMPILE_TEST is set. board_bind_eic_interrupt is
defined in arch/mips/ for normal usage, however when this driver is
compiled with COMPILE_TEST on other architectures, it is defined as a
static variable inside this driver. This causes the following warning:

    drivers/irqchip/irq-pic32-evic.c:54:15: warning: variable
      'board_bind_eic_interrupt' set but not used [-Wunused-but-set-global]
          54 | static void (*board_bind_eic_interrupt)(int irq,
                                                       int regset);
             |               ^

Let's just annotate the static variable with __maybe_unused to avoid
having to put even more ifdefs in this driver.

Fixes: 282f8b547d51d ("irqchip/irq-pic32-evic: Define board_bind_eic_interrupt for !MIPS builds")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202603300715.4HuMMAFb-lkp@intel.com/
Signed-off-by: Brian Masney <bmasney@redhat.com>
---
 drivers/irqchip/irq-pic32-evic.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/irqchip/irq-pic32-evic.c b/drivers/irqchip/irq-pic32-evic.c
index ecea7cb3ba849a3cbc96213d96f5090feafde5eb..3c48288c9e6c4e8001d28cb68c2edecfe36aa799 100644
--- a/drivers/irqchip/irq-pic32-evic.c
+++ b/drivers/irqchip/irq-pic32-evic.c
@@ -51,7 +51,7 @@ asmlinkage void __weak plat_irq_dispatch(void)
 	do_domain_IRQ(evic_irq_domain, hwirq);
 }
 #else
-static void (*board_bind_eic_interrupt)(int irq, int regset);
+static __maybe_unused void (*board_bind_eic_interrupt)(int irq, int regset);
 #endif
 
 static struct evic_chip_data *irqd_to_priv(struct irq_data *data)

---
base-commit: cc13002a9f984d37906e9476f3e532a8cdd126f5
change-id: 20260403-irq-pic32-evic-unused-acea961a8cf6

Best regards,
-- 
Brian Masney <bmasney@redhat.com>


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-04-07  9:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-04-03 21:12 [PATCH] irqchip/irq-pic32-evic: add __maybe_unused for board_bind_eic_interrupt in COMPILE_TEST Brian Masney
2026-04-07  9:20 ` [tip: irq/drivers] irqchip/irq-pic32-evic: Add " tip-bot2 for Brian Masney

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®