Re: [PATCH net-next] fq_codel: remove set but not used variables 'prev_ecn_mark' and 'prev_drop_count'

From: David Miller
Date: Fri Aug 09 2019 - 01:31:40 EST


From: YueHaibing <yuehaibing@xxxxxxxxxx>
Date: Wed, 7 Aug 2019 21:10:55 +0800

> Fixes gcc '-Wunused-but-set-variable' warning:
>
> net/sched/sch_fq_codel.c: In function fq_codel_dequeue:
> net/sched/sch_fq_codel.c:288:23: warning: variable prev_ecn_mark set but not used [-Wunused-but-set-variable]
> net/sched/sch_fq_codel.c:288:6: warning: variable prev_drop_count set but not used [-Wunused-but-set-variable]
>
> They are not used since commit 77ddaff218fc ("fq_codel: Kill
> useless per-flow dropped statistic")
>
> Reported-by: Hulk Robot <hulkci@xxxxxxxxxx>
> Signed-off-by: YueHaibing <yuehaibing@xxxxxxxxxx>

Do you even compile test this stuff?

CC [M] net/sched/sch_fq_codel.o
net/sched/sch_fq_codel.c: In function ʽfq_codel_dequeueʼ:
net/sched/sch_fq_codel.c:309:42: error: ʽprev_drop_countʼ undeclared (first use in this function); did you mean ʽpage_ref_countʼ?
flow->dropped += q->cstats.drop_count - prev_drop_count;
^~~~~~~~~~~~~~~
page_ref_count
net/sched/sch_fq_codel.c:309:42: note: each undeclared identifier is reported only once for each function it appears in
net/sched/sch_fq_codel.c:310:40: error: ʽprev_ecn_markʼ undeclared (first use in this function); did you mean ʽpmd_pfn_maskʼ?
flow->dropped += q->cstats.ecn_mark - prev_ecn_mark;
^~~~~~~~~~~~~
pmd_pfn_mask
make[1]: *** [scripts/Makefile.build:274: net/sched/sch_fq_codel.o] Error 1
make: *** [Makefile:1769: net/sched/sch_fq_codel.o] Error 2