[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1364473451-3640-1-git-send-email-roy.qing.li@gmail.com>
Date: Thu, 28 Mar 2013 20:24:11 +0800
From: roy.qing.li@...il.com
To: netdev@...r.kernel.org
Subject: [PATCH net-next] core: simplify the getting percpu of flow_cache
From: Li RongQing <roy.qing.li@...il.com>
replace per_cpu with per_cpu_ptr to save conversion between address and pointer
Signed-off-by: Li RongQing <roy.qing.li@...il.com>
---
net/core/flow.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/core/flow.c b/net/core/flow.c
index 7fae135..707fb7b 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)
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;
--
1.7.10.4
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists