RDMA/vmw_pvrdma: Remove unnecessary check on wr->opcode
Subsystems (2)
PATCH 1/1 RDMA/vmw_pvrdma: Remove unnecessary check on wr->opcode
From: Bryan Tan <[email protected]>
wr->opcode is unsigned; checking if it is negative is unnecessary. Fix this issue by removing the check.
Fixes 29c8d9eba550 ("IB: Add vmw_pvrdma driver")
Reported-by Dan Carpenter <[email protected]>
Signed-off-by Bryan Tan <[email protected]>
--- drivers/infiniband/hw/vmw_pvrdma/pvrdma_qp.c | 8 -------- 1 file changed, 8 deletions(-)
drivers/infiniband/hw/vmw_pvrdma/pvrdma_qp.c +0 -8
@@ -709,14 +709,6 @@ int pvrdma_post_send(struct ib_qp *ibqp, const struct ib_send_wr *wr, goto out; } -if (unlikely (wr->opcode <0 )) { -dev_warn_ratelimited (&dev->pdev->dev, -"invalid send opcode\n" ); - *bad_wr = wr; - ret = -EINVAL ; - goto out; - } -/* * Only support UD, RC. * Need to check opcode table for thorough checking.
Signature · 1 line
2.25.1
Quoted 11 lines · On Mon, Jun 05, 2023 at 11:37:28AM -0700, [email protected] wrote:
From: Bryan Tan <[email protected]>
wr->opcodeis unsigned; checking if it is negative is unnecessary. Fix this issue by removing the check.Fixes 29c8d9eba550 ("IB: Add vmw_pvrdma driver")Reported-by Dan Carpenter <[email protected]>Signed-off-by Bryan Tan <[email protected]>--- drivers/infiniband/hw/vmw_pvrdma/pvrdma_qp.c | 8 -------- 1 file changed, 8 deletions(-)
Applied to for-next, thanks
Jason