summaryrefslogtreecommitdiff
path: root/net/core
diff options
context:
space:
mode:
authorUros Bizjak <ubizjak@gmail.com>2024-08-14 09:06:38 +0200
committerJakub Kicinski <kuba@kernel.org>2024-08-15 19:10:01 -0700
commitd440af37ba6fa301144c6fce2186fe0ab5a8f283 (patch)
treeb0fe078bfaf427509e50415161bfb1196785b7c1 /net/core
parentfcb1aa5163b1ae4cf2864b688b08927aac51f51e (diff)
netdev: Add missing __percpu qualifier to a cast
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> Link: https://patch.msgid.link/20240814070748.943671-1-ubizjak@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/core')
-rw-r--r--net/core/dev.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/core/dev.c b/net/core/dev.c
index f66e61407883..e7260889d4cb 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -10868,7 +10868,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);