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]
Date: Thu, 22 Feb 2024 16:11:09 +0100
From: Andrew Lunn <andrew@...n.ch>
To: Simon Horman <horms@...nel.org>
Cc: "David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>,
	Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
	Ariel Elior <aelior@...vell.com>,
	Manish Chopra <manishc@...vell.com>,
	Jesse Brandeburg <jesse.brandeburg@...el.com>,
	Tony Nguyen <anthony.l.nguyen@...el.com>, linux-usb@...r.kernel.org,
	netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
	intel-wired-lan@...ts.osuosl.org
Subject: Re: [PATCH net-next v4 3/9] net: qlogic: qede: Use linkmode helpers
 for EEE

On Wed, Feb 21, 2024 at 10:28:51AM +0000, Simon Horman wrote:
> On Tue, Feb 20, 2024 at 03:45:28PM +0100, Andrew Lunn wrote:
> > > > +	unsupp = linkmode_andnot(tmp, edata->advertised, supported);
> > > 
> > > nit: Given the types involved, I might have written this as:
> > > 
> > > 	unsupp = !!linkmode_andnot(tmp, edata->advertised, supported);
> > 
> > linkmode_andnot() calls bitmap_andnot():
> > 
> > static inline bool bitmap_andnot(unsigned long *dst, const unsigned long *src1,
> > 			const unsigned long *src2, unsigned int nbits)
> > 
> > It already returns a bool, so there is no need to force an int to bool
> > conversion using !!.
> 
> Good point, sorry for missing that.

> I assume there is a reason that the return type of
> linkmode_andnot is not bool.

Either i got it wrong when i added the wrapper, or bitmap_andnot() has
changed since then?

It probably can be changed to a bool.

	Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ