IB/ipoib: drop useless LIST_HEAD
authorJulia Lawall <Julia.Lawall@lip6.fr>
Sun, 23 Dec 2018 08:57:01 +0000 (09:57 +0100)
committerJason Gunthorpe <jgg@mellanox.com>
Wed, 2 Jan 2019 22:42:43 +0000 (15:42 -0700)
Drop LIST_HEAD where the variable it declares is never used.

Commit 31c02e215700 ("IPoIB: Avoid using stale last_send counter
when reaping AHs") removed the uses, 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: 31c02e215700 ("IPoIB: Avoid using stale last_send counter when reaping AHs")
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Reviewed-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/ulp/ipoib/ipoib_ib.c

index 6d35570092d67bbfd0814739126fc7a372085d42..78fa777c87b1997c0f7ab8629801338923070aea 100644 (file)
@@ -669,7 +669,6 @@ static void __ipoib_reap_ah(struct net_device *dev)
 {
        struct ipoib_dev_priv *priv = ipoib_priv(dev);
        struct ipoib_ah *ah, *tah;
-       LIST_HEAD(remove_list);
        unsigned long flags;
 
        netif_tx_lock_bh(dev);