Linux USB
 help / color / mirror / Atom feed
From: Christophe Leroy <christophe.leroy@csgroup.eu>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>
Subject: Re: [PATCH] usb: Replace NO_IRQ by 0
Date: Thu, 6 Oct 2022 14:05:08 +0000	[thread overview]
Message-ID: <46d1ca5e-8a68-40fb-db3f-acf69e688c4f@csgroup.eu> (raw)
In-Reply-To: <Yz7dI5iTaguhn73K@rowland.harvard.edu>



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/

      parent reply	other threads:[~2022-10-06 14:05 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-06  5:15 [PATCH] usb: Replace NO_IRQ by 0 Christophe Leroy
2022-10-06 13:50 ` Alan Stern
2022-10-06 14:01   ` Christophe Leroy
2022-10-06 14:24     ` Alan Stern
2022-11-10 17:57       ` Christophe Leroy
2022-10-06 14:05   ` Christophe Leroy [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=46d1ca5e-8a68-40fb-db3f-acf69e688c4f@csgroup.eu \
    --to=christophe.leroy@csgroup.eu \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=stern@rowland.harvard.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox