@@ -605,8 +605,7 @@ static struct tc_cookie *nla_memdup_cookie(struct nlattr **tb)
605
605
606
606
struct tc_action * tcf_action_init_1 (struct net * net , struct tcf_proto * tp ,
607
607
struct nlattr * nla , struct nlattr * est ,
608
- char * name , int ovr , int bind ,
609
- struct netlink_ext_ack * extack )
608
+ char * name , int ovr , int bind )
610
609
{
611
610
struct tc_action * a ;
612
611
struct tc_action_ops * a_o ;
@@ -622,7 +621,7 @@ struct tc_action *tcf_action_init_1(struct net *net, struct tcf_proto *tp,
622
621
goto err_out ;
623
622
err = - EINVAL ;
624
623
kind = tb [TCA_ACT_KIND ];
625
- if (! kind )
624
+ if (kind == NULL )
626
625
goto err_out ;
627
626
if (nla_strlcpy (act_name , kind , IFNAMSIZ ) >= IFNAMSIZ )
628
627
goto err_out ;
@@ -727,7 +726,7 @@ static void cleanup_a(struct list_head *actions, int ovr)
727
726
728
727
int tcf_action_init (struct net * net , struct tcf_proto * tp , struct nlattr * nla ,
729
728
struct nlattr * est , char * name , int ovr , int bind ,
730
- struct list_head * actions , struct netlink_ext_ack * extack )
729
+ struct list_head * actions )
731
730
{
732
731
struct nlattr * tb [TCA_ACT_MAX_PRIO + 1 ];
733
732
struct tc_action * act ;
@@ -739,8 +738,7 @@ int tcf_action_init(struct net *net, struct tcf_proto *tp, struct nlattr *nla,
739
738
return err ;
740
739
741
740
for (i = 1 ; i <= TCA_ACT_MAX_PRIO && tb [i ]; i ++ ) {
742
- act = tcf_action_init_1 (net , tp , tb [i ], est , name , ovr , bind ,
743
- extack );
741
+ act = tcf_action_init_1 (net , tp , tb [i ], est , name , ovr , bind );
744
742
if (IS_ERR (act )) {
745
743
err = PTR_ERR (act );
746
744
goto err ;
@@ -824,7 +822,7 @@ static int tca_get_fill(struct sk_buff *skb, struct list_head *actions,
824
822
t -> tca__pad2 = 0 ;
825
823
826
824
nest = nla_nest_start (skb , TCA_ACT_TAB );
827
- if (! nest )
825
+ if (nest == NULL )
828
826
goto out_nlmsg_trim ;
829
827
830
828
if (tcf_action_dump (skb , actions , bind , ref ) < 0 )
@@ -936,7 +934,7 @@ static int tca_action_flush(struct net *net, struct nlattr *nla,
936
934
t -> tca__pad2 = 0 ;
937
935
938
936
nest = nla_nest_start (skb , TCA_ACT_TAB );
939
- if (! nest )
937
+ if (nest == NULL )
940
938
goto out_module_put ;
941
939
942
940
err = ops -> walk (net , skb , & dcb , RTM_DELACTION , ops );
@@ -1009,10 +1007,10 @@ tca_action_gd(struct net *net, struct nlattr *nla, struct nlmsghdr *n,
1009
1007
return ret ;
1010
1008
1011
1009
if (event == RTM_DELACTION && n -> nlmsg_flags & NLM_F_ROOT ) {
1012
- if (tb [1 ])
1010
+ if (tb [1 ] != NULL )
1013
1011
return tca_action_flush (net , tb [1 ], n , portid );
1014
-
1015
- return - EINVAL ;
1012
+ else
1013
+ return - EINVAL ;
1016
1014
}
1017
1015
1018
1016
for (i = 1 ; i <= TCA_ACT_MAX_PRIO && tb [i ]; i ++ ) {
@@ -1064,14 +1062,12 @@ tcf_add_notify(struct net *net, struct nlmsghdr *n, struct list_head *actions,
1064
1062
}
1065
1063
1066
1064
static int tcf_action_add (struct net * net , struct nlattr * nla ,
1067
- struct nlmsghdr * n , u32 portid , int ovr ,
1068
- struct netlink_ext_ack * extack )
1065
+ struct nlmsghdr * n , u32 portid , int ovr )
1069
1066
{
1070
1067
int ret = 0 ;
1071
1068
LIST_HEAD (actions );
1072
1069
1073
- ret = tcf_action_init (net , NULL , nla , NULL , NULL , ovr , 0 , & actions ,
1074
- extack );
1070
+ ret = tcf_action_init (net , NULL , nla , NULL , NULL , ovr , 0 , & actions );
1075
1071
if (ret )
1076
1072
return ret ;
1077
1073
@@ -1119,8 +1115,7 @@ static int tc_ctl_action(struct sk_buff *skb, struct nlmsghdr *n,
1119
1115
if (n -> nlmsg_flags & NLM_F_REPLACE )
1120
1116
ovr = 1 ;
1121
1117
replay :
1122
- ret = tcf_action_add (net , tca [TCA_ACT_TAB ], n , portid , ovr ,
1123
- extack );
1118
+ ret = tcf_action_add (net , tca [TCA_ACT_TAB ], n , portid , ovr );
1124
1119
if (ret == - EAGAIN )
1125
1120
goto replay ;
1126
1121
break ;
0 commit comments