RE: [PATCH next 10/11] block: Use a boolean expression instead of max() on booleans

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Jani Nikula
> Sent: 29 January 2024 09:08
> 
> On Sun, 28 Jan 2024, David Laight <David.Laight@xxxxxxxxxx> 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)




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux