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]
Date: Mon, 29 Jan 2024 09:22:40 +0000
From: David Laight <David.Laight@...LAB.COM>
To: 'Jani Nikula' <jani.nikula@...ux.intel.com>,
	"'linux-kernel@...r.kernel.org'" <linux-kernel@...r.kernel.org>, "'Linus
 Torvalds'" <torvalds@...ux-foundation.org>, 'Netdev'
	<netdev@...r.kernel.org>, "'dri-devel@...ts.freedesktop.org'"
	<dri-devel@...ts.freedesktop.org>
CC: 'Jens Axboe' <axboe@...nel.dk>, "'Matthew Wilcox (Oracle)'"
	<willy@...radead.org>, 'Christoph Hellwig' <hch@...radead.org>,
	"'linux-btrfs@...r.kernel.org'" <linux-btrfs@...r.kernel.org>, "'Andrew
 Morton'" <akpm@...ux-foundation.org>, 'Andy Shevchenko'
	<andriy.shevchenko@...ux.intel.com>, "'David S . Miller'"
	<davem@...emloft.net>, 'Dan Carpenter' <dan.carpenter@...aro.org>
Subject: RE: [PATCH next 10/11] block: Use a boolean expression instead of
 max() on booleans

From: Jani Nikula
> Sent: 29 January 2024 09:08
> 
> On Sun, 28 Jan 2024, David Laight <David.Laight@...LAB.COM> wrote:
> > blk_stack_limits() contains:
> > 	t->zoned = max(t->zoned, b->zoned);
> > These are bool, so it is just a bitwise or.
> 
> Should be a logical or, really. And || in code.

Not really, bitwise is fine for bool (especially for 'or')
and generates better code.

	David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ