diff options
Diffstat (limited to 'drivers/net/loopback.c')
-rw-r--r-- | drivers/net/loopback.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/net/loopback.c b/drivers/net/loopback.c index 690a1aae0b34..0c13795dca38 100644 --- a/drivers/net/loopback.c +++ b/drivers/net/loopback.c | |||
@@ -172,11 +172,9 @@ static struct net_device_stats *get_stats(struct net_device *dev) | |||
172 | 172 | ||
173 | memset(stats, 0, sizeof(struct net_device_stats)); | 173 | memset(stats, 0, sizeof(struct net_device_stats)); |
174 | 174 | ||
175 | for (i=0; i < NR_CPUS; i++) { | 175 | for_each_cpu(i) { |
176 | struct net_device_stats *lb_stats; | 176 | struct net_device_stats *lb_stats; |
177 | 177 | ||
178 | if (!cpu_possible(i)) | ||
179 | continue; | ||
180 | lb_stats = &per_cpu(loopback_stats, i); | 178 | lb_stats = &per_cpu(loopback_stats, i); |
181 | stats->rx_bytes += lb_stats->rx_bytes; | 179 | stats->rx_bytes += lb_stats->rx_bytes; |
182 | stats->tx_bytes += lb_stats->tx_bytes; | 180 | stats->tx_bytes += lb_stats->tx_bytes; |