mlxsw: spectrum: drop useless LIST_HEAD
authorJulia Lawall <Julia.Lawall@lip6.fr>
Sun, 23 Dec 2018 08:57:11 +0000 (09:57 +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.

The uses were removed in 244cd96adb5f ("net_sched: remove
list_head from tc_action"), but not the declaration.

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>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/spectrum.c

index c742a581f0d0a3315c78f4ab034b20a4c3693296..eed1045e4d9661754be226d78b6289e868616364 100644 (file)
@@ -1347,7 +1347,6 @@ static int mlxsw_sp_port_add_cls_matchall(struct mlxsw_sp_port *mlxsw_sp_port,
        struct mlxsw_sp_port_mall_tc_entry *mall_tc_entry;
        __be16 protocol = f->common.protocol;
        const struct tc_action *a;
-       LIST_HEAD(actions);
        int err;
 
        if (!tcf_exts_has_one_action(f->exts)) {