]> Pileus Git - ~andy/linux/commitdiff
net: simplify the getting percpu of flow_cache
authorLi RongQing <roy.qing.li@gmail.com>
Thu, 28 Mar 2013 02:24:11 +0000 (02:24 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 29 Mar 2013 19:14:46 +0000 (15:14 -0400)
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>
net/core/flow.c

index 7fae13537b6b4d9e1da908a0b9c2448984850904..707fb7b952e82d9de014544df4f805f5f4cc3b00 100644 (file)
@@ -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;