]> Git Repo - J-linux.git/commitdiff
irqchip/armada-370-xp: Suppress unused-function warning
authorArnd Bergmann <[email protected]>
Fri, 22 Mar 2024 12:58:25 +0000 (13:58 +0100)
committerThomas Gleixner <[email protected]>
Tue, 26 Mar 2024 01:12:16 +0000 (02:12 +0100)
armada_370_xp_msi_reenable_percpu() is only defined when CONFIG_PCI_MSI is
enabled, and only called when SMP is enabled.

Without CONFIG_SMP, there are no callers, which results in a build time
warning instead:

drivers/irqchip/irq-armada-370-xp.c:319:13: error: 'armada_370_xp_msi_reenable_percpu' defined but not used [-Werror=unused-function]
  319 | static void armada_370_xp_msi_reenable_percpu(void) {}
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Mark the function as __maybe_unused to avoid adding more complexity
to the #ifdefs.

Fixes: 8ca61cde32c1 ("irqchip/armada-370-xp: Enable MSI affinity configuration")
Signed-off-by: Arnd Bergmann <[email protected]>
Signed-off-by: Thomas Gleixner <[email protected]>
Reviewed-by: Andrew Lunn <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
drivers/irqchip/irq-armada-370-xp.c

index a55528469278c77a85cc81503e2b4185e1dca24c..4b021a67bdfe481707291bb3888e7b91eb3c1c56 100644 (file)
@@ -316,7 +316,7 @@ static int armada_370_xp_msi_init(struct device_node *node,
        return 0;
 }
 #else
-static void armada_370_xp_msi_reenable_percpu(void) {}
+static __maybe_unused void armada_370_xp_msi_reenable_percpu(void) {}
 
 static inline int armada_370_xp_msi_init(struct device_node *node,
                                         phys_addr_t main_int_phys_base)
This page took 0.042065 seconds and 4 git commands to generate.