Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 27815032 authored by Li RongQing's avatar Li RongQing Committed by David S. Miller
Browse files

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: default avatarLi RongQing <roy.qing.li@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 10c9cbb1
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;