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] [day] [month] [year] [list]
Message-ID: <f45d8750-4dfb-ec46-4ef9-a96169722ca4@opensource.wdc.com>
Date:   Mon, 22 Nov 2021 08:24:08 +0900
From:   Damien Le Moal <damien.lemoal@...nsource.wdc.com>
To:     Sergei Shtylyov <sergei.shtylyov@...il.com>,
        Baokun Li <libaokun1@...wei.com>, axboe@...nel.dk,
        tj@...nel.org, linux-ide@...r.kernel.org,
        linux-kernel@...r.kernel.org
Cc:     yebin10@...wei.com, yukuai3@...wei.com,
        Hulk Robot <hulkci@...wei.com>
Subject: Re: [PATCH -next 2/2] sata_fsl: fix warning in remove_proc_entry when
 rmmod sata_fsl

On 2021/11/20 18:51, Sergei Shtylyov wrote:
> On 20.11.2021 9:08, Damien Le Moal wrote:
>> On 11/20/21 00:43, Sergei Shtylyov wrote:
>>>> diff --git a/drivers/ata/sata_fsl.c b/drivers/ata/sata_fsl.c
>>>> index 30759fd1c3a2..011daac4a14e 100644
>>>> --- a/drivers/ata/sata_fsl.c
>>>> +++ b/drivers/ata/sata_fsl.c
>>>> @@ -1493,7 +1493,7 @@ static int sata_fsl_probe(struct platform_device *ofdev)
>>>>    	host_priv->ssr_base = ssr_base;
>>>>    	host_priv->csr_base = csr_base;
>>>>    
>>>> -	irq = irq_of_parse_and_map(ofdev->dev.of_node, 0);
>>>> +	irq = platform_get_irq(ofdev, 0);
>>>>    	if (!irq) {
>>>
>>> 	if (irq < 0) {
>>>
>>>      platform_get_irq() returns negative error codes, not 0 on failure.
>>
>> Sergei,
>>
>> By the way, the kdoc comment for platform_get_irq() says:
>>
>> "Return: non-zero IRQ number on success, negative error number on failure."
>>
>> But irq	0 is valid, isn't it ? So shouldn't this be changed to something
>> like:
>>
>> "Return: IRQ number on success, negative error number on failure."
> 
>     No, it's not valid (the current code WARN()s about it) and won't be 
> returned anymore after my patch [1] gets applied.
> 
> [1] https://marc.info/?l=linux-kernel&m=163623041902285

OK. Got it. Thanks.

> 
> MBR, Sergei
> 


-- 
Damien Le Moal
Western Digital Research

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ