Commit 6d1c9cd3 authored by Hui Tang's avatar Hui Tang Committed by Zhong Jinghua
Browse files

sched: programmable: Fix build error for nr_cpus_ids

hulk inclusion
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I645C7


CVE: NA

--------------------------------

When !CONFIG_SMP && CONFIG_BPF_SCHED, it will build error, as follows:

./include/linux/cpumask.h:37:33: error: expected identifier or ‘(’ before numeric constant
   37 | #define nr_cpu_ids              1U
      |                                 ^~
./include/linux/bpf_topology.h:39:22: note: in expansion of macro ‘nr_cpu_ids’
   39 |         unsigned int nr_cpu_ids;
      |                      ^~~~~~~~~~
kernel/sched/bpf_topology.c: In function ‘____bpf_get_cpumask_info’:
./include/linux/cpumask.h:37:33: error: expected identifier before numeric constant
   37 | #define nr_cpu_ids              1U
      |                                 ^~
kernel/sched/bpf_topology.c:75:15: note: in expansion of macro ‘nr_cpu_ids’
   75 |         cpus->nr_cpu_ids = nr_cpu_ids;

Fixes: f333bd68 ("sched: programmable: Add helper function for...")
Signed-off-by: default avatarHui Tang <tanghui20@huawei.com>
parent b55886e8
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment