[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <6c5f414b-870d-4cef-a6b9-7d9c19381064@gmail.com>
Date: Tue, 24 May 2022 09:41:38 -0700
From: Florian Fainelli <f.fainelli@...il.com>
To: Genjian Zhang <zhanggenjian123@...il.com>,
tsbogend@...ha.franken.de, maz@...nel.org, keescook@...omium.org,
mark.rutland@....com, nathan@...nel.org, siyanteng01@...il.com,
yyuasa@...ux.com, ralf@...ux-mips.org
Cc: linux-mips@...r.kernel.org, linux-kernel@...r.kernel.org,
huhai@...inos.cn, k2ci <kernel-bot@...inos.cn>
Subject: Re: [PATCH v2] gpio: vr41xx: Use spurious_interrupt() and export it
to modules
On 5/23/22 20:28, Genjian Zhang wrote:
> From: huhai <huhai@...inos.cn>
>
> modpost complains once these drivers become modules.
> ERROR: modpost: "irq_err_count" [drivers/gpio/gpio-vr41xx.ko] undefined!
>
> Fix it by use spurious_interrupt() and export spurious_interrupt() when
> that symbol is =m.
>
> Fixes: 27fdd325dace ("MIPS: Update VR41xx GPIO driver to use gpiolib")
> Suggested-by: Thomas Bogendoerfer <tsbogend@...ha.franken.de>
> Reported-by: k2ci <kernel-bot@...inos.cn>
> Signed-off-by: huhai <huhai@...inos.cn>
> ---
> arch/mips/kernel/irq.c | 3 +++
> drivers/gpio/gpio-vr41xx.c | 2 +-
> 2 files changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/arch/mips/kernel/irq.c b/arch/mips/kernel/irq.c
> index 5e11582fe308..69f9a46bf9e5 100644
> --- a/arch/mips/kernel/irq.c
> +++ b/arch/mips/kernel/irq.c
> @@ -49,6 +49,9 @@ asmlinkage void spurious_interrupt(void)
> {
> atomic_inc(&irq_err_count);
> }
> +#ifdef CONFIG_GPIO_VR41XX_MODULE
> +EXPORT_SYMBOL_GPL(spurious_interrupt);
> +#endif
You should not be exporting for just a specific configuration, export it
unconditionally. The generic IRQ layer however prefers to use
handle_bad_irq() which is already exported, can you consider using that?
--
Florian
Powered by blists - more mailing lists