Re: [PATCH net-next v4 3/9] net: qlogic: qede: Use linkmode helpers for EEE

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

 



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




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux