Commit 1fac04a0 authored by Brian Masney's avatar Brian Masney Committed by Thomas Gleixner
Browse files

irqchip/irq-pic32-evic: Add __maybe_unused for board_bind_eic_interrupt in COMPILE_TEST



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);
             |               ^

Annotate the static variable with __maybe_unused to avoid having to put
even more ifdefs into this driver.

Fixes: 282f8b54 ("irqchip/irq-pic32-evic: Define board_bind_eic_interrupt for !MIPS builds")
Reported-by: default avatarkernel test robot <lkp@intel.com>
Signed-off-by: default avatarBrian Masney <bmasney@redhat.com>
Signed-off-by: default avatarThomas Gleixner <tglx@kernel.org>
Link: https://patch.msgid.link/20260403-irq-pic32-evic-unused-v1-1-447cdc0675ec@redhat.com
Closes: https://lore.kernel.org/oe-kbuild-all/202603300715.4HuMMAFb-lkp@intel.com/
parent 669d2067
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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)