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] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZdS0kOKTWHlisuyn@smile.fi.intel.com>
Date: Tue, 20 Feb 2024 16:17:52 +0200
From: Andy Shevchenko <andy@...nel.org>
To: Ceclan Dumitru <mitrutzceclan@...il.com>
Cc: linus.walleij@...aro.org, brgl@...ev.pl, linux-gpio@...r.kernel.org,
	Lars-Peter Clausen <lars@...afoo.de>,
	Jonathan Cameron <jic23@...nel.org>,
	Rob Herring <robh+dt@...nel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
	Conor Dooley <conor+dt@...nel.org>,
	Michael Walle <michael@...le.cc>, Arnd Bergmann <arnd@...db.de>,
	ChiaEn Wu <chiaen_wu@...htek.com>,
	Niklas Schnelle <schnelle@...ux.ibm.com>,
	Leonard Göhrs <l.goehrs@...gutronix.de>,
	Mike Looijmans <mike.looijmans@...ic.nl>,
	Haibo Chen <haibo.chen@....com>,
	Hugo Villeneuve <hvilleneuve@...onoff.com>,
	David Lechner <dlechner@...libre.com>,
	Ceclan Dumitru <dumitru.ceclan@...log.com>,
	linux-iio@...r.kernel.org, devicetree@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH v13 2/3] iio: adc: ad_sigma_delta: Add optional irq
 selection

On Tue, Feb 20, 2024 at 04:13:12PM +0200, Ceclan Dumitru wrote:
> On 2/20/24 16:11, Andy Shevchenko wrote:
> > On Tue, Feb 20, 2024 at 11:43:39AM +0200, Dumitru Ceclan wrote:

..

> >> +	if (!info->irq_num)
> >> +		sigma_delta->irq_num = spi->irq;
> >> +	else
> >> +		sigma_delta->irq_num = info->irq_num;
> > 
> > Why not positive check?
> > 
> Considered that selecting spi->irq is usually the default case, so it should
> be the first branch

Let compiler do its job, the negative conditions are harder to read/parse by
human beings.

-- 
With Best Regards,
Andy Shevchenko



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ