[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHp75Vdh9x0Xj5zQN0WhZxDjusWi5ow4s3m6Vrg6_e8ngaEuxA@mail.gmail.com>
Date: Sat, 25 Dec 2021 18:47:27 +0200
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: 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 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?
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists