linux-mips.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Florian Fainelli <f.fainelli@gmail.com>
To: Genjian Zhang <zhanggenjian123@gmail.com>,
	tsbogend@alpha.franken.de, maz@kernel.org, keescook@chromium.org,
	mark.rutland@arm.com, nathan@kernel.org, siyanteng01@gmail.com,
	yyuasa@linux.com, ralf@linux-mips.org
Cc: linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org,
	huhai@kylinos.cn, k2ci <kernel-bot@kylinos.cn>
Subject: Re: [PATCH v2] gpio: vr41xx: Use spurious_interrupt() and export it to modules
Date: Tue, 24 May 2022 09:41:38 -0700	[thread overview]
Message-ID: <6c5f414b-870d-4cef-a6b9-7d9c19381064@gmail.com> (raw)
In-Reply-To: <20220524032847.3244853-1-zhanggenjian@kylinos.cn>

On 5/23/22 20:28, 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 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@alpha.franken.de>
> Reported-by: k2ci <kernel-bot@kylinos.cn>
> Signed-off-by: huhai <huhai@kylinos.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

      reply	other threads:[~2022-05-24 16:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-24  3:28 [PATCH v2] gpio: vr41xx: Use spurious_interrupt() and export it to modules Genjian Zhang
2022-05-24 16:41 ` Florian Fainelli [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6c5f414b-870d-4cef-a6b9-7d9c19381064@gmail.com \
    --to=f.fainelli@gmail.com \
    --cc=huhai@kylinos.cn \
    --cc=keescook@chromium.org \
    --cc=kernel-bot@kylinos.cn \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=maz@kernel.org \
    --cc=nathan@kernel.org \
    --cc=ralf@linux-mips.org \
    --cc=siyanteng01@gmail.com \
    --cc=tsbogend@alpha.franken.de \
    --cc=yyuasa@linux.com \
    --cc=zhanggenjian123@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).