> -----Original Message----- > From: Andy Shevchenko <andy.shevchenko@xxxxxxxxx> > Sent: Tuesday, May 9, 2023 11:09 AM > To: Shenwei Wang <shenwei.wang@xxxxxxx> > Cc: Linus Walleij <linus.walleij@xxxxxxxxxx>; Bartosz Golaszewski > <brgl@xxxxxxxx>; Stephen Boyd <swboyd@xxxxxxxxxxxx>; Greg Kroah- > Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>; Rafael J. Wysocki > <rafael.j.wysocki@xxxxxxxxx>; linux-gpio@xxxxxxxxxxxxxxx; imx@xxxxxxxxxxxxxxx; > dl-linux-imx <linux-imx@xxxxxxx>; Fugang Duan <fugang.duan@xxxxxxx> > Subject: [EXT] Re: [PATCH v2 1/1] gpio: mxc: use platform_get_irq_optional() to > avoid an error message > > Caution: This is an external email. Please take care when clicking links or > opening attachments. When in doubt, report the message using the 'Report this > email' button > > > On Tue, May 9, 2023 at 7:00 PM Shenwei Wang <shenwei.wang@xxxxxxx> > wrote: > > > > From: Fugang Duan <fugang.duan@xxxxxxx> > > > > Use platform_get_irq_optional() to avoid an error message for the > > optional irq. > > Looking into the code more, this won't happen as the first operation is to check > how many IRQs the device already has. So, you may go further and kill that > irq_count variable completely with your suggestion. > > > Restructuring the codes to ask for the first mandatory IRQ before the > > optional one. > > > > Fixes: 7723f4c5ecdb ("driver core: platform: Add an error message to > > platform_get_irq*()") > > Hmm... > With the above, the proposed change does not fix anything, I believe. > And I'm not sure that this commit is what we want to actually fix. > After re-thinking the logic here, I think you are right. As it has already checked the irqcount before asking for the irq, this patch doesn't fix anything. Thanks, Shenwei > -- > With Best Regards, > Andy Shevchenko