There are over 700 calls to devm_request_threaded_irq() and more than 1000 calls to devm_request_irq() in the kernel. Currently, most drivers implement repetitive and inconsistent error handling for these functions: 1. Over 2000 lines of code are dedicated to error messages 2. Analysis shows 519 unique error messages with 323 variants after normalization 3. 186 messages provide no useful debugging information 4. Only a small fraction deliver meaningful error context As tglx pointed out: "It's not a general allocator like kmalloc(). It's specialized and in the vast majority of cases failing to request the interrupt causes the device probe to fail. So having proper and consistent information why the device cannot be used is useful." This patch implements a standardized error reporting approach[1]: 1. Renames existing functions to __devm_request_threaded_irq() and __devm_request_any_context_irq() 2. Creates new devm_request_threaded_irq() and devm_request_any_context_irq() that: a) Invoke the underscore-prefixed variants b) On error, call dev_err_probe() to provide consistent diagnostics The new error format provides complete debugging context: "<device>: error -<errcode>: request_irq(<irq>) <handler> <thread_fn> <devname>" Example from our QEMU testing: test_irq_device: error -EINVAL: request_irq(1001) test_handler [test_irq] test_thread_fn [test_irq] irq-1001-failure Based on the v7 and v8, standardize coding style without logical change. https://lore.kernel.org/all/20250728123251.384375-2-panchuang@xxxxxxxx/ [1]https://lore.kernel.org/all/87qzy9tvso.ffs@tglx/ Pan Chuang (1): genirq/devres: Add dev_err_probe() in devm_request_threaded_irq() and devm_request_any_context_irq() kernel/irq/devres.c | 121 +++++++++++++++++++++++++++++--------------- 1 file changed, 81 insertions(+), 40 deletions(-) -- 2.34.1