lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <6ab1852e-139f-579b-3ef4-5c98e0ea446d@gmail.com>
Date: Fri, 19 May 2023 08:26:00 +0300
From: Matti Vaittinen <mazziesaccount@...il.com>
To: Andy Shevchenko <andriy.shevchenko@...ux.intel.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 5/19/23 08:00, Matti Vaittinen wrote:
> On 5/17/23 19:47, Andy Shevchenko wrote:
>> 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) {
>>
> 
> I agree. Furthermore, at a quick glance it seems the whole irqnr could 
> be dropped from the private data, and the private data struct could 
> probably be static. I'd send them as separate clean-ups though as those 
> changes are not really related to this return-value series.

Please, ignore everything I wrote above, except that I agree to your 
suggestion. I was writing utter nonsense. Sorry for the noise.

> 
> Yours,
>      -- Matti
> 

-- 
Matti Vaittinen
Linux kernel developer at ROHM Semiconductors
Oulu Finland

~~ When things go utterly wrong vim users can always type :help! ~~


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ