From: Jakub Kicinski Date: Tue, 10 Oct 2017 22:05:39 +0000 (-0700) Subject: net: dst: move cpu inside ifdef to avoid compilation warning X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=833e0e2f24fd0525090878f71e129a8a4cb8bf78;p=openwrt%2Fstaging%2Fblogic.git net: dst: move cpu inside ifdef to avoid compilation warning If CONFIG_DST_CACHE is not selected cpu variable will be unused and we will see a compilation warning. Move it under the ifdef. Reported-by: kbuild test robot Fixes: d66f2b91f95b ("bpf: don't rely on the verifier lock for metadata_dst allocation") Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller --- diff --git a/net/core/dst.c b/net/core/dst.c index 8b2eafac984d..662a2d4a3d19 100644 --- a/net/core/dst.c +++ b/net/core/dst.c @@ -325,9 +325,9 @@ EXPORT_SYMBOL_GPL(metadata_dst_alloc_percpu); void metadata_dst_free_percpu(struct metadata_dst __percpu *md_dst) { +#ifdef CONFIG_DST_CACHE int cpu; -#ifdef CONFIG_DST_CACHE for_each_possible_cpu(cpu) { struct metadata_dst *one_md_dst = per_cpu_ptr(md_dst, cpu);