lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c80a1b5d-c577-4216-9ebb-00a4cecbdde1@vivo.com>
Date: Thu, 31 Jul 2025 11:07:56 +0800
From: PanChuang <panchuang@...o.com>
To: Thomas Gleixner <tglx@...utronix.de>,
 Christophe JAILLET <christophe.jaillet@...adoo.fr>
Cc: kernel-janitors@...r.kernel.org, linux-kernel@...r.kernel.org,
 miquel.raynal@...tlin.com, Jonathan.Cameron@...wei.com,
 u.kleine-koenig@...gutronix.de, angeg.delregno@...labora.com,
 krzk@...nel.org, a.fatoum@...gutronix.de, frank.li@...o.com
Subject: Re: [PATCH v9 1/1] genirq/devres: Add dev_err_probe() in
 devm_request_threaded_irq() and devm_request_any_context_irq()

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


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ