aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/netdevice.h
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2015-04-23 06:06:30 -0400
committerDavid S. Miller <davem@davemloft.net>2015-04-23 11:38:14 -0400
commitec65aafb9e3f316ff9167289e288856a7d528773 (patch)
tree6cbd780b138adf04c0da03e811d937e6a54f5720 /include/linux/netdevice.h
parent608404290e2d9d1756db4013c4ee12fa7617dad9 (diff)
netdev_alloc_pcpu_stats: use less common iterator variable
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>
Diffstat (limited to 'include/linux/netdevice.h')
-rw-r--r--include/linux/netdevice.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index dae106a3a998..dbad4d728b4b 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -2025,10 +2025,10 @@ struct pcpu_sw_netstats {
2025({ \ 2025({ \
2026 typeof(type) __percpu *pcpu_stats = alloc_percpu(type); \ 2026 typeof(type) __percpu *pcpu_stats = alloc_percpu(type); \
2027 if (pcpu_stats) { \ 2027 if (pcpu_stats) { \
2028 int i; \ 2028 int __cpu; \
2029 for_each_possible_cpu(i) { \ 2029 for_each_possible_cpu(__cpu) { \
2030 typeof(type) *stat; \ 2030 typeof(type) *stat; \
2031 stat = per_cpu_ptr(pcpu_stats, i); \ 2031 stat = per_cpu_ptr(pcpu_stats, __cpu); \
2032 u64_stats_init(&stat->syncp); \ 2032 u64_stats_init(&stat->syncp); \
2033 } \ 2033 } \
2034 } \ 2034 } \