[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZGUFJ5LRCzW2V0a1@smile.fi.intel.com>
Date: Wed, 17 May 2023 19:47:35 +0300
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Matti Vaittinen <mazziesaccount@...il.com>
Cc: Matti Vaittinen <matti.vaittinen@...rohmeurope.com>,
Daniel Scally <djrscally@...il.com>,
Heikki Krogerus <heikki.krogerus@...ux.intel.com>,
Sakari Ailus <sakari.ailus@...ux.intel.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
"Rafael J. Wysocki" <rafael@...nel.org>,
Lars-Peter Clausen <lars@...afoo.de>,
Michael Hennerich <Michael.Hennerich@...log.com>,
Jonathan Cameron <jic23@...nel.org>,
Andreas Klinger <ak@...klinger.de>,
Marcin Wojtas <mw@...ihalf.com>,
Russell King <linux@...linux.org.uk>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>,
Jonathan Neuschäfer <j.neuschaefer@....net>,
Linus Walleij <linus.walleij@...aro.org>,
Paul Cercueil <paul@...pouillou.net>,
Wolfram Sang <wsa@...nel.org>,
Akhil R <akhilrajeev@...dia.com>, linux-acpi@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-iio@...r.kernel.org,
netdev@...r.kernel.org, openbmc@...ts.ozlabs.org,
linux-gpio@...r.kernel.org, linux-mips@...r.kernel.org
Subject: Re: [PATCH v4 2/7] iio: mb1232: relax return value check for IRQ get
On Tue, May 16, 2023 at 10:12:41AM +0300, Matti Vaittinen wrote:
> fwnode_irq_get() was changed to not return 0 anymore.
>
> Drop check for return value 0.
...
> - if (data->irqnr <= 0) {
> + if (data->irqnr < 0) {
> /* usage of interrupt is optional */
> data->irqnr = -1;
> } else {
After this change I'm not sure we need this branch at all, I mean that -errn is
equal to -1 in the code (but needs to be checked for silly checks like == -1).
Hence
Entire excerpt can be replaced with
if (data->irqnr > 0) {
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists