mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
To: Runyu Xiao <runyu.xiao@seu.edu.cn>,
	Yoshinori Sato <yoshinori.sato@nifty.com>,
	Geert Uytterhoeven <geert+renesas@glider.be>,
	 Florian Fuchs <fuchsfl@gmail.com>
Cc: Rich Felker <dalias@libc.org>,
	linux-sh@vger.kernel.org,  linux-kernel@vger.kernel.org,
	stable@vger.kernel.org, Jianhao Xu <jianhao.xu@seu.edu.cn>
Subject: Re: [PATCH] sh: maple: use the matching IRQ cookie
Date: Fri, 16 Oct 2026 16:04:06 +0200	[thread overview]
Message-ID: <b208cd26ab1b7aaa42de2a284332e11b4abbe7bd.camel@physik.fu-berlin.de> (raw)
In-Reply-To: <20261009040248.1136356-1-runyu.xiao@seu.edu.cn>

Hi Runyu,

On Fri, 2026-10-09 at 12:02 +0800, Runyu Xiao wrote:
> The Maple DMA and VBLANK handlers are registered with
> &maple_unsupported_device as their dev_id. Passing NULL to free_irq()
> cannot find either action, so the handlers remain registered and the
> IRQ core warns.
> 
> Use the same cookie when freeing both handlers on the error paths.
> 
> Fixes: 17be2d2b1c33 ("sh: Add maple bus support for the SEGA Dreamcast.")
> Cc: stable@vger.kernel.org
> Assisted-by: LLM
> Signed-off-by: Runyu Xiao <runyu.xiao@seu.edu.cn>
> ---
>  drivers/sh/maple/maple.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/sh/maple/maple.c b/drivers/sh/maple/maple.c
> index 5585f220e..7df88e00c 100644
> --- a/drivers/sh/maple/maple.c
> +++ b/drivers/sh/maple/maple.c
> @@ -863,10 +863,10 @@ static int __init maple_bus_init(void)
>  	kmem_cache_destroy(maple_queue_cache);
>  
>  cleanup_bothirqs:
> -	free_irq(HW_EVENT_VSYNC, 0);
> +	free_irq(HW_EVENT_VSYNC, &maple_unsupported_device);
>  
>  cleanup_irq:
> -	free_irq(HW_EVENT_MAPLE_DMA, 0);
> +	free_irq(HW_EVENT_MAPLE_DMA, &maple_unsupported_device);
>  
>  cleanup_dma:
>  	free_pages((unsigned long) maple_sendbuf, MAPLE_DMA_PAGES);

I'm not 100% versed in the IRQ code but looking how both HW_EVENT_VSYNC
and HW_EVENT_MAPLE_DMA are registered using the maple_unsupported_device
cookie but not unregistered using them, your change seems logical.

Maybe Geert or Florian can have a second look and add their Reviewed-by.

Reviewed-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>

Adrian

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer
`. `'   Physicist
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913

      reply	other threads:[~2026-10-16 14:04 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-09  4:02 Runyu Xiao
2026-10-16 14:04 ` John Paul Adrian Glaubitz [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=b208cd26ab1b7aaa42de2a284332e11b4abbe7bd.camel@physik.fu-berlin.de \
    --to=glaubitz@physik.fu-berlin.de \
    --cc=dalias@libc.org \
    --cc=fuchsfl@gmail.com \
    --cc=geert+renesas@glider.be \
    --cc=jianhao.xu@seu.edu.cn \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sh@vger.kernel.org \
    --cc=runyu.xiao@seu.edu.cn \
    --cc=stable@vger.kernel.org \
    --cc=yoshinori.sato@nifty.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

all inboxes | Powered by JetHome®