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] [thread-next>] [day] [month] [year] [list]
Message-ID: <b6b7f31c-fe98-3129-d8a4-68ac050b570a@infradead.org>
Date:   Sat, 25 Dec 2021 08:50:45 -0800
From:   Randy Dunlap <rdunlap@...radead.org>
To:     Andy Shevchenko <andy.shevchenko@...il.com>,
        Jiasheng Jiang <jiasheng@...as.ac.cn>
Cc:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        "Rafael J. Wysocki" <rafael@...nel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] driver core: platform: Fix wrong comment



On 12/25/21 08:47, Andy Shevchenko wrote:
> On Sat, Dec 25, 2021 at 2:02 AM Jiasheng Jiang <jiasheng@...as.ac.cn> wrote:
>>
>> I notice that there is a 'WARN(ret == 0, "0 is an invalid IRQ
>> number\n");' before 'return ret;', which means that it is possible to
>> return 0 if fails.
>> Therefore, it might be better to correct the wrong comment.
>> And also there is reply sent by Damien Le Moal because I submitted a
>> patch to remove the non-zero check of the platform_get_irq() previously.
>> Damien Le Moal said that the comment for platform_get_irq() is wrond
>> because it can actually return 0.
>> Moreover, platform_get_irq() returns platform_get_irq_optional().
>> As a conclusion, the comments of the platform_get_irq() and
>> platform_get_irq_optional() should be fixed.
>> Not only that, the comments of platform_get_irq_byname() and
>> platform_get_irq_byname_optional() have the same error.
>> This time I only submit one as an example.
>> If the patch is right, I will submit another version to fix all.
>> But, I also notice that the 'return 0' is removed intentionally in the
>> fixed tag.
>> I am not sure which one is right.
>> Anyway, the success IRQ number should be 'postive' other than
>> 'non-zero'.
>> So the comment should be corrected.
>> Here is the mail from Damien Le Moal.
> 
> ...
> 
>> Fixes: c2f3f755f5c7 ("Revert "driver core: platform: Make platform_get_irq_optional() optional"")
> 
> How can it be a Revert?

That's the "title" of that commit:


commit c2f3f755f5c7
Author: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Date:   Wed Apr 7 11:47:56 2021 +0200

    Revert "driver core: platform: Make platform_get_irq_optional() optional"

-- 
~Randy

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ