Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <fengguang.wu@intel.com>
Fixes: d66f2b91f95b ("bpf: don't rely on the verifier lock for metadata_dst allocation")
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Jakub Kicinski and committed by
David S. Miller
833e0e2f f44dea34

+1 -1
+1 -1
net/core/dst.c
··· 325 325 326 326 void metadata_dst_free_percpu(struct metadata_dst __percpu *md_dst) 327 327 { 328 + #ifdef CONFIG_DST_CACHE 328 329 int cpu; 329 330 330 - #ifdef CONFIG_DST_CACHE 331 331 for_each_possible_cpu(cpu) { 332 332 struct metadata_dst *one_md_dst = per_cpu_ptr(md_dst, cpu); 333 333