Commit d440af37 authored by Uros Bizjak's avatar Uros Bizjak Committed by Jakub Kicinski

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: default avatarUros Bizjak <ubizjak@gmail.com>
Link: https://patch.msgid.link/20240814070748.943671-1-ubizjak@gmail.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent fcb1aa51
...@@ -10868,7 +10868,7 @@ noinline void netdev_core_stats_inc(struct net_device *dev, u32 offset) ...@@ -10868,7 +10868,7 @@ noinline void netdev_core_stats_inc(struct net_device *dev, u32 offset)
return; return;
} }
field = (__force unsigned long __percpu *)((__force void *)p + offset); field = (unsigned long __percpu *)((void __percpu *)p + offset);
this_cpu_inc(*field); this_cpu_inc(*field);
} }
EXPORT_SYMBOL_GPL(netdev_core_stats_inc); EXPORT_SYMBOL_GPL(netdev_core_stats_inc);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment