History

net sched: indentation and other OCD stylistic fixes

Jamal Hadi Salim committed 10 years ago

Commit 0b0f43f1 parent be119919 files · +41 −28Browse files

Unified · Split

9 files
  1. include/net/act_api.h +8 −6
  2. include/net/tc_act/tc_defact.h +2 −2
  3. include/uapi/linux/pkt_cls.h +3 −3
  4. net/sched/act_api.c +11 −8
  5. net/sched/act_bpf.c +2 −1
  6. net/sched/act_gact.c +2 −1
  7. net/sched/act_ipt.c +4 −2
  8. net/sched/act_vlan.c +2 −1
  9. net/sched/cls_api.c +7 −4
include/net/act_api.h+8−6
@@ -2,8 +2,8 @@ · 1 unmodified line
22 #define __NET_ACT_API_H
33
44 /*
5− * Public police action API for classifiers/qdiscs
6− */
5+ * Public action API for classifiers/qdiscs
6+*/
77
88 #include <net/sch_generic.h>
99 #include <net/pkt_sched.h>
@@ -107,7 +107,8 @@ struct tc_action_ops { · 97 unmodified lines
107107 char kind[IFNAMSIZ];
108108 __u32 type; /* TBD to match kind */
109109 struct module *owner;
110− int (*act)(struct sk_buff *, const struct tc_action *, struct tcf_result *);
110+ int (*act)(struct sk_buff *, const struct tc_action *,
111+ struct tcf_result *);
111112 int (*dump)(struct sk_buff *, struct tc_action *, int, int);
112113 void (*cleanup)(struct tc_action *, int bind);
113114 int (*lookup)(struct net *, struct tc_action *, u32);
@@ -125,8 +126,8 @@ struct tc_action_net { · 11 unmodified lines
125126 };
126127
127128 static inline
128−int tc_action_net_init(struct tc_action_net *tn, const struct tc_action_ops *ops,
129− unsigned int mask)
129+int tc_action_net_init(struct tc_action_net *tn,
130+ const struct tc_action_ops *ops, unsigned int mask)
130131 {
131132 int err = 0;
132133
@@ -169,7 +170,8 @@ static inline int tcf_hash_release(struct tc_action *a, bool bind) · 36 unmodified lines
169170 }
170171
171172 int tcf_register_action(struct tc_action_ops *a, struct pernet_operations *ops);
172−int tcf_unregister_action(struct tc_action_ops *a, struct pernet_operations *ops);
173+int tcf_unregister_action(struct tc_action_ops *a,
174+ struct pernet_operations *ops);
173175 int tcf_action_destroy(struct list_head *actions, int bind);
174176 int tcf_action_exec(struct sk_buff *skb, const struct list_head *actions,
175177 struct tcf_result *res);
include/net/tc_act/tc_defact.h+2−2
@@ -5,8 +5,8 @@ · 4 unmodified lines
55
66 struct tcf_defact {
77 struct tcf_common common;
8− u32 tcfd_datalen;
9− void *tcfd_defdata;
8+ u32 tcfd_datalen;
9+ void *tcfd_defdata;
1010 };
1111 #define to_defact(a) \
1212 container_of(a->priv, struct tcf_defact, common)
include/uapi/linux/pkt_cls.h+3−3
@@ -115,8 +115,8 @@ struct tc_police { · 114 unmodified lines
115115 __u32 mtu;
116116 struct tc_ratespec rate;
117117 struct tc_ratespec peakrate;
118− int refcnt;
119− int bindcnt;
118+ int refcnt;
119+ int bindcnt;
120120 __u32 capab;
121121 };
122122
@@ -128,7 +128,7 @@ struct tcf_t { · 5 unmodified lines
128128 };
129129
130130 struct tc_cnt {
131− int refcnt;
131+ int refcnt;
132132 int bindcnt;
133133 };
134134
net/sched/act_api.c+11−8
@@ -504,8 +504,8 @@ nla_put_failure: · 503 unmodified lines
504504 }
505505 EXPORT_SYMBOL(tcf_action_dump_1);
506506
507−int
508−tcf_action_dump(struct sk_buff *skb, struct list_head *actions, int bind, int ref)
507+int tcf_action_dump(struct sk_buff *skb, struct list_head *actions,
508+ int bind, int ref)
509509 {
510510 struct tc_action *a;
511511 int err = -EINVAL;
@@ -688,9 +688,9 @@ errout: · 176 unmodified lines
688688 return -1;
689689 }
690690
691−static int
692−tca_get_fill(struct sk_buff *skb, struct list_head *actions, u32 portid, u32 seq,
693− u16 flags, int event, int bind, int ref)
691+static int tca_get_fill(struct sk_buff *skb, struct list_head *actions,
692+ u32 portid, u32 seq, u16 flags, int event, int bind,
693+ int ref)
694694 {
695695 struct tcamsg *t;
696696 struct nlmsghdr *nlh;
@@ -731,7 +731,8 @@ act_get_notify(struct net *net, u32 portid, struct nlmsghdr *n, · 34 unmodified lines
731731 skb = alloc_skb(NLMSG_GOODSIZE, GFP_KERNEL);
732732 if (!skb)
733733 return -ENOBUFS;
734− if (tca_get_fill(skb, actions, portid, n->nlmsg_seq, 0, event, 0, 0) <= 0) {
734+ if (tca_get_fill(skb, actions, portid, n->nlmsg_seq, 0, event,
735+ 0, 0) <= 0) {
735736 kfree_skb(skb);
736737 return -EINVAL;
737738 }
@@ -839,7 +840,8 @@ static int tca_action_flush(struct net *net, struct nlattr *nla, · 101 unmodified lines
839840 if (a.ops == NULL) /*some idjot trying to flush unknown action */
840841 goto err_out;
841842
842− nlh = nlmsg_put(skb, portid, n->nlmsg_seq, RTM_DELACTION, sizeof(*t), 0);
843+ nlh = nlmsg_put(skb, portid, n->nlmsg_seq, RTM_DELACTION,
844+ sizeof(*t), 0);
843845 if (!nlh)
844846 goto out_module_put;
845847 t = nlmsg_data(nlh);
@@ -1002,7 +1004,8 @@ static int tc_ctl_action(struct sk_buff *skb, struct nlmsghdr *n) · 156 unmodified lines
10021004 u32 portid = skb ? NETLINK_CB(skb).portid : 0;
10031005 int ret = 0, ovr = 0;
10041006
1005− if ((n->nlmsg_type != RTM_GETACTION) && !netlink_capable(skb, CAP_NET_ADMIN))
1007+ if ((n->nlmsg_type != RTM_GETACTION) &&
1008+ !netlink_capable(skb, CAP_NET_ADMIN))
10061009 return -EPERM;
10071010
10081011 ret = nlmsg_parse(n, sizeof(struct tcamsg), tca, TCA_ACT_MAX, NULL);
net/sched/act_bpf.c+2−1
@@ -169,7 +169,8 @@ nla_put_failure: · 168 unmodified lines
169169 static const struct nla_policy act_bpf_policy[TCA_ACT_BPF_MAX + 1] = {
170170 [TCA_ACT_BPF_PARMS] = { .len = sizeof(struct tc_act_bpf) },
171171 [TCA_ACT_BPF_FD] = { .type = NLA_U32 },
172− [TCA_ACT_BPF_NAME] = { .type = NLA_NUL_STRING, .len = ACT_BPF_NAME_LEN },
172+ [TCA_ACT_BPF_NAME] = { .type = NLA_NUL_STRING,
173+ .len = ACT_BPF_NAME_LEN },
173174 [TCA_ACT_BPF_OPS_LEN] = { .type = NLA_U16 },
174175 [TCA_ACT_BPF_OPS] = { .type = NLA_BINARY,
175176 .len = sizeof(struct sock_filter) * BPF_MAXINSNS },
net/sched/act_gact.c+2−1
@@ -162,7 +162,8 @@ static void tcf_gact_stats_update(struct tc_action *a, u64 bytes, u32 packets, · 161 unmodified lines
162162 tm->lastuse = lastuse;
163163 }
164164
165−static int tcf_gact_dump(struct sk_buff *skb, struct tc_action *a, int bind, int ref)
165+static int tcf_gact_dump(struct sk_buff *skb, struct tc_action *a,
166+ int bind, int ref)
166167 {
167168 unsigned char *b = skb_tail_pointer(skb);
168169 struct tcf_gact *gact = a->priv;
net/sched/act_ipt.c+4−2
@@ -34,7 +34,8 @@ static int ipt_net_id; · 33 unmodified lines
3434
3535 static int xt_net_id;
3636
37−static int ipt_init_target(struct xt_entry_target *t, char *table, unsigned int hook)
37+static int ipt_init_target(struct xt_entry_target *t, char *table,
38+ unsigned int hook)
3839 {
3940 struct xt_tgchk_param par;
4041 struct xt_target *target;
@@ -250,7 +251,8 @@ static int tcf_ipt(struct sk_buff *skb, const struct tc_action *a, · 209 unmodified lines
250251
251252 }
252253
253−static int tcf_ipt_dump(struct sk_buff *skb, struct tc_action *a, int bind, int ref)
254+static int tcf_ipt_dump(struct sk_buff *skb, struct tc_action *a, int bind,
255+ int ref)
254256 {
255257 unsigned char *b = skb_tail_pointer(skb);
256258 struct tcf_ipt *ipt = a->priv;
net/sched/act_vlan.c+2−1
@@ -179,7 +179,8 @@ static int tcf_vlan_dump(struct sk_buff *skb, struct tc_action *a, · 178 unmodified lines
179179
180180 if (v->tcfv_action == TCA_VLAN_ACT_PUSH &&
181181 (nla_put_u16(skb, TCA_VLAN_PUSH_VLAN_ID, v->tcfv_push_vid) ||
182− nla_put_be16(skb, TCA_VLAN_PUSH_VLAN_PROTOCOL, v->tcfv_push_proto)))
182+ nla_put_be16(skb, TCA_VLAN_PUSH_VLAN_PROTOCOL,
183+ v->tcfv_push_proto)))
183184 goto nla_put_failure;
184185
185186 tcf_tm_dump(&t, &v->tcf_tm);
net/sched/cls_api.c+7−4
@@ -351,8 +351,9 @@ errout: · 350 unmodified lines
351351 return err;
352352 }
353353
354−static int tcf_fill_node(struct net *net, struct sk_buff *skb, struct tcf_proto *tp,
355− unsigned long fh, u32 portid, u32 seq, u16 flags, int event)
354+static int tcf_fill_node(struct net *net, struct sk_buff *skb,
355+ struct tcf_proto *tp, unsigned long fh, u32 portid,
356+ u32 seq, u16 flags, int event)
356357 {
357358 struct tcmsg *tcm;
358359 struct nlmsghdr *nlh;
@@ -474,9 +475,11 @@ static int tc_dump_tfilter(struct sk_buff *skb, struct netlink_callback *cb) · 115 unmodified lines
474475 TC_H_MIN(tcm->tcm_info) != tp->protocol)
475476 continue;
476477 if (t > s_t)
477− memset(&cb->args[1], 0, sizeof(cb->args)-sizeof(cb->args[0]));
478+ memset(&cb->args[1], 0,
479+ sizeof(cb->args)-sizeof(cb->args[0]));
478480 if (cb->args[1] == 0) {
479− if (tcf_fill_node(net, skb, tp, 0, NETLINK_CB(cb->skb).portid,
481+ if (tcf_fill_node(net, skb, tp, 0,
482+ NETLINK_CB(cb->skb).portid,
480483 cb->nlh->nlmsg_seq, NLM_F_MULTI,
481484 RTM_NEWTFILTER) <= 0)
482485 break;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t