Re: [PATCH] driver core: platform: Fix wrong comment

From: Andy Shevchenko
Date: Sat Dec 25 2021 - 11:48:08 EST


On Sat, Dec 25, 2021 at 2:02 AM Jiasheng Jiang <jiasheng@xxxxxxxxxxx> 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