* [PATCH net-next] fq_codel: remove set but not used variables 'prev_ecn_mark' and 'prev_drop_count'
@ 2019-08-07 13:10 YueHaibing
2019-08-09 5:31 ` David Miller
0 siblings, 1 reply; 3+ messages in thread
From: YueHaibing @ 2019-08-07 13:10 UTC (permalink / raw)
To: davem, jhs, xiyou.wangcong, jiri, dave.taht
Cc: linux-kernel, netdev, YueHaibing
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@huawei.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
net/sched/sch_fq_codel.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/net/sched/sch_fq_codel.c b/net/sched/sch_fq_codel.c
index 9edd0f4..c261c0a 100644
--- a/net/sched/sch_fq_codel.c
+++ b/net/sched/sch_fq_codel.c
@@ -285,7 +285,6 @@ static struct sk_buff *fq_codel_dequeue(struct Qdisc *sch)
struct sk_buff *skb;
struct fq_codel_flow *flow;
struct list_head *head;
- u32 prev_drop_count, prev_ecn_mark;
begin:
head = &q->new_flows;
@@ -302,9 +301,6 @@ static struct sk_buff *fq_codel_dequeue(struct Qdisc *sch)
goto begin;
}
- prev_drop_count = q->cstats.drop_count;
- prev_ecn_mark = q->cstats.ecn_mark;
-
skb = codel_dequeue(sch, &sch->qstats.backlog, &q->cparams,
&flow->cvars, &q->cstats, qdisc_pkt_len,
codel_get_enqueue_time, drop_func, dequeue_func);
--
2.7.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] fq_codel: remove set but not used variables 'prev_ecn_mark' and 'prev_drop_count'
2019-08-07 13:10 [PATCH net-next] fq_codel: remove set but not used variables 'prev_ecn_mark' and 'prev_drop_count' YueHaibing
@ 2019-08-09 5:31 ` David Miller
2019-08-09 5:32 ` David Miller
0 siblings, 1 reply; 3+ messages in thread
From: David Miller @ 2019-08-09 5:31 UTC (permalink / raw)
To: yuehaibing; +Cc: jhs, xiyou.wangcong, jiri, dave.taht, linux-kernel, netdev
From: YueHaibing <yuehaibing@huawei.com>
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@huawei.com>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] fq_codel: remove set but not used variables 'prev_ecn_mark' and 'prev_drop_count'
2019-08-09 5:31 ` David Miller
@ 2019-08-09 5:32 ` David Miller
0 siblings, 0 replies; 3+ messages in thread
From: David Miller @ 2019-08-09 5:32 UTC (permalink / raw)
To: yuehaibing; +Cc: jhs, xiyou.wangcong, jiri, dave.taht, linux-kernel, netdev
From: David Miller <davem@davemloft.net>
Date: Thu, 08 Aug 2019 22:31:36 -0700 (PDT)
> From: YueHaibing <yuehaibing@huawei.com>
> 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@huawei.com>
>> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
>
> 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’?
Never mind, this is my fault.
I was build testing the patch on the wrong tree, I'm very sorry.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-08-09 5:32 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-07 13:10 [PATCH net-next] fq_codel: remove set but not used variables 'prev_ecn_mark' and 'prev_drop_count' YueHaibing
2019-08-09 5:31 ` David Miller
2019-08-09 5:32 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).