diff mbox series

[8/8] IB/qib: Remove a set-but-not-used variable

Message ID 20190321172417.77869-9-bvanassche@acm.org (mailing list archive)
State Superseded
Headers show
Series Multiple fixes for issues reported by static checkers | expand

Commit Message

Bart Van Assche March 21, 2019, 5:24 p.m. UTC
This patch avoids that a compiler warning is reported when building with W=1.

Cc: CQ Tang <cq.tang@intel.com>
CC: Mike Marciniszyn <mike.marciniszyn@intel.com>
Cc: Dean Luick <dean.luick@intel.com>
Cc: John A Gregor <john.a.gregor@intel.com>
Cc: Mitko Haralanov <mitko.haralanov@intel.com>
Fixes: 49c0e2414b20 ("IB/qib: Change SDMA progression mode depending on single- or multi-rail") # v3.15
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
---
 drivers/infiniband/hw/qib/qib_user_sdma.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

Comments

Leon Romanovsky March 26, 2019, 10:26 a.m. UTC | #1
On Thu, Mar 21, 2019 at 10:24:17AM -0700, Bart Van Assche wrote:
> This patch avoids that a compiler warning is reported when building with W=1.
>
> Cc: CQ Tang <cq.tang@intel.com>
> CC: Mike Marciniszyn <mike.marciniszyn@intel.com>
> Cc: Dean Luick <dean.luick@intel.com>
> Cc: John A Gregor <john.a.gregor@intel.com>
> Cc: Mitko Haralanov <mitko.haralanov@intel.com>
> Fixes: 49c0e2414b20 ("IB/qib: Change SDMA progression mode depending on single- or multi-rail") # v3.15
> Signed-off-by: Bart Van Assche <bvanassche@acm.org>
> ---
>  drivers/infiniband/hw/qib/qib_user_sdma.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
>

Thanks,
Reviewed-by: Leon Romanovsky <leonro@mellanox.com>
diff mbox series

Patch

diff --git a/drivers/infiniband/hw/qib/qib_user_sdma.c b/drivers/infiniband/hw/qib/qib_user_sdma.c
index 31c523b2a9f5..ef19d39a44b1 100644
--- a/drivers/infiniband/hw/qib/qib_user_sdma.c
+++ b/drivers/infiniband/hw/qib/qib_user_sdma.c
@@ -225,8 +225,6 @@  qib_user_sdma_queue_create(struct device *dev, int unit, int ctxt, int sctxt)
 	if (sdma_rb_node) {
 		sdma_rb_node->refcount++;
 	} else {
-		int ret;
-
 		sdma_rb_node = kmalloc(sizeof(
 			struct qib_user_sdma_rb_node), GFP_KERNEL);
 		if (!sdma_rb_node)
@@ -235,8 +233,7 @@  qib_user_sdma_queue_create(struct device *dev, int unit, int ctxt, int sctxt)
 		sdma_rb_node->refcount = 1;
 		sdma_rb_node->pid = current->pid;
 
-		ret = qib_user_sdma_rb_insert(&qib_user_sdma_rb_root,
-					sdma_rb_node);
+		qib_user_sdma_rb_insert(&qib_user_sdma_rb_root, sdma_rb_node);
 	}
 	pq->sdma_rb_node = sdma_rb_node;