net/mlx5e: drop useless LIST_HEAD
authorJulia Lawall <Julia.Lawall@lip6.fr>
Sun, 23 Dec 2018 08:56:57 +0000 (09:56 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 24 Dec 2018 22:22:14 +0000 (14:22 -0800)
Drop LIST_HEAD where the variable it declares is never used.

These became useless in 244cd96adb5f ("net_sched: remove list_head
from tc_action")

The semantic patch that fixes this problem is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
identifier x;
@@
- LIST_HEAD(x);
  ... when != x
// </smpl>

Fixes: 244cd96adb5f ("net_sched: remove list_head from tc_action")
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Reviewed-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c

index 4d6c9757afad6dddb059274a5cf5cae523e0da4c..cae6c6d489847629a45dce371cec4bc252c28372 100644 (file)
@@ -2183,7 +2183,6 @@ static bool modify_header_match_supported(struct mlx5_flow_spec *spec,
 {
        const struct tc_action *a;
        bool modify_ip_header;
-       LIST_HEAD(actions);
        u8 htype, ip_proto;
        void *headers_v;
        u16 ethertype;
@@ -2272,7 +2271,6 @@ static int parse_tc_nic_actions(struct mlx5e_priv *priv, struct tcf_exts *exts,
 {
        struct mlx5_nic_flow_attr *attr = flow->nic_attr;
        const struct tc_action *a;
-       LIST_HEAD(actions);
        u32 action = 0;
        int err, i;
 
@@ -2511,7 +2509,6 @@ static int parse_tc_fdb_actions(struct mlx5e_priv *priv, struct tcf_exts *exts,
        struct mlx5e_rep_priv *rpriv = priv->ppriv;
        struct ip_tunnel_info *info = NULL;
        const struct tc_action *a;
-       LIST_HEAD(actions);
        bool encap = false;
        u32 action = 0;
        int err, i;