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, 10 Nov 2022 17:57:00 +0000 [thread overview]
Message-ID: <96c221b2-a373-3abf-b1e1-c79267798ecb@csgroup.eu> (raw)
In-Reply-To: <Yz7lKhs5qUXaoFsF@rowland.harvard.edu>
Le 06/10/2022 à 16:24, Alan Stern a écrit :
> On Thu, Oct 06, 2022 at 02:01:57PM +0000, Christophe Leroy wrote:
>>
>>
>> Le 06/10/2022 à 15:50, Alan Stern a écrit :
>>> On Thu, Oct 06, 2022 at 07:15:44AM +0200, Christophe Leroy wrote:
>>>> NO_IRQ is used to check the return of irq_of_parse_and_map().
>>>>
>>>> On some architecture NO_IRQ is 0, on other architectures it is -1.
>>>>
>>>> irq_of_parse_and_map() returns 0 on error, independent of NO_IRQ.
>>>
>>> This isn't clear. Does absence of an irq count as an error? In other
>>> words, will irq_of_parse_and_map() sometimes return 0 and other times
>>> return NO_IRQ? What about architectures on which 0 is a valid irq
>>> number?
>>
>> NO_IRQ doesn't exist anywhere in core functions. Only some drivers and
>> some architectures have relics of it.
>>
>> irq_of_parse_and_map() will always return 0 on error.
>>
>> 0 can't be a valid logical IRQ number. It may only be a valid hwirq
>> number but it will always be translated to a non-zero logical irq number.
>>
>> I'm trying to get rid of NO_IRQ completely in powerpc code, therefore
>> trying to clean-up all drivers used by powerpc architecture.
>>
>> Long time ago Linus advocated for not using NO_IRQ, see
>> https://lkml.org/lkml/2005/11/21/221
>
> Okay, good. Please resubmit the patch and include some of these things
> in the patch description.
I sent v2 with more details in the commit message.
Thanks
Christophe
next prev parent reply other threads:[~2022-11-10 17:57 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-06 5:15 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 [this message]
2022-10-06 14:05 ` Christophe Leroy
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=96c221b2-a373-3abf-b1e1-c79267798ecb@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
all inboxes | Powered by JetHome®