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

From: Andrew Lunn
Date: Tue Feb 20 2024 - 09:45:34 EST


> > + 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 !!.

Andrew