Browse Source

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>
Li RongQing 12 years ago
parent
commit
278150321a
1 changed files with 1 additions and 1 deletions
  1. 1 1
      net/core/flow.c

+ 1 - 1
net/core/flow.c

@@ -334,7 +334,7 @@ static int flow_cache_percpu_empty(struct flow_cache *fc, int cpu)
 	struct flow_cache_percpu *fcp;
 	int i;
 
-	fcp = &per_cpu(*fc->percpu, cpu);
+	fcp = per_cpu_ptr(fc->percpu, cpu);
 	for (i = 0; i < flow_cache_hash_size(fc); i++)
 		if (!hlist_empty(&fcp->hash_table[i]))
 			return 0;