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

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.com


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent fcb1aa51
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);