linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ethtool: netlink: Slightly simplify 'ethnl_features_to_bitmap()'
@ 2021-11-28 11:03 Christophe JAILLET
  2021-11-30  4:30 ` patchwork-bot+netdevbpf
  0 siblings, 1 reply; 2+ messages in thread
From: Christophe JAILLET @ 2021-11-28 11:03 UTC (permalink / raw)
  To: davem, kuba; +Cc: netdev, linux-kernel, kernel-janitors, Christophe JAILLET

The 'dest' bitmap is fully initialized by the 'for' loop, so there is no
need to explicitly reset it.

This also makes this function in line with 'ethnl_features_to_bitmap32()'
which does not clear the destination before writing it.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
 net/ethtool/features.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/net/ethtool/features.c b/net/ethtool/features.c
index 1c9f4df273bd..2e7331b23996 100644
--- a/net/ethtool/features.c
+++ b/net/ethtool/features.c
@@ -136,7 +136,6 @@ static void ethnl_features_to_bitmap(unsigned long *dest, netdev_features_t val)
 	const unsigned int words = BITS_TO_LONGS(NETDEV_FEATURE_COUNT);
 	unsigned int i;
 
-	bitmap_zero(dest, NETDEV_FEATURE_COUNT);
 	for (i = 0; i < words; i++)
 		dest[i] = (unsigned long)(val >> (i * BITS_PER_LONG));
 }
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ethtool: netlink: Slightly simplify 'ethnl_features_to_bitmap()'
  2021-11-28 11:03 [PATCH] ethtool: netlink: Slightly simplify 'ethnl_features_to_bitmap()' Christophe JAILLET
@ 2021-11-30  4:30 ` patchwork-bot+netdevbpf
  0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-11-30  4:30 UTC (permalink / raw)
  To: Christophe JAILLET; +Cc: davem, kuba, netdev, linux-kernel, kernel-janitors

Hello:

This patch was applied to netdev/net-next.git (master)
by Jakub Kicinski <kuba@kernel.org>:

On Sun, 28 Nov 2021 12:03:30 +0100 you wrote:
> The 'dest' bitmap is fully initialized by the 'for' loop, so there is no
> need to explicitly reset it.
> 
> This also makes this function in line with 'ethnl_features_to_bitmap32()'
> which does not clear the destination before writing it.
> 
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> 
> [...]

Here is the summary with links:
  - ethtool: netlink: Slightly simplify 'ethnl_features_to_bitmap()'
    https://git.kernel.org/netdev/net-next/c/72a2ff567fc3

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:[~2021-11-30  4:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-28 11:03 [PATCH] ethtool: netlink: Slightly simplify 'ethnl_features_to_bitmap()' Christophe JAILLET
2021-11-30  4:30 ` 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).