[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1656dbc4-a695-4150-b24c-aeb3d6ecd77e@lunn.ch>
Date: Fri, 22 Mar 2024 14:14:24 +0100
From: Andrew Lunn <andrew@...n.ch>
To: Arnd Bergmann <arnd@...nel.org>
Cc: Thomas Gleixner <tglx@...utronix.de>, Arnd Bergmann <arnd@...db.de>,
Gregory Clement <gregory.clement@...tlin.com>,
Sebastian Hesselbarth <sebastian.hesselbarth@...il.com>,
Marc Zyngier <maz@...nel.org>, Nathan Rossi <nathan.rossi@...i.com>,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] [RESEND] irqchip: armada: suppress unused-function
warning
On Fri, Mar 22, 2024 at 01:58:25PM +0100, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@...db.de>
>
> 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, so we get 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")
> Link: https://lore.kernel.org/lkml/20221215170202.2441960-1-arnd@kernel.org/
> Signed-off-by: Arnd Bergmann <arnd@...db.de>
Reviewed-by: Andrew Lunn <andrew@...n.ch>
Andrew
Powered by blists - more mailing lists