diff mbox series

[for-next,1/2] RDMA/bnxt_re: Remove incorrect return check from slow path

Message ID 20230616061700.741769-1-kashyap.desai@broadcom.com (mailing list archive)
State Accepted
Delegated to: Jason Gunthorpe
Headers show
Series [for-next,1/2] RDMA/bnxt_re: Remove incorrect return check from slow path | expand

Commit Message

Kashyap Desai June 16, 2023, 6:16 a.m. UTC
The patch 691eb7c6110f: "RDMA/bnxt_re: handle command
completions after driver detect a timedout" introduced code resulting in
below warning issued by the smatch static checker.

        drivers/infiniband/hw/bnxt_re/qplib_rcfw.c:513 __bnxt_qplib_rcfw_send_message()
        warn: duplicate check 'rc' (previous on line 506)

Fix the warning by removing incorrect code block.

Fixes: 691eb7c6110f ("RDMA/bnxt_re: handle command completions after driver detect a timedout")
Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: Kashyap Desai <kashyap.desai@broadcom.com>
Signed-off-by: Selvin Xavier <selvin.xavier@broadcom.com>
---
 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c | 6 ------
 1 file changed, 6 deletions(-)

Comments

Jason Gunthorpe June 26, 2023, 1:27 p.m. UTC | #1
On Fri, Jun 16, 2023 at 11:46:59AM +0530, Kashyap Desai wrote:
> The patch 691eb7c6110f: "RDMA/bnxt_re: handle command
> completions after driver detect a timedout" introduced code resulting in
> below warning issued by the smatch static checker.
> 
>         drivers/infiniband/hw/bnxt_re/qplib_rcfw.c:513 __bnxt_qplib_rcfw_send_message()
>         warn: duplicate check 'rc' (previous on line 506)
> 
> Fix the warning by removing incorrect code block.
> 
> Fixes: 691eb7c6110f ("RDMA/bnxt_re: handle command completions after driver detect a timedout")
> Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
> Signed-off-by: Kashyap Desai <kashyap.desai@broadcom.com>
> Signed-off-by: Selvin Xavier <selvin.xavier@broadcom.com>
> ---
>  drivers/infiniband/hw/bnxt_re/qplib_rcfw.c | 6 ------
>  1 file changed, 6 deletions(-)

Both applied to for-next, thanks

Jason
diff mbox series

Patch

diff --git a/drivers/infiniband/hw/bnxt_re/qplib_rcfw.c b/drivers/infiniband/hw/bnxt_re/qplib_rcfw.c
index bb5aebafe162..30c6e865d691 100644
--- a/drivers/infiniband/hw/bnxt_re/qplib_rcfw.c
+++ b/drivers/infiniband/hw/bnxt_re/qplib_rcfw.c
@@ -503,12 +503,6 @@  static int __bnxt_qplib_rcfw_send_message(struct bnxt_qplib_rcfw *rcfw,
 		rc = __wait_for_resp(rcfw, cookie);
 	else
 		rc = __poll_for_resp(rcfw, cookie);
-	if (rc) {
-		/* timed out */
-		dev_err(&rcfw->pdev->dev, "cmdq[%#x]=%#x timedout (%d)msec\n",
-			cookie, opcode, RCFW_CMD_WAIT_TIME_MS);
-		return rc;
-	}
 
 	if (rc) {
 		spin_lock_irqsave(&rcfw->cmdq.hwq.lock, flags);