Re: [PATCH v6 01/24] genirq/devres: Add devm_request_threaded_irq_probe() and devm_request_irq_probe()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Pan,

On 23/06/2025 at 20:30:34 +08, Pan Chuang <panchuang@xxxxxxxx> wrote:

> From: Yangtao Li <frank.li@xxxxxxxx>
>
> There are more than 700 calls to devm_request_threaded_irq method and
> more than 1000 calls to devm_request_irq method. Most drivers only
> request one interrupt resource, and these error messages are basically
> the same. If error messages are printed everywhere, more than 2000 lines
> of code can be saved by removing the msg in the driver.

[...]

> So add devm_request_threaded_irq_probe() and devm_request_irq_probe(),
> which ensure that all error handling branches print error information.
> In this way, when this function fails, the upper-layer functions can
> directly return an error code without missing debugging information.
> Otherwise, the error message will be printed redundantly or missing.

While I understand the goal and adhere to it, may I challenge the use of
a yet another intermediate function that 99% of the users will anyway
use? Wouldn't it be more straightforward to just add the error message
in the existing functions directly? If we really want an alternative, it
may be created and called in the few places where a dev_err_probe()
might not be relevant.

Thanks,
Miquèl





[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux