public inbox for linux-ide@vger.kernel.org
 help / color / mirror / Atom feed
From: Christophe Leroy <christophe.leroy@csgroup.eu>
To: Damien Le Moal <damien.lemoal@opensource.wdc.com>,
	Sergey Shtylyov <s.shtylyov@omp.ru>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-ide@vger.kernel.org" <linux-ide@vger.kernel.org>
Subject: Re: [PATCH] ata: pata_mpc52xx: Replace NO_IRQ by 0
Date: Thu, 6 Oct 2022 05:49:53 +0000	[thread overview]
Message-ID: <14fa0e63-1a43-6c80-5ffe-1c7100ed88ba@csgroup.eu> (raw)
In-Reply-To: <60557988-a5e5-8c81-72f9-c0f3ab9ed573@opensource.wdc.com>



Le 06/10/2022 à 07:45, Damien Le Moal a écrit :
> On 10/6/22 14:17, 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.
>>
>> So use 0 instead of using NO_IRQ.
>>
>> Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
> 
> Doesn't this need fixes and cc:stable tags ?

I don't think so, because the only user of this driver is powerpc and 
powerpc has NO_IRQ set to 0.

I'm sending this because I was to remove NO_IRQ in powerpc in a second step.

> 
>> ---
>>   drivers/ata/pata_mpc52xx.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/ata/pata_mpc52xx.c b/drivers/ata/pata_mpc52xx.c
>> index 6559b606736d..3ebd6522a1fd 100644
>> --- a/drivers/ata/pata_mpc52xx.c
>> +++ b/drivers/ata/pata_mpc52xx.c
>> @@ -731,7 +731,7 @@ static int mpc52xx_ata_probe(struct platform_device *op)
>>   		udma_mask = ATA_UDMA2 & ((1 << (*prop + 1)) - 1);
>>   
>>   	ata_irq = irq_of_parse_and_map(op->dev.of_node, 0);
>> -	if (ata_irq == NO_IRQ) {
>> +	if (!ata_irq) {
>>   		dev_err(&op->dev, "error mapping irq\n");
>>   		return -EINVAL;
>>   	}
> 

  reply	other threads:[~2022-10-06  5:50 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-06  5:17 [PATCH] ata: pata_mpc52xx: Replace NO_IRQ by 0 Christophe Leroy
2022-10-06  5:45 ` Damien Le Moal
2022-10-06  5:49   ` Christophe Leroy [this message]
2022-10-06  6:30     ` Damien Le Moal
2022-10-06  8:19       ` Christophe Leroy
2022-10-06  8:37 ` Sergey Shtylyov
2022-10-06  8:43   ` Damien Le Moal
2022-10-17  2:43 ` Damien Le Moal

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=14fa0e63-1a43-6c80-5ffe-1c7100ed88ba@csgroup.eu \
    --to=christophe.leroy@csgroup.eu \
    --cc=damien.lemoal@opensource.wdc.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=s.shtylyov@omp.ru \
    /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