Re: [PATCH v9 1/1] genirq/devres: Add dev_err_probe() in devm_request_threaded_irq() and devm_request_any_context_irq()

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

 



Hi, tglx

在 2025/7/31 1:27, Thomas Gleixner 写道:
  From my PoV, it would look more logical to have the same logic in
devm_request_threaded_irq() and in devm_request_any_context_irq().
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.

Could you please confirm if this implementation aligns with your vision?

I'm happy to refine it further based on your guidance.

>        int rc = __devm_request_any_context_irq(dev, irq, handler, irqflags,
>                                                devname, dev_id);
>-       if (rc < 0) {
>-               return dev_err_probe(dev, rc, "request_irq(%u) %ps %s\n",
>-                                    irq, handler, devname ? : "");
>-       }
>+       if (rc >= 0)
>+               return rc;
>
>-       return rc;
>+       return dev_err_probe(dev, rc, "request_irq(%u) %ps %s\n",
>+                            irq, handler, devname ? : "");
 >}


Thanks,

    Pan Chuang





[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux