[congwang:sch_bpf2 2/2] net/sched/sch_bpf.c:90:13: error: unused variable 'bpf_flags'
From: kernel test robot
Date: Sat Sep 11 2021 - 22:29:32 EST
tree: https://github.com/congwang/linux.git sch_bpf2
head: 470563412d91de9179d50b7f311a39f1a46321ab
commit: 470563412d91de9179d50b7f311a39f1a46321ab [2/2] net_sched: introduce eBPF based Qdisc
config: powerpc-allyesconfig (attached as .config)
compiler: powerpc64-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/congwang/linux/commit/470563412d91de9179d50b7f311a39f1a46321ab
git remote add congwang https://github.com/congwang/linux.git
git fetch --no-tags congwang sch_bpf2
git checkout 470563412d91de9179d50b7f311a39f1a46321ab
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=powerpc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>
All errors (new ones prefixed by >>):
net/sched/sch_bpf.c: In function 'sch_bpf_dump':
>> net/sched/sch_bpf.c:90:13: error: unused variable 'bpf_flags' [-Werror=unused-variable]
90 | u32 bpf_flags = 0;
| ^~~~~~~~~
net/sched/sch_bpf.c: In function 'sch_bpf_dump_class_stats':
net/sched/sch_bpf.c:535:31: error: unused variable 'q' [-Werror=unused-variable]
535 | struct sch_bpf_qdisc *q = qdisc_priv(sch);
| ^
cc1: all warnings being treated as errors
vim +/bpf_flags +90 net/sched/sch_bpf.c
85
86 static int sch_bpf_dump(struct Qdisc *sch, struct sk_buff *skb)
87 {
88 struct sch_bpf_qdisc *q = qdisc_priv(sch);
89 struct nlattr *opts;
> 90 u32 bpf_flags = 0;
91
92 opts = nla_nest_start_noflag(skb, TCA_OPTIONS);
93 if (!opts)
94 goto nla_put_failure;
95
96 if (nla_put_u32(skb, TCA_SCH_BPF_MODE, q->mode))
97 goto nla_put_failure;
98
99 if (sch_bpf_dump_prog(&q->enqueue_prog, skb, TCA_SCH_BPF_ENQUEUE_PROG_NAME,
100 TCA_SCH_BPF_ENQUEUE_PROG_ID, TCA_SCH_BPF_ENQUEUE_PROG_TAG))
101 goto nla_put_failure;
102 if (sch_bpf_dump_prog(&q->dequeue_prog, skb, TCA_SCH_BPF_DEQUEUE_PROG_NAME,
103 TCA_SCH_BPF_DEQUEUE_PROG_ID, TCA_SCH_BPF_DEQUEUE_PROG_TAG))
104 goto nla_put_failure;
105
106 return nla_nest_end(skb, opts);
107
108 nla_put_failure:
109 return -1;
110 }
111
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx
Attachment:
.config.gz
Description: application/gzip