From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Zhiyong Tao <zhiyong.tao@mediatek.com>,
linux-serial@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org,
Jiri Slaby <jirislaby@kernel.org>,
Matthias Brugger <matthias.bgg@gmail.com>
Subject: Re: [PATCH v1 1/1] serial: 8520_mtk: Prepare for platform_get_irq_optional() changes
Date: Fri, 17 Dec 2021 20:09:29 +0200 [thread overview]
Message-ID: <YbzSWas9OfeZzY3o@smile.fi.intel.com> (raw)
In-Reply-To: <YbzA3y5jp5K5zL/+@kroah.com>
On Fri, Dec 17, 2021 at 05:54:55PM +0100, Greg Kroah-Hartman wrote:
> On Fri, Dec 17, 2021 at 05:10:34PM +0200, Andy Shevchenko wrote:
> > The platform_get_irq_optional() is going to be changed in a way
> > that the result of it:
> > = 0 means no IRQ is provided
> > < 0 means the error which needs to be propagated to the upper layers
> > > 0 valid vIRQ is allocated
>
> What about 0 being a valid irq?
For this driver it can't be possible. The driver is instantiated via DT only
and OF APIs never return 0 for IRQ. If it's the case, it's a regression in the
OF APIs.
I can elaborate in the commit message.
> > In this case, drop check for 0. Note, the 0 is not valid vIRQ and
> > platform_get_irq_optional() issues a big WARN() in such case,
>
> But it still is a valid irq, so why did you just break things? Yes, a
> warning will happen, but the driver and platform will still work.
In general yes, but not in this case. See above.
...
> > - if (irq >= 0)
> > + if (irq > 0)
> > disable_irq_wake(irq);
>
> Why change this now? What does this solve at this point in time?
As explained in the commit message, it's a preparation patch to fix the logic
behind platform_get_irq_optional().
--
With Best Regards,
Andy Shevchenko
prev parent reply other threads:[~2021-12-17 18:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-17 15:10 [PATCH v1 1/1] serial: 8520_mtk: Prepare for platform_get_irq_optional() changes Andy Shevchenko
2021-12-17 16:54 ` Greg Kroah-Hartman
2021-12-17 18:09 ` Andy Shevchenko [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YbzSWas9OfeZzY3o@smile.fi.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=jirislaby@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-serial@vger.kernel.org \
--cc=matthias.bgg@gmail.com \
--cc=zhiyong.tao@mediatek.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox