From: Thomas Gleixner <tglx@linutronix.de>
To: Pan Chuang <panchuang@vivo.com>, linux-kernel@vger.kernel.org
Cc: 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,
Pan Chuang <panchuang@vivo.com>
Subject: Re: [PATCH v8 1/1] genirq/devres: Add dev_err_probe() in devm_request_threaded_irq() and devm_request_any_context_irq()
Date: Tue, 29 Jul 2025 11:14:54 +0200 [thread overview]
Message-ID: <87qzxzjr3l.ffs@tglx> (raw)
In-Reply-To: <20250729081434.497716-2-panchuang@vivo.com>
On Tue, Jul 29 2025 at 16:14, Pan Chuang wrote:
> The devm_request_threaded_irq() and devm_request_any_context_irq() functions
devm_request_threaded_irq() and devm_request_any_context_irq() ....
The '()' notation already makes it clear that these are functions, so no
'The ... functions' is redundant.
> currently don't print any error when interrupt registration fails. This forces
> each driver to implement redundant error logging - over 2,000 lines of error
> messages exist across drivers. Additionally, when upper-layer functions
> propagate these errors without logging, critical debugging information is lost.
>
> Add automatic error logging to these functions via dev_err_probe(), printing
> device name, IRQ number, handler addresses, and error code on failure.
Again: %pS (or %ps) does NOT print the handler address. It prints the
symbol name. Feel free to ignore my review comments, but then accept
that I ignore your patches too.
> Signed-off-by: Yangtao Li <frank.li@vivo.com>
> Signed-off-by: Pan Chuang <panchuang@vivo.com>
This SOB chain is still incorrect. Again:
https://www.kernel.org/doc/html/latest/process/submitting-patches.html#when-to-use-acked-by-cc-and-co-developed-by
If anything is unclear, then please ask.
> +/**
> + * devm_request_any_context_irq - allocate an interrupt line for a managed device with error logging
> + * @dev: Device to request interrupt for
> + * @irq: Interrupt line to allocate
> + * @handler: Function to be called when the IRQ occurs
> + * @irqflags: Interrupt type flags
> + * @devname: An ascii name for the claiming device, dev_name(dev) if NULL
> + * @dev_id: A cookie passed back to the handler function
> + *
> + * Except for the extra @dev argument, this function takes the same arguments
> + * and performs the same function as request_any_context_irq(). IRQs requested
> + * with this function will be automatically freed on driver detach.
> + *
> + * If an IRQ allocated with this function needs to be freed separately,
> + * devm_free_irq() must be used.
> + *
> + * When the request fails, an error message is printed with contextual
> + * information (device name, interrupt number, handler functions and
> + * error code). Don't add extra error messages at the call sites.
> + *
> + * On failure, it returns a negative value. On success, it returns either
> + * IRQC_IS_HARDIRQ or IRQC_IS_NESTED.
As you touch this, can you please convert this to the proper
Returns:
formatting?
Thanks,
tglx
next prev parent reply other threads:[~2025-07-29 9:14 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-29 8:14 [PATCH v8 0/1] genirq/devres: Add dev_err_probe() in devm_request_threaded_irq() and devm_request_any_context_irq() Pan Chuang
2025-07-29 8:14 ` [PATCH v8 1/1] " Pan Chuang
2025-07-29 8:20 ` Ahmad Fatoum
2025-07-29 9:15 ` Thomas Gleixner
2025-07-29 9:14 ` Thomas Gleixner [this message]
2025-07-29 11:48 ` Pan Chuang
2025-07-29 12:12 ` Thomas Gleixner
2025-07-29 18:35 ` [PATCH v8 0/1] " Markus Elfring
2025-07-30 6:11 ` Pan Chuang
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=87qzxzjr3l.ffs@tglx \
--to=tglx@linutronix.de \
--cc=Jonathan.Cameron@Huawei.com \
--cc=a.fatoum@pengutronix.de \
--cc=angeg.delregno@collabora.com \
--cc=frank.li@vivo.com \
--cc=krzk@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=miquel.raynal@bootlin.com \
--cc=panchuang@vivo.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.