Skip to content

Commit 7e1d512

Browse files
hormskuba-moo
authored andcommitted
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/[email protected]/ Signed-off-by: Simon Horman <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent d29dd11 commit 7e1d512

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

include/linux/linkmode.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,9 @@ static inline bool linkmode_empty(const unsigned long *src)
3737
return bitmap_empty(src, __ETHTOOL_LINK_MODE_MASK_NBITS);
3838
}
3939

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)
4243
{
4344
return bitmap_andnot(dst, src1, src2, __ETHTOOL_LINK_MODE_MASK_NBITS);
4445
}

0 commit comments

Comments
 (0)