mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 20:48:49 +08:00
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: d66f2b91f9
("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>
This commit is contained in:
parent
f44dea3421
commit
833e0e2f24
@ -325,9 +325,9 @@ EXPORT_SYMBOL_GPL(metadata_dst_alloc_percpu);
|
|||||||
|
|
||||||
void metadata_dst_free_percpu(struct metadata_dst __percpu *md_dst)
|
void metadata_dst_free_percpu(struct metadata_dst __percpu *md_dst)
|
||||||
{
|
{
|
||||||
|
#ifdef CONFIG_DST_CACHE
|
||||||
int cpu;
|
int cpu;
|
||||||
|
|
||||||
#ifdef CONFIG_DST_CACHE
|
|
||||||
for_each_possible_cpu(cpu) {
|
for_each_possible_cpu(cpu) {
|
||||||
struct metadata_dst *one_md_dst = per_cpu_ptr(md_dst, cpu);
|
struct metadata_dst *one_md_dst = per_cpu_ptr(md_dst, cpu);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user