]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
net: dsa: use "extack" as argument to flow_action_basic_hw_stats_check()
authorVladimir Oltean <vladimir.oltean@nxp.com>
Wed, 23 Oct 2024 13:52:48 +0000 (16:52 +0300)
committerJakub Kicinski <kuba@kernel.org>
Thu, 31 Oct 2024 00:33:54 +0000 (17:33 -0700)
We already have an "extack" stack variable in
dsa_user_add_cls_matchall_police() and
dsa_user_add_cls_matchall_mirred(), there is no need to retrieve
it again from cls->common.extack.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Link: https://patch.msgid.link/20241023135251.1752488-4-vladimir.oltean@nxp.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/dsa/user.c

index 15f69fa6a38ba4cd980b3435fdbc101c5087d861..a89425a8de2e5e3467a40fee5c0db756e73a1196 100644 (file)
@@ -1382,8 +1382,7 @@ dsa_user_add_cls_matchall_mirred(struct net_device *dev,
        if (!ds->ops->port_mirror_add)
                return -EOPNOTSUPP;
 
-       if (!flow_action_basic_hw_stats_check(&cls->rule->action,
-                                             cls->common.extack))
+       if (!flow_action_basic_hw_stats_check(&cls->rule->action, extack))
                return -EOPNOTSUPP;
 
        act = &cls->rule->action.entries[0];
@@ -1449,8 +1448,7 @@ dsa_user_add_cls_matchall_police(struct net_device *dev,
                return -EOPNOTSUPP;
        }
 
-       if (!flow_action_basic_hw_stats_check(&cls->rule->action,
-                                             cls->common.extack))
+       if (!flow_action_basic_hw_stats_check(&cls->rule->action, extack))
                return -EOPNOTSUPP;
 
        list_for_each_entry(mall_tc_entry, &p->mall_tc_list, list) {