Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

net sched: indentation and other OCD stylistic fixes

Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com>
Acked-by: Cong Wang <xiyou.wangcong@gmail.com>

authored by

Jamal Hadi Salim and committed by
David S. Miller
0b0f43fe be119913

+41 -28
+8 -6
include/net/act_api.h
··· 2 2 #define __NET_ACT_API_H 3 3 4 4 /* 5 - * Public police action API for classifiers/qdiscs 6 - */ 5 + * Public action API for classifiers/qdiscs 6 + */ 7 7 8 8 #include <net/sch_generic.h> 9 9 #include <net/pkt_sched.h> ··· 107 107 char kind[IFNAMSIZ]; 108 108 __u32 type; /* TBD to match kind */ 109 109 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 *); 111 112 int (*dump)(struct sk_buff *, struct tc_action *, int, int); 112 113 void (*cleanup)(struct tc_action *, int bind); 113 114 int (*lookup)(struct net *, struct tc_action *, u32); ··· 126 125 }; 127 126 128 127 static inline 129 - int tc_action_net_init(struct tc_action_net *tn, const struct tc_action_ops *ops, 130 - unsigned int mask) 128 + int tc_action_net_init(struct tc_action_net *tn, 129 + const struct tc_action_ops *ops, unsigned int mask) 131 130 { 132 131 int err = 0; 133 132 ··· 170 169 } 171 170 172 171 int tcf_register_action(struct tc_action_ops *a, struct pernet_operations *ops); 173 - int tcf_unregister_action(struct tc_action_ops *a, struct pernet_operations *ops); 172 + int tcf_unregister_action(struct tc_action_ops *a, 173 + struct pernet_operations *ops); 174 174 int tcf_action_destroy(struct list_head *actions, int bind); 175 175 int tcf_action_exec(struct sk_buff *skb, const struct list_head *actions, 176 176 struct tcf_result *res);
+2 -2
include/net/tc_act/tc_defact.h
··· 5 5 6 6 struct tcf_defact { 7 7 struct tcf_common common; 8 - u32 tcfd_datalen; 9 - void *tcfd_defdata; 8 + u32 tcfd_datalen; 9 + void *tcfd_defdata; 10 10 }; 11 11 #define to_defact(a) \ 12 12 container_of(a->priv, struct tcf_defact, common)
+3 -3
include/uapi/linux/pkt_cls.h
··· 115 115 __u32 mtu; 116 116 struct tc_ratespec rate; 117 117 struct tc_ratespec peakrate; 118 - int refcnt; 119 - int bindcnt; 118 + int refcnt; 119 + int bindcnt; 120 120 __u32 capab; 121 121 }; 122 122 ··· 128 128 }; 129 129 130 130 struct tc_cnt { 131 - int refcnt; 131 + int refcnt; 132 132 int bindcnt; 133 133 }; 134 134
+11 -8
net/sched/act_api.c
··· 504 504 } 505 505 EXPORT_SYMBOL(tcf_action_dump_1); 506 506 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) 509 509 { 510 510 struct tc_action *a; 511 511 int err = -EINVAL; ··· 688 688 return -1; 689 689 } 690 690 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) 694 694 { 695 695 struct tcamsg *t; 696 696 struct nlmsghdr *nlh; ··· 731 731 skb = alloc_skb(NLMSG_GOODSIZE, GFP_KERNEL); 732 732 if (!skb) 733 733 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) { 735 736 kfree_skb(skb); 736 737 return -EINVAL; 737 738 } ··· 840 839 if (a.ops == NULL) /*some idjot trying to flush unknown action */ 841 840 goto err_out; 842 841 843 - nlh = nlmsg_put(skb, portid, n->nlmsg_seq, RTM_DELACTION, sizeof(*t), 0); 842 + nlh = nlmsg_put(skb, portid, n->nlmsg_seq, RTM_DELACTION, 843 + sizeof(*t), 0); 844 844 if (!nlh) 845 845 goto out_module_put; 846 846 t = nlmsg_data(nlh); ··· 1004 1002 u32 portid = skb ? NETLINK_CB(skb).portid : 0; 1005 1003 int ret = 0, ovr = 0; 1006 1004 1007 - if ((n->nlmsg_type != RTM_GETACTION) && !netlink_capable(skb, CAP_NET_ADMIN)) 1005 + if ((n->nlmsg_type != RTM_GETACTION) && 1006 + !netlink_capable(skb, CAP_NET_ADMIN)) 1008 1007 return -EPERM; 1009 1008 1010 1009 ret = nlmsg_parse(n, sizeof(struct tcamsg), tca, TCA_ACT_MAX, NULL);
+2 -1
net/sched/act_bpf.c
··· 169 169 static const struct nla_policy act_bpf_policy[TCA_ACT_BPF_MAX + 1] = { 170 170 [TCA_ACT_BPF_PARMS] = { .len = sizeof(struct tc_act_bpf) }, 171 171 [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 }, 173 174 [TCA_ACT_BPF_OPS_LEN] = { .type = NLA_U16 }, 174 175 [TCA_ACT_BPF_OPS] = { .type = NLA_BINARY, 175 176 .len = sizeof(struct sock_filter) * BPF_MAXINSNS },
+2 -1
net/sched/act_gact.c
··· 162 162 tm->lastuse = lastuse; 163 163 } 164 164 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) 166 167 { 167 168 unsigned char *b = skb_tail_pointer(skb); 168 169 struct tcf_gact *gact = a->priv;
+4 -2
net/sched/act_ipt.c
··· 34 34 35 35 static int xt_net_id; 36 36 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) 38 39 { 39 40 struct xt_tgchk_param par; 40 41 struct xt_target *target; ··· 251 250 252 251 } 253 252 254 - static int tcf_ipt_dump(struct sk_buff *skb, struct tc_action *a, int bind, int ref) 253 + static int tcf_ipt_dump(struct sk_buff *skb, struct tc_action *a, int bind, 254 + int ref) 255 255 { 256 256 unsigned char *b = skb_tail_pointer(skb); 257 257 struct tcf_ipt *ipt = a->priv;
+2 -1
net/sched/act_vlan.c
··· 179 179 180 180 if (v->tcfv_action == TCA_VLAN_ACT_PUSH && 181 181 (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))) 183 184 goto nla_put_failure; 184 185 185 186 tcf_tm_dump(&t, &v->tcf_tm);
+7 -4
net/sched/cls_api.c
··· 351 351 return err; 352 352 } 353 353 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) 356 357 { 357 358 struct tcmsg *tcm; 358 359 struct nlmsghdr *nlh; ··· 475 474 TC_H_MIN(tcm->tcm_info) != tp->protocol) 476 475 continue; 477 476 if (t > s_t) 478 - memset(&cb->args[1], 0, sizeof(cb->args)-sizeof(cb->args[0])); 477 + memset(&cb->args[1], 0, 478 + sizeof(cb->args)-sizeof(cb->args[0])); 479 479 if (cb->args[1] == 0) { 480 - if (tcf_fill_node(net, skb, tp, 0, NETLINK_CB(cb->skb).portid, 480 + if (tcf_fill_node(net, skb, tp, 0, 481 + NETLINK_CB(cb->skb).portid, 481 482 cb->nlh->nlmsg_seq, NLM_F_MULTI, 482 483 RTM_NEWTFILTER) <= 0) 483 484 break;