Skip to content

Commit 57d743a

Browse files
jpirkodavem330
authored andcommitted
net: sched: cls: remove unused op put from tcf_proto_ops
It is never called and implementations are void. So just remove it. Signed-off-by: Jiri Pirko <jiri@resnulli.us> Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 02dc402 commit 57d743a

10 files changed

Lines changed: 0 additions & 49 deletions

File tree

‎include/net/sch_generic.h‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,6 @@ struct tcf_proto_ops {
219219
void (*destroy)(struct tcf_proto*);
220220

221221
unsigned long (*get)(struct tcf_proto*, u32 handle);
222-
void (*put)(struct tcf_proto*, unsigned long);
223222
int (*change)(struct net *net, struct sk_buff *,
224223
struct tcf_proto*, unsigned long,
225224
u32 handle, struct nlattr **,

‎net/sched/cls_basic.c‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,6 @@ static unsigned long basic_get(struct tcf_proto *tp, u32 handle)
7272
return l;
7373
}
7474

75-
static void basic_put(struct tcf_proto *tp, unsigned long f)
76-
{
77-
}
78-
7975
static int basic_init(struct tcf_proto *tp)
8076
{
8177
struct basic_head *head;
@@ -287,7 +283,6 @@ static struct tcf_proto_ops cls_basic_ops __read_mostly = {
287283
.init = basic_init,
288284
.destroy = basic_destroy,
289285
.get = basic_get,
290-
.put = basic_put,
291286
.change = basic_change,
292287
.delete = basic_delete,
293288
.walk = basic_walk,

‎net/sched/cls_bpf.c‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -151,10 +151,6 @@ static unsigned long cls_bpf_get(struct tcf_proto *tp, u32 handle)
151151
return ret;
152152
}
153153

154-
static void cls_bpf_put(struct tcf_proto *tp, unsigned long f)
155-
{
156-
}
157-
158154
static int cls_bpf_modify_existing(struct net *net, struct tcf_proto *tp,
159155
struct cls_bpf_prog *prog,
160156
unsigned long base, struct nlattr **tb,
@@ -356,7 +352,6 @@ static struct tcf_proto_ops cls_bpf_ops __read_mostly = {
356352
.init = cls_bpf_init,
357353
.destroy = cls_bpf_destroy,
358354
.get = cls_bpf_get,
359-
.put = cls_bpf_put,
360355
.change = cls_bpf_change,
361356
.delete = cls_bpf_delete,
362357
.walk = cls_bpf_walk,

‎net/sched/cls_cgroup.c‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,6 @@ static unsigned long cls_cgroup_get(struct tcf_proto *tp, u32 handle)
6767
return 0UL;
6868
}
6969

70-
static void cls_cgroup_put(struct tcf_proto *tp, unsigned long f)
71-
{
72-
}
73-
7470
static int cls_cgroup_init(struct tcf_proto *tp)
7571
{
7672
return 0;
@@ -213,7 +209,6 @@ static struct tcf_proto_ops cls_cgroup_ops __read_mostly = {
213209
.classify = cls_cgroup_classify,
214210
.destroy = cls_cgroup_destroy,
215211
.get = cls_cgroup_get,
216-
.put = cls_cgroup_put,
217212
.delete = cls_cgroup_delete,
218213
.walk = cls_cgroup_walk,
219214
.dump = cls_cgroup_dump,

‎net/sched/cls_flow.c‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -581,10 +581,6 @@ static unsigned long flow_get(struct tcf_proto *tp, u32 handle)
581581
return 0;
582582
}
583583

584-
static void flow_put(struct tcf_proto *tp, unsigned long f)
585-
{
586-
}
587-
588584
static int flow_dump(struct net *net, struct tcf_proto *tp, unsigned long fh,
589585
struct sk_buff *skb, struct tcmsg *t)
590586
{
@@ -671,7 +667,6 @@ static struct tcf_proto_ops cls_flow_ops __read_mostly = {
671667
.change = flow_change,
672668
.delete = flow_delete,
673669
.get = flow_get,
674-
.put = flow_put,
675670
.dump = flow_dump,
676671
.walk = flow_walk,
677672
.owner = THIS_MODULE,

‎net/sched/cls_fw.c‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -111,10 +111,6 @@ static unsigned long fw_get(struct tcf_proto *tp, u32 handle)
111111
return 0;
112112
}
113113

114-
static void fw_put(struct tcf_proto *tp, unsigned long f)
115-
{
116-
}
117-
118114
static int fw_init(struct tcf_proto *tp)
119115
{
120116
return 0;
@@ -411,7 +407,6 @@ static struct tcf_proto_ops cls_fw_ops __read_mostly = {
411407
.init = fw_init,
412408
.destroy = fw_destroy,
413409
.get = fw_get,
414-
.put = fw_put,
415410
.change = fw_change,
416411
.delete = fw_delete,
417412
.walk = fw_walk,

‎net/sched/cls_route.c‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -256,10 +256,6 @@ static unsigned long route4_get(struct tcf_proto *tp, u32 handle)
256256
return 0;
257257
}
258258

259-
static void route4_put(struct tcf_proto *tp, unsigned long f)
260-
{
261-
}
262-
263259
static int route4_init(struct tcf_proto *tp)
264260
{
265261
return 0;
@@ -649,7 +645,6 @@ static struct tcf_proto_ops cls_route4_ops __read_mostly = {
649645
.init = route4_init,
650646
.destroy = route4_destroy,
651647
.get = route4_get,
652-
.put = route4_put,
653648
.change = route4_change,
654649
.delete = route4_delete,
655650
.walk = route4_walk,

‎net/sched/cls_rsvp.h‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -271,10 +271,6 @@ static unsigned long rsvp_get(struct tcf_proto *tp, u32 handle)
271271
return 0;
272272
}
273273

274-
static void rsvp_put(struct tcf_proto *tp, unsigned long f)
275-
{
276-
}
277-
278274
static int rsvp_init(struct tcf_proto *tp)
279275
{
280276
struct rsvp_head *data;
@@ -708,7 +704,6 @@ static struct tcf_proto_ops RSVP_OPS __read_mostly = {
708704
.init = rsvp_init,
709705
.destroy = rsvp_destroy,
710706
.get = rsvp_get,
711-
.put = rsvp_put,
712707
.change = rsvp_change,
713708
.delete = rsvp_delete,
714709
.walk = rsvp_walk,

‎net/sched/cls_tcindex.c‎

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -116,13 +116,6 @@ static unsigned long tcindex_get(struct tcf_proto *tp, u32 handle)
116116
return r && tcindex_filter_is_set(r) ? (unsigned long) r : 0UL;
117117
}
118118

119-
120-
static void tcindex_put(struct tcf_proto *tp, unsigned long f)
121-
{
122-
pr_debug("tcindex_put(tp %p,f 0x%lx)\n", tp, f);
123-
}
124-
125-
126119
static int tcindex_init(struct tcf_proto *tp)
127120
{
128121
struct tcindex_data *p;
@@ -560,7 +553,6 @@ static struct tcf_proto_ops cls_tcindex_ops __read_mostly = {
560553
.init = tcindex_init,
561554
.destroy = tcindex_destroy,
562555
.get = tcindex_get,
563-
.put = tcindex_put,
564556
.change = tcindex_change,
565557
.delete = tcindex_delete,
566558
.walk = tcindex_walk,

‎net/sched/cls_u32.c‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -299,10 +299,6 @@ static unsigned long u32_get(struct tcf_proto *tp, u32 handle)
299299
return (unsigned long)u32_lookup_key(ht, handle);
300300
}
301301

302-
static void u32_put(struct tcf_proto *tp, unsigned long f)
303-
{
304-
}
305-
306302
static u32 gen_new_htid(struct tc_u_common *tp_c)
307303
{
308304
int i = 0x800;
@@ -1021,7 +1017,6 @@ static struct tcf_proto_ops cls_u32_ops __read_mostly = {
10211017
.init = u32_init,
10221018
.destroy = u32_destroy,
10231019
.get = u32_get,
1024-
.put = u32_put,
10251020
.change = u32_change,
10261021
.delete = u32_delete,
10271022
.walk = u32_walk,

0 commit comments

Comments
 (0)