netdev_alloc_pcpu_stats: use less common iterator variable
authorJohannes Berg <johannes.berg@intel.com>
Thu, 23 Apr 2015 10:06:30 +0000 (12:06 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 23 Apr 2015 15:38:14 +0000 (11:38 -0400)
With the CPU iteration variable called 'i', it's relatively easy
to have variable shadowing which sparse will warn about. Avoid
that by renaming the variable to __cpu which is less likely to
be used in the surrounding context.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/netdevice.h

index dae106a3a998a9d6483f069248c5366adb9c6682..dbad4d728b4bd8c3b9cfddcf81f05fb3327a5c74 100644 (file)
@@ -2025,10 +2025,10 @@ struct pcpu_sw_netstats {
 ({                                                             \
        typeof(type) __percpu *pcpu_stats = alloc_percpu(type); \
        if (pcpu_stats) {                                       \
-               int i;                                          \
-               for_each_possible_cpu(i) {                      \
+               int __cpu;                                      \
+               for_each_possible_cpu(__cpu) {                  \
                        typeof(type) *stat;                     \
-                       stat = per_cpu_ptr(pcpu_stats, i);      \
+                       stat = per_cpu_ptr(pcpu_stats, __cpu);  \
                        u64_stats_init(&stat->syncp);           \
                }                                               \
        }                                                       \