linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] irq: mips: Export irq_err_count to modules
@ 2022-05-23  8:16 Genjian Zhang
  2022-05-23  9:16 ` Thomas Bogendoerfer
  0 siblings, 1 reply; 2+ messages in thread
From: Genjian Zhang @ 2022-05-23  8:16 UTC (permalink / raw)
  To: tsbogend, maz, keescook, mark.rutland, nathan, siyanteng01, yyuasa, ralf
  Cc: linux-mips, linux-kernel, huhai, k2ci

From: huhai <huhai@kylinos.cn>

modpost complains once these drivers become modules.
  ERROR: modpost: "irq_err_count" [drivers/gpio/gpio-vr41xx.ko] undefined!

Fix it by export them when that symbol is =m.

Fixes: 27fdd325dace ("MIPS: Update VR41xx GPIO driver to use gpiolib")
Reported-by: k2ci <kernel-bot@kylinos.cn>
Signed-off-by: huhai <huhai@kylinos.cn>
---
 arch/mips/kernel/irq.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/mips/kernel/irq.c b/arch/mips/kernel/irq.c
index 5e11582fe308..b0038b715008 100644
--- a/arch/mips/kernel/irq.c
+++ b/arch/mips/kernel/irq.c
@@ -38,6 +38,9 @@ void ack_bad_irq(unsigned int irq)
 }
 
 atomic_t irq_err_count;
+#ifdef CONFIG_GPIO_VR41XX_MODULE
+EXPORT_SYMBOL_GPL(irq_err_count);
+#endif
 
 int arch_show_interrupts(struct seq_file *p, int prec)
 {
-- 
2.27.0


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

* Re: [PATCH] irq: mips: Export irq_err_count to modules
  2022-05-23  8:16 [PATCH] irq: mips: Export irq_err_count to modules Genjian Zhang
@ 2022-05-23  9:16 ` Thomas Bogendoerfer
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Bogendoerfer @ 2022-05-23  9:16 UTC (permalink / raw)
  To: Genjian Zhang
  Cc: maz, keescook, mark.rutland, nathan, siyanteng01, yyuasa, ralf,
	linux-mips, linux-kernel, huhai, k2ci

On Mon, May 23, 2022 at 04:16:25PM +0800, Genjian Zhang wrote:
> From: huhai <huhai@kylinos.cn>
> 
> modpost complains once these drivers become modules.
>   ERROR: modpost: "irq_err_count" [drivers/gpio/gpio-vr41xx.ko] undefined!
> 
> Fix it by export them when that symbol is =m.
> 
> Fixes: 27fdd325dace ("MIPS: Update VR41xx GPIO driver to use gpiolib")
> Reported-by: k2ci <kernel-bot@kylinos.cn>
> Signed-off-by: huhai <huhai@kylinos.cn>
> ---
>  arch/mips/kernel/irq.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/arch/mips/kernel/irq.c b/arch/mips/kernel/irq.c
> index 5e11582fe308..b0038b715008 100644
> --- a/arch/mips/kernel/irq.c
> +++ b/arch/mips/kernel/irq.c
> @@ -38,6 +38,9 @@ void ack_bad_irq(unsigned int irq)
>  }
>  
>  atomic_t irq_err_count;
> +#ifdef CONFIG_GPIO_VR41XX_MODULE
> +EXPORT_SYMBOL_GPL(irq_err_count);
> +#endif

please use spurious_interrupt() in drivers/gpio/gpio-vr41xx.c.

Thomas.

-- 
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea.                                                [ RFC1925, 2.3 ]

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

end of thread, other threads:[~2022-05-23  9:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-23  8:16 [PATCH] irq: mips: Export irq_err_count to modules Genjian Zhang
2022-05-23  9:16 ` Thomas Bogendoerfer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).