@@ -78,7 +78,7 @@ static int tcf_dump_walker(struct sk_buff *skb, struct netlink_callback *cb,
7878 struct tc_action * a , struct tcf_hashinfo * hinfo )
7979{
8080 struct tcf_common * p ;
81- int err = 0 , index = -1 ,i = 0 , s_i = 0 , n_i = 0 ;
81+ int err = 0 , index = -1 , i = 0 , s_i = 0 , n_i = 0 ;
8282 struct nlattr * nest ;
8383
8484 read_lock_bh (hinfo -> lock );
@@ -126,7 +126,7 @@ static int tcf_del_walker(struct sk_buff *skb, struct tc_action *a,
126126{
127127 struct tcf_common * p , * s_p ;
128128 struct nlattr * nest ;
129- int i = 0 , n_i = 0 ;
129+ int i = 0 , n_i = 0 ;
130130
131131 nest = nla_nest_start (skb , a -> order );
132132 if (nest == NULL )
@@ -138,7 +138,7 @@ static int tcf_del_walker(struct sk_buff *skb, struct tc_action *a,
138138 while (p != NULL ) {
139139 s_p = p -> tcfc_next ;
140140 if (ACT_P_DELETED == tcf_hash_release (p , 0 , hinfo ))
141- module_put (a -> ops -> owner );
141+ module_put (a -> ops -> owner );
142142 n_i ++ ;
143143 p = s_p ;
144144 }
@@ -447,7 +447,8 @@ tcf_action_dump_1(struct sk_buff *skb, struct tc_action *a, int bind, int ref)
447447 nest = nla_nest_start (skb , TCA_OPTIONS );
448448 if (nest == NULL )
449449 goto nla_put_failure ;
450- if ((err = tcf_action_dump_old (skb , a , bind , ref )) > 0 ) {
450+ err = tcf_action_dump_old (skb , a , bind , ref );
451+ if (err > 0 ) {
451452 nla_nest_end (skb , nest );
452453 return err ;
453454 }
@@ -491,7 +492,7 @@ struct tc_action *tcf_action_init_1(struct nlattr *nla, struct nlattr *est,
491492 struct tc_action * a ;
492493 struct tc_action_ops * a_o ;
493494 char act_name [IFNAMSIZ ];
494- struct nlattr * tb [TCA_ACT_MAX + 1 ];
495+ struct nlattr * tb [TCA_ACT_MAX + 1 ];
495496 struct nlattr * kind ;
496497 int err ;
497498
@@ -549,9 +550,9 @@ struct tc_action *tcf_action_init_1(struct nlattr *nla, struct nlattr *est,
549550 goto err_free ;
550551
551552 /* module count goes up only when brand new policy is created
552- if it exists and is only bound to in a_o->init() then
553- ACT_P_CREATED is not returned (a zero is).
554- */
553+ * if it exists and is only bound to in a_o->init() then
554+ * ACT_P_CREATED is not returned (a zero is).
555+ */
555556 if (err != ACT_P_CREATED )
556557 module_put (a_o -> owner );
557558 a -> ops = a_o ;
@@ -569,7 +570,7 @@ struct tc_action *tcf_action_init_1(struct nlattr *nla, struct nlattr *est,
569570struct tc_action * tcf_action_init (struct nlattr * nla , struct nlattr * est ,
570571 char * name , int ovr , int bind )
571572{
572- struct nlattr * tb [TCA_ACT_MAX_PRIO + 1 ];
573+ struct nlattr * tb [TCA_ACT_MAX_PRIO + 1 ];
573574 struct tc_action * head = NULL , * act , * act_prev = NULL ;
574575 int err ;
575576 int i ;
@@ -697,7 +698,7 @@ act_get_notify(struct net *net, u32 pid, struct nlmsghdr *n,
697698static struct tc_action *
698699tcf_action_get_1 (struct nlattr * nla , struct nlmsghdr * n , u32 pid )
699700{
700- struct nlattr * tb [TCA_ACT_MAX + 1 ];
701+ struct nlattr * tb [TCA_ACT_MAX + 1 ];
701702 struct tc_action * a ;
702703 int index ;
703704 int err ;
@@ -770,7 +771,7 @@ static int tca_action_flush(struct net *net, struct nlattr *nla,
770771 struct tcamsg * t ;
771772 struct netlink_callback dcb ;
772773 struct nlattr * nest ;
773- struct nlattr * tb [TCA_ACT_MAX + 1 ];
774+ struct nlattr * tb [TCA_ACT_MAX + 1 ];
774775 struct nlattr * kind ;
775776 struct tc_action * a = create_a (0 );
776777 int err = - ENOMEM ;
@@ -821,7 +822,8 @@ static int tca_action_flush(struct net *net, struct nlattr *nla,
821822 nlh -> nlmsg_flags |= NLM_F_ROOT ;
822823 module_put (a -> ops -> owner );
823824 kfree (a );
824- err = rtnetlink_send (skb , net , pid , RTNLGRP_TC , n -> nlmsg_flags & NLM_F_ECHO );
825+ err = rtnetlink_send (skb , net , pid , RTNLGRP_TC ,
826+ n -> nlmsg_flags & NLM_F_ECHO );
825827 if (err > 0 )
826828 return 0 ;
827829
@@ -842,14 +844,14 @@ tca_action_gd(struct net *net, struct nlattr *nla, struct nlmsghdr *n,
842844 u32 pid , int event )
843845{
844846 int i , ret ;
845- struct nlattr * tb [TCA_ACT_MAX_PRIO + 1 ];
847+ struct nlattr * tb [TCA_ACT_MAX_PRIO + 1 ];
846848 struct tc_action * head = NULL , * act , * act_prev = NULL ;
847849
848850 ret = nla_parse_nested (tb , TCA_ACT_MAX_PRIO , nla , NULL );
849851 if (ret < 0 )
850852 return ret ;
851853
852- if (event == RTM_DELACTION && n -> nlmsg_flags & NLM_F_ROOT ) {
854+ if (event == RTM_DELACTION && n -> nlmsg_flags & NLM_F_ROOT ) {
853855 if (tb [1 ] != NULL )
854856 return tca_action_flush (net , tb [1 ], n , pid );
855857 else
@@ -892,7 +894,7 @@ tca_action_gd(struct net *net, struct nlattr *nla, struct nlmsghdr *n,
892894 /* now do the delete */
893895 tcf_action_destroy (head , 0 );
894896 ret = rtnetlink_send (skb , net , pid , RTNLGRP_TC ,
895- n -> nlmsg_flags & NLM_F_ECHO );
897+ n -> nlmsg_flags & NLM_F_ECHO );
896898 if (ret > 0 )
897899 return 0 ;
898900 return ret ;
@@ -936,7 +938,7 @@ static int tcf_add_notify(struct net *net, struct tc_action *a,
936938 nlh -> nlmsg_len = skb_tail_pointer (skb ) - b ;
937939 NETLINK_CB (skb ).dst_group = RTNLGRP_TC ;
938940
939- err = rtnetlink_send (skb , net , pid , RTNLGRP_TC , flags & NLM_F_ECHO );
941+ err = rtnetlink_send (skb , net , pid , RTNLGRP_TC , flags & NLM_F_ECHO );
940942 if (err > 0 )
941943 err = 0 ;
942944 return err ;
@@ -967,7 +969,7 @@ tcf_action_add(struct net *net, struct nlattr *nla, struct nlmsghdr *n,
967969
968970 /* dump then free all the actions after update; inserted policy
969971 * stays intact
970- * * /
972+ */
971973 ret = tcf_add_notify (net , act , pid , seq , RTM_NEWACTION , n -> nlmsg_flags );
972974 for (a = act ; a ; a = act ) {
973975 act = a -> next ;
@@ -993,8 +995,7 @@ static int tc_ctl_action(struct sk_buff *skb, struct nlmsghdr *n, void *arg)
993995 return - EINVAL ;
994996 }
995997
996- /* n->nlmsg_flags&NLM_F_CREATE
997- * */
998+ /* n->nlmsg_flags & NLM_F_CREATE */
998999 switch (n -> nlmsg_type ) {
9991000 case RTM_NEWACTION :
10001001 /* we are going to assume all other flags
@@ -1003,7 +1004,7 @@ static int tc_ctl_action(struct sk_buff *skb, struct nlmsghdr *n, void *arg)
10031004 * but since we want avoid ambiguity (eg when flags
10041005 * is zero) then just set this
10051006 */
1006- if (n -> nlmsg_flags & NLM_F_REPLACE )
1007+ if (n -> nlmsg_flags & NLM_F_REPLACE )
10071008 ovr = 1 ;
10081009replay :
10091010 ret = tcf_action_add (net , tca [TCA_ACT_TAB ], n , pid , ovr );
@@ -1028,7 +1029,7 @@ static int tc_ctl_action(struct sk_buff *skb, struct nlmsghdr *n, void *arg)
10281029static struct nlattr *
10291030find_dump_kind (const struct nlmsghdr * n )
10301031{
1031- struct nlattr * tb1 , * tb2 [TCA_ACT_MAX + 1 ];
1032+ struct nlattr * tb1 , * tb2 [TCA_ACT_MAX + 1 ];
10321033 struct nlattr * tb [TCA_ACT_MAX_PRIO + 1 ];
10331034 struct nlattr * nla [TCAA_MAX + 1 ];
10341035 struct nlattr * kind ;
@@ -1071,9 +1072,8 @@ tc_dump_action(struct sk_buff *skb, struct netlink_callback *cb)
10711072 }
10721073
10731074 a_o = tc_lookup_action (kind );
1074- if (a_o == NULL ) {
1075+ if (a_o == NULL )
10751076 return 0 ;
1076- }
10771077
10781078 memset (& a , 0 , sizeof (struct tc_action ));
10791079 a .ops = a_o ;
0 commit comments