diff options
author | WANG Cong <xiyou.wangcong@gmail.com> | 2014-01-09 19:14:03 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-01-13 14:50:15 -0500 |
commit | a8701a6c7ae0142393d0fe87a1e7778bd04d1ac7 (patch) | |
tree | 0e14b5dba8e73d59b6dec9969fc275ae6d7301cd /net/sched/cls_basic.c | |
parent | 2519a602c273c5254781bc55b6e678a17e469a12 (diff) |
net_sched: avoid casting void pointer
tp->root is a void* pointer, no need to cast it.
Cc: Jamal Hadi Salim <jhs@mojatatu.com>
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Acked-by: Jamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched/cls_basic.c')
-rw-r--r-- | net/sched/cls_basic.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/net/sched/cls_basic.c b/net/sched/cls_basic.c index af6bea1a6a54..e98ca99c202b 100644 --- a/net/sched/cls_basic.c +++ b/net/sched/cls_basic.c | |||
@@ -38,7 +38,7 @@ static int basic_classify(struct sk_buff *skb, const struct tcf_proto *tp, | |||
38 | struct tcf_result *res) | 38 | struct tcf_result *res) |
39 | { | 39 | { |
40 | int r; | 40 | int r; |
41 | struct basic_head *head = (struct basic_head *) tp->root; | 41 | struct basic_head *head = tp->root; |
42 | struct basic_filter *f; | 42 | struct basic_filter *f; |
43 | 43 | ||
44 | list_for_each_entry(f, &head->flist, link) { | 44 | list_for_each_entry(f, &head->flist, link) { |
@@ -56,7 +56,7 @@ static int basic_classify(struct sk_buff *skb, const struct tcf_proto *tp, | |||
56 | static unsigned long basic_get(struct tcf_proto *tp, u32 handle) | 56 | static unsigned long basic_get(struct tcf_proto *tp, u32 handle) |
57 | { | 57 | { |
58 | unsigned long l = 0UL; | 58 | unsigned long l = 0UL; |
59 | struct basic_head *head = (struct basic_head *) tp->root; | 59 | struct basic_head *head = tp->root; |
60 | struct basic_filter *f; | 60 | struct basic_filter *f; |
61 | 61 | ||
62 | if (head == NULL) | 62 | if (head == NULL) |
@@ -107,7 +107,7 @@ static void basic_destroy(struct tcf_proto *tp) | |||
107 | 107 | ||
108 | static int basic_delete(struct tcf_proto *tp, unsigned long arg) | 108 | static int basic_delete(struct tcf_proto *tp, unsigned long arg) |
109 | { | 109 | { |
110 | struct basic_head *head = (struct basic_head *) tp->root; | 110 | struct basic_head *head = tp->root; |
111 | struct basic_filter *t, *f = (struct basic_filter *) arg; | 111 | struct basic_filter *t, *f = (struct basic_filter *) arg; |
112 | 112 | ||
113 | list_for_each_entry(t, &head->flist, link) | 113 | list_for_each_entry(t, &head->flist, link) |
@@ -164,7 +164,7 @@ static int basic_change(struct net *net, struct sk_buff *in_skb, | |||
164 | struct nlattr **tca, unsigned long *arg) | 164 | struct nlattr **tca, unsigned long *arg) |
165 | { | 165 | { |
166 | int err; | 166 | int err; |
167 | struct basic_head *head = (struct basic_head *) tp->root; | 167 | struct basic_head *head = tp->root; |
168 | struct nlattr *tb[TCA_BASIC_MAX + 1]; | 168 | struct nlattr *tb[TCA_BASIC_MAX + 1]; |
169 | struct basic_filter *f = (struct basic_filter *) *arg; | 169 | struct basic_filter *f = (struct basic_filter *) *arg; |
170 | 170 | ||
@@ -225,7 +225,7 @@ errout: | |||
225 | 225 | ||
226 | static void basic_walk(struct tcf_proto *tp, struct tcf_walker *arg) | 226 | static void basic_walk(struct tcf_proto *tp, struct tcf_walker *arg) |
227 | { | 227 | { |
228 | struct basic_head *head = (struct basic_head *) tp->root; | 228 | struct basic_head *head = tp->root; |
229 | struct basic_filter *f; | 229 | struct basic_filter *f; |
230 | 230 | ||
231 | list_for_each_entry(f, &head->flist, link) { | 231 | list_for_each_entry(f, &head->flist, link) { |