From: Uros Bizjak Date: Wed, 14 Aug 2024 07:06:38 +0000 (+0200) Subject: netdev: Add missing __percpu qualifier to a cast X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=d440af37ba6fa301144c6fce2186fe0ab5a8f283;p=linux.git 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 Link: https://patch.msgid.link/20240814070748.943671-1-ubizjak@gmail.com Signed-off-by: Jakub Kicinski --- 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);