Skip to content

Commit 833e0e2

Browse files
Jakub Kicinskidavem330
authored andcommitted
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: d66f2b9 ("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>
1 parent f44dea3 commit 833e0e2

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎net/core/dst.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,9 +325,9 @@ EXPORT_SYMBOL_GPL(metadata_dst_alloc_percpu);
325325

326326
void metadata_dst_free_percpu(struct metadata_dst __percpu *md_dst)
327327
{
328+
#ifdef CONFIG_DST_CACHE
328329
int cpu;
329330

330-
#ifdef CONFIG_DST_CACHE
331331
for_each_possible_cpu(cpu) {
332332
struct metadata_dst *one_md_dst = per_cpu_ptr(md_dst, cpu);
333333

0 commit comments

Comments
 (0)