mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: PanChuang <panchuang@vivo.com>
To: Thomas Gleixner <tglx@linutronix.de>,
	Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org,
	miquel.raynal@bootlin.com, Jonathan.Cameron@Huawei.com,
	u.kleine-koenig@pengutronix.de, angeg.delregno@collabora.com,
	krzk@kernel.org, a.fatoum@pengutronix.de, frank.li@vivo.com
Subject: Re: [PATCH v9 1/1] genirq/devres: Add dev_err_probe() in devm_request_threaded_irq() and devm_request_any_context_irq()
Date: Fri, 1 Aug 2025 19:00:27 +0800	[thread overview]
Message-ID: <e719b8bf-804f-41e4-93bb-1d54fc6721cc@vivo.com> (raw)
In-Reply-To: <87ms8lio7i.ffs@tglx>

Hi, tglx

在 2025/7/31 1:27, Thomas Gleixner 写道:
> As they print the same thing the right thing to do is:
>
>          int rc = __devm_request_any_context_irq(....);
>
>          return devm_request_result(dev, rc, irq, handler, NULL, devname);
>
> and in devm_request_threaded_irq() invoke it with:
>
>          return devm_request_result(dev, rc, irq, handler, thread_fn, devname);
>
> and let that function return rc if (rc >= 0), which handles both cases.

Or do you mean that we should add a new API devm_request_result() as 
follows:

static int devm_request_result(struct device *dev, int rc, unsigned int 
irq, irq_handler_t handler, irq_handler_t thread_fn, const char 
*devname) { if (rc >= 0) return rc; return dev_err_probe(dev, rc, 
"request_irq(%u) %ps %ps %s\n", irq, handler, thread_fn, devname ? : ""); }

And this function is called by devm_request_any_context_irq() and 
devm_request_thread_irq().

I'm concerned that when we call devm_request_any_context_irq(), it 
always logs a NULL parameter (thread_fn)."

I would appreciate your guidance on this issue.

Thanks,

Pan Chuang



  parent reply	other threads:[~2025-08-01 11:00 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-30  6:25 [PATCH v9 0/1] " Pan Chuang
2025-07-30  6:25 ` [PATCH v9 1/1] " Pan Chuang
2025-07-30 16:48   ` Christophe JAILLET
2025-07-30 17:27     ` Thomas Gleixner
2025-07-31  3:07       ` PanChuang
2025-08-01 11:00       ` PanChuang [this message]
2025-07-31  2:44     ` PanChuang
2025-07-30  6:45 ` [PATCH v9 0/1] " Markus Elfring

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=e719b8bf-804f-41e4-93bb-1d54fc6721cc@vivo.com \
    --to=panchuang@vivo.com \
    --cc=Jonathan.Cameron@Huawei.com \
    --cc=a.fatoum@pengutronix.de \
    --cc=angeg.delregno@collabora.com \
    --cc=christophe.jaillet@wanadoo.fr \
    --cc=frank.li@vivo.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=krzk@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=miquel.raynal@bootlin.com \
    --cc=tglx@linutronix.de \
    --cc=u.kleine-koenig@pengutronix.de \
    /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®