[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <46d1ca5e-8a68-40fb-db3f-acf69e688c4f@csgroup.eu>
Date: Thu, 6 Oct 2022 14:05:08 +0000
From: Christophe Leroy <christophe.leroy@...roup.eu>
To: Alan Stern <stern@...land.harvard.edu>
CC: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-usb@...r.kernel.org" <linux-usb@...r.kernel.org>
Subject: Re: [PATCH] usb: Replace NO_IRQ by 0
Le 06/10/2022 à 15:50, Alan Stern a écrit :
> On Thu, Oct 06, 2022 at 07:15:44AM +0200, Christophe Leroy wrote:
>> diff --git a/drivers/usb/host/ehci-grlib.c b/drivers/usb/host/ehci-grlib.c
>> index a2c3b4ec8a8b..0717f2ccf49d 100644
>> --- a/drivers/usb/host/ehci-grlib.c
>> +++ b/drivers/usb/host/ehci-grlib.c
>> @@ -99,7 +99,7 @@ static int ehci_hcd_grlib_probe(struct platform_device *op)
>> hcd->rsrc_len = resource_size(&res);
>>
>> irq = irq_of_parse_and_map(dn, 0);
>> - if (irq == NO_IRQ) {
>> + if (!irq) {
>> dev_err(&op->dev, "%s: irq_of_parse_and_map failed\n",
>> __FILE__);
>> rv = -EBUSY;
>
> Since NO_IRQ is sometimes set to -1, shouldn't this test (and all the
> other ones you changed) really be doing:
>
> if (!irq || irq == NO_IRQ) { ...
>
No, because irq_of_parse_and_map() will never return -1 as an error. It
will always be 0.
The below call gives no result.
git grep -w NO_IRQ drivers/of/ include/
Powered by blists - more mailing lists