[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <e719b8bf-804f-41e4-93bb-1d54fc6721cc@vivo.com>
Date: Fri, 1 Aug 2025 19:00:27 +0800
From: PanChuang <panchuang@...o.com>
To: Thomas Gleixner <tglx@...utronix.de>,
Christophe JAILLET <christophe.jaillet@...adoo.fr>
Cc: kernel-janitors@...r.kernel.org, linux-kernel@...r.kernel.org,
miquel.raynal@...tlin.com, Jonathan.Cameron@...wei.com,
u.kleine-koenig@...gutronix.de, angeg.delregno@...labora.com,
krzk@...nel.org, a.fatoum@...gutronix.de, frank.li@...o.com
Subject: Re: [PATCH v9 1/1] genirq/devres: Add dev_err_probe() in
devm_request_threaded_irq() and devm_request_any_context_irq()
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
Powered by blists - more mailing lists