From: Simon Horman Date: Thu, 1 Aug 2024 20:00:03 +0000 (+0100) Subject: linkmode: Change return type of linkmode_andnot to bool X-Git-Tag: v6.12-rc1~232^2~328 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7e1d512dab5042aa1c2224ed362be79e3f22a15e;p=thirdparty%2Flinux.git 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 Link: https://patch.msgid.link/20240801-linkfield-bowl-v1-1-d58f68967802@kernel.org Signed-off-by: Jakub Kicinski --- diff --git a/include/linux/linkmode.h b/include/linux/linkmode.h index d94bfd9ac8cca..3b9de09871f60 100644 --- a/include/linux/linkmode.h +++ b/include/linux/linkmode.h @@ -37,8 +37,9 @@ static inline bool linkmode_empty(const unsigned long *src) return bitmap_empty(src, __ETHTOOL_LINK_MODE_MASK_NBITS); } -static inline int linkmode_andnot(unsigned long *dst, const unsigned long *src1, - const unsigned long *src2) +static inline bool linkmode_andnot(unsigned long *dst, + const unsigned long *src1, + const unsigned long *src2) { return bitmap_andnot(dst, src1, src2, __ETHTOOL_LINK_MODE_MASK_NBITS); }