diff options
author | WANG Cong <xiyou.wangcong@gmail.com> | 2014-10-06 20:01:33 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-10-07 00:10:49 -0400 |
commit | 02c0fc1b8f41e6e895d6573615ba8ff549b685d2 (patch) | |
tree | e3fdb0296ca14cbff970df355798c7bbf75681d8 /net | |
parent | 7c5df8fa1921450d2210db9928f43cf4f414982c (diff) |
net_sched: fix unused variables in __gnet_stats_copy_basic_cpu()
Probably not a big deal, but we'd better just use the
one we get in retry loop.
Fixes: commit 22e0f8b9322cb1a48b1357e8 ("net: sched: make bstats per cpu and estimator RCU safe")
Reported-by: Joe Perches <joe@perches.com>
Cc: John Fastabend <john.fastabend@gmail.com>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/core/gen_stats.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/net/core/gen_stats.c b/net/core/gen_stats.c index 14681b97a4f3..0c08062d1796 100644 --- a/net/core/gen_stats.c +++ b/net/core/gen_stats.c | |||
@@ -106,8 +106,8 @@ __gnet_stats_copy_basic_cpu(struct gnet_stats_basic_packed *bstats, | |||
106 | for_each_possible_cpu(i) { | 106 | for_each_possible_cpu(i) { |
107 | struct gnet_stats_basic_cpu *bcpu = per_cpu_ptr(cpu, i); | 107 | struct gnet_stats_basic_cpu *bcpu = per_cpu_ptr(cpu, i); |
108 | unsigned int start; | 108 | unsigned int start; |
109 | __u64 bytes; | 109 | u64 bytes; |
110 | __u32 packets; | 110 | u32 packets; |
111 | 111 | ||
112 | do { | 112 | do { |
113 | start = u64_stats_fetch_begin_irq(&bcpu->syncp); | 113 | start = u64_stats_fetch_begin_irq(&bcpu->syncp); |
@@ -115,8 +115,8 @@ __gnet_stats_copy_basic_cpu(struct gnet_stats_basic_packed *bstats, | |||
115 | packets = bcpu->bstats.packets; | 115 | packets = bcpu->bstats.packets; |
116 | } while (u64_stats_fetch_retry_irq(&bcpu->syncp, start)); | 116 | } while (u64_stats_fetch_retry_irq(&bcpu->syncp, start)); |
117 | 117 | ||
118 | bstats->bytes += bcpu->bstats.bytes; | 118 | bstats->bytes += bytes; |
119 | bstats->packets += bcpu->bstats.packets; | 119 | bstats->packets += packets; |
120 | } | 120 | } |
121 | } | 121 | } |
122 | 122 | ||