diff mbox series

[06/20] IB/ipoib: drop useless LIST_HEAD

Message ID 1545555435-24576-7-git-send-email-Julia.Lawall@lip6.fr (mailing list archive)
State Accepted
Delegated to: Jason Gunthorpe
Headers show
Series drop useless LIST_HEAD | expand

Commit Message

Julia Lawall Dec. 23, 2018, 8:57 a.m. UTC
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>

---
Successfully 0-day tested on 151 configurations.

 drivers/infiniband/ulp/ipoib/ipoib_ib.c |    1 -
 1 file changed, 1 deletion(-)

Comments

Leon Romanovsky Dec. 23, 2018, 9:41 a.m. UTC | #1
On Sun, Dec 23, 2018 at 09:57:01AM +0100, Julia Lawall wrote:
> 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>
>

Thanks,
Reviewed-by: Leon Romanovsky <leonro@mellanox.com>
Jason Gunthorpe Jan. 2, 2019, 10:48 p.m. UTC | #2
On Sun, Dec 23, 2018 at 09:57:01AM +0100, Julia Lawall wrote:
> 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>
> ---
> Successfully 0-day tested on 151 configurations.
> 
>  drivers/infiniband/ulp/ipoib/ipoib_ib.c |    1 -
>  1 file changed, 1 deletion(-)

Applied to rdma for-next thanks

Jason
diff mbox series

Patch

diff --git a/drivers/infiniband/ulp/ipoib/ipoib_ib.c b/drivers/infiniband/ulp/ipoib/ipoib_ib.c
index 6d35570092d6..78fa777c87b1 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib_ib.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_ib.c
@@ -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);