aboutsummaryrefslogtreecommitdiffstats
path: root/net/core
diff options
context:
space:
mode:
authorLi RongQing <roy.qing.li@gmail.com>2013-03-27 22:24:11 -0400
committerDavid S. Miller <davem@davemloft.net>2013-03-29 15:14:46 -0400
commit278150321a3f5af85803e1214807ca5cfbace0e1 (patch)
tree55b8bc67add42074bc78ea8ea22f8844b5872b56 /net/core
parent10c9cbb10fa035d20c8ff2e231780617c6c70ee7 (diff)
net: simplify the getting percpu of flow_cache
replace per_cpu with per_cpu_ptr to save conversion between address and pointer Signed-off-by: Li RongQing <roy.qing.li@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core')
-rw-r--r--net/core/flow.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/core/flow.c b/net/core/flow.c
index 7fae13537b6b..707fb7b952e8 100644
--- a/net/core/flow.c
+++ b/net/core/flow.c
@@ -334,7 +334,7 @@ static int flow_cache_percpu_empty(struct flow_cache *fc, int cpu)
334 struct flow_cache_percpu *fcp; 334 struct flow_cache_percpu *fcp;
335 int i; 335 int i;
336 336
337 fcp = &per_cpu(*fc->percpu, cpu); 337 fcp = per_cpu_ptr(fc->percpu, cpu);
338 for (i = 0; i < flow_cache_hash_size(fc); i++) 338 for (i = 0; i < flow_cache_hash_size(fc); i++)
339 if (!hlist_empty(&fcp->hash_table[i])) 339 if (!hlist_empty(&fcp->hash_table[i]))
340 return 0; 340 return 0;