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