* [PATCH net-next] linkmode: Change return type of linkmode_andnot to bool
@ 2024-08-01 20:00 Simon Horman
2024-08-02 23:40 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: Simon Horman @ 2024-08-01 20:00 UTC (permalink / raw)
To: Andrew Lunn, Heiner Kallweit, Russell King; +Cc: netdev
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>
---
include/linux/linkmode.h | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/include/linux/linkmode.h b/include/linux/linkmode.h
index d94bfd9ac8cc..3b9de09871f6 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);
}
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net-next] linkmode: Change return type of linkmode_andnot to bool
2024-08-01 20:00 [PATCH net-next] linkmode: Change return type of linkmode_andnot to bool Simon Horman
@ 2024-08-02 23:40 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2024-08-02 23:40 UTC (permalink / raw)
To: Simon Horman; +Cc: andrew, hkallweit1, linux, netdev
Hello:
This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Thu, 01 Aug 2024 21:00:03 +0100 you wrote:
> 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.
>
> [...]
Here is the summary with links:
- [net-next] linkmode: Change return type of linkmode_andnot to bool
https://git.kernel.org/netdev/net-next/c/7e1d512dab50
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-08-02 23:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-01 20:00 [PATCH net-next] linkmode: Change return type of linkmode_andnot to bool Simon Horman
2024-08-02 23:40 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).