Message ID | 1446573701-7585-1-git-send-email-phil@nwl.cc |
---|---|
State | Accepted, archived |
Delegated to: | David Miller |
Headers | show |
From: Phil Sutter <phil@nwl.cc> Date: Tue, 3 Nov 2015 19:01:41 +0100 > It looks like this has never been used at all. > > Signed-off-by: Phil Sutter <phil@nwl.cc> Indeed, from day one this was completely unreferenced. One downside from marking so much stuff const is that an unreferenced static variable won't be warned as unused if it's const. Applied, thanks. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Tue, Nov 03, 2015 at 01:32:44PM -0500, David Miller wrote: > From: Phil Sutter <phil@nwl.cc> > Date: Tue, 3 Nov 2015 19:01:41 +0100 > > > It looks like this has never been used at all. > > > > Signed-off-by: Phil Sutter <phil@nwl.cc> > > Indeed, from day one this was completely unreferenced. I found it by accident when trying to find out whether choke was class-full or not. :) > One downside from marking so much stuff const is that an > unreferenced static variable won't be warned as unused if > it's const. Interestingly, this topic was picked up again only just two months ago[1]. Not sure though if that could be used for kernel code with all it's specialties. Cheers, Phil [1]: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=28901 -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/net/sched/sch_choke.c b/net/sched/sch_choke.c index 02bfd3d..5ffb8b8 100644 --- a/net/sched/sch_choke.c +++ b/net/sched/sch_choke.c @@ -553,65 +553,6 @@ static void choke_destroy(struct Qdisc *sch) choke_free(q->tab); } -static struct Qdisc *choke_leaf(struct Qdisc *sch, unsigned long arg) -{ - return NULL; -} - -static unsigned long choke_get(struct Qdisc *sch, u32 classid) -{ - return 0; -} - -static void choke_put(struct Qdisc *q, unsigned long cl) -{ -} - -static unsigned long choke_bind(struct Qdisc *sch, unsigned long parent, - u32 classid) -{ - return 0; -} - -static struct tcf_proto __rcu **choke_find_tcf(struct Qdisc *sch, - unsigned long cl) -{ - struct choke_sched_data *q = qdisc_priv(sch); - - if (cl) - return NULL; - return &q->filter_list; -} - -static int choke_dump_class(struct Qdisc *sch, unsigned long cl, - struct sk_buff *skb, struct tcmsg *tcm) -{ - tcm->tcm_handle |= TC_H_MIN(cl); - return 0; -} - -static void choke_walk(struct Qdisc *sch, struct qdisc_walker *arg) -{ - if (!arg->stop) { - if (arg->fn(sch, 1, arg) < 0) { - arg->stop = 1; - return; - } - arg->count++; - } -} - -static const struct Qdisc_class_ops choke_class_ops = { - .leaf = choke_leaf, - .get = choke_get, - .put = choke_put, - .tcf_chain = choke_find_tcf, - .bind_tcf = choke_bind, - .unbind_tcf = choke_put, - .dump = choke_dump_class, - .walk = choke_walk, -}; - static struct sk_buff *choke_peek_head(struct Qdisc *sch) { struct choke_sched_data *q = qdisc_priv(sch);
It looks like this has never been used at all. Signed-off-by: Phil Sutter <phil@nwl.cc> --- net/sched/sch_choke.c | 59 --------------------------------------------------- 1 file changed, 59 deletions(-)