Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

linkmode: Change return type of linkmode_andnot to bool

linkmode_andnot() simply returns the result of bitmap_andnot().
And the return type of bitmap_andnot() is bool.
So it makes sense for the return type of linkmode_andnot()
to also be bool.

I checked all call-sites and they either ignore the return
value or treat it as a bool.

Compile tested only.

Link: https://lore.kernel.org/netdev/68088998-4486-4930-90a4-96a32f08c490@lunn.ch/
Signed-off-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/20240801-linkfield-bowl-v1-1-d58f68967802@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Simon Horman and committed by
Jakub Kicinski
7e1d512d d29dd11e

+3 -2
+3 -2
include/linux/linkmode.h
··· 37 37 return bitmap_empty(src, __ETHTOOL_LINK_MODE_MASK_NBITS); 38 38 } 39 39 40 - static inline int linkmode_andnot(unsigned long *dst, const unsigned long *src1, 41 - const unsigned long *src2) 40 + static inline bool linkmode_andnot(unsigned long *dst, 41 + const unsigned long *src1, 42 + const unsigned long *src2) 42 43 { 43 44 return bitmap_andnot(dst, src1, src2, __ETHTOOL_LINK_MODE_MASK_NBITS); 44 45 }