Message ID | 20240814070748.943671-1-ubizjak@gmail.com (mailing list archive) |
---|---|
State | Accepted |
Commit | d440af37ba6fa301144c6fce2186fe0ab5a8f283 |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | netdev: Add missing __percpu qualifier to a cast | expand |
Hello: This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <kuba@kernel.org>: On Wed, 14 Aug 2024 09:06:38 +0200 you wrote: > Add missing __percpu qualifier to a (void *) cast to fix > > dev.c:10863:45: warning: cast removes address space '__percpu' of expression > > sparse warning. Also remove now unneeded __force sparse directives. > > Found by GCC's named address space checks. > > [...] Here is the summary with links: - netdev: Add missing __percpu qualifier to a cast https://git.kernel.org/netdev/net-next/c/d440af37ba6f You are awesome, thank you!
diff --git a/net/core/dev.c b/net/core/dev.c index 751d9b70e6ad..0af344769ecc 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -10860,7 +10860,7 @@ noinline void netdev_core_stats_inc(struct net_device *dev, u32 offset) return; } - field = (__force unsigned long __percpu *)((__force void *)p + offset); + field = (unsigned long __percpu *)((void __percpu *)p + offset); this_cpu_inc(*field); } EXPORT_SYMBOL_GPL(netdev_core_stats_inc);
Add missing __percpu qualifier to a (void *) cast to fix dev.c:10863:45: warning: cast removes address space '__percpu' of expression sparse warning. Also remove now unneeded __force sparse directives. Found by GCC's named address space checks. There were no changes in the resulting object file. Signed-off-by: Uros Bizjak <ubizjak@gmail.com> Cc: "David S. Miller" <davem@davemloft.net> Cc: Eric Dumazet <edumazet@google.com> Cc: Jakub Kicinski <kuba@kernel.org> Cc: Paolo Abeni <pabeni@redhat.com> --- net/core/dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)