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: Thu, 31 Jul 2025 11:07:56 +0800 [thread overview]
Message-ID: <c80a1b5d-c577-4216-9ebb-00a4cecbdde1@vivo.com> (raw)
In-Reply-To: <87ms8lio7i.ffs@tglx>
Hi, tglx
在 2025/7/31 1:27, Thomas Gleixner 写道:
>> From my PoV, it would look more logical to have the same logic in
>> devm_request_threaded_irq() and in devm_request_any_context_irq().
> 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.
Could you please confirm if this implementation aligns with your vision?
I'm happy to refine it further based on your guidance.
> int rc = __devm_request_any_context_irq(dev, irq, handler,
irqflags,
> devname, dev_id);
>- if (rc < 0) {
>- return dev_err_probe(dev, rc, "request_irq(%u) %ps %s\n",
>- irq, handler, devname ? : "");
>- }
>+ if (rc >= 0)
>+ return rc;
>
>- return rc;
>+ return dev_err_probe(dev, rc, "request_irq(%u) %ps %s\n",
>+ irq, handler, devname ? : "");
>}
Thanks,
Pan Chuang
next prev parent reply other threads:[~2025-07-31 3:08 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 [this message]
2025-08-01 11:00 ` PanChuang
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=c80a1b5d-c577-4216-9ebb-00a4cecbdde1@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®