Skip to contentSkip to conversation

RDMA/irdma: Fix return error sign from irdma_modify_qp

PATCH Applied Kamal Heib 3 participants 3 messages Jun 7, 2021

Subsystems (2)
lore
Share & tools
lore

Kamal Heib

author
#0 lore raw

PATCH 1/1 RDMA/irdma: Fix return error sign from irdma_modify_qp

There is a typo in the returned error code sign from irdma_modify_qp() when the attr_mask is not supported - Fix it.

Fixes b48c24c2d710 ("RDMA/irdma: Implement device supported verb APIs")
---
 drivers/infiniband/hw/irdma/verbs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/infiniband/hw/irdma/verbs.c +1 -1
index 294155293243..154ca25e7e32 100644
@@ -1472,7 +1472,7 @@ int irdma_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr, int attr_mask,
 	unsigned long flags;
 
 	if (attr_mask & ~IB_QP_ATTR_STANDARD_BITS)
-		return ~EOPNOTSUPP;
+		return -EOPNOTSUPP;
 
 	ctx_info = &iwqp->ctx_info;
 	offload_info = &iwqp->iwarp_info;
Signature · 1 line
2.26.3
Acked-by on v1 1/1
#1 lore raw
Quoted 17 lines

Subject: [PATCH for-next] RDMA/irdma: Fix return error sign from irdma_modify_qp

There is a typo in the returned error code sign from irdma_modify_qp() when the attr_mask is not supported - Fix it.

Fixes b48c24c2d710 ("RDMA/irdma: Implement device supported verb APIs")
---
 drivers/infiniband/hw/irdma/verbs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/infiniband/hw/irdma/verbs.c +0 -0
index 294155293243..154ca25e7e32 100644

drivers/infiniband/hw/irdma/verbs.c int irdma_modify_qp(struct ib_qp *ibqp, struct · line 1477

Quoted 7 lines
drivers/infiniband/hw/irdma/verbs.c +1 -1
@@ -1472,7 +1472,7 @@ int irdma_modify_qp(struct ib_qp *ibqp, struct
 ib_qp_attr *attr, int attr_mask,
 	unsigned long flags;
 
 	if (attr_mask & ~IB_QP_ATTR_STANDARD_BITS)
-		return ~EOPNOTSUPP;
+		return -EOPNOTSUPP;
 

Oops. That's a bad one. Thanks!

maintainer Applied
#2 lore raw
In reply to Kamal Heib
Quoted 9 lines · Kamal Heib

There is a typo in the returned error code sign from irdma_modify_qp() when the attr_mask is not supported - Fix it.

Fixes b48c24c2d710 ("RDMA/irdma: Implement device supported verb APIs")
---
 drivers/infiniband/hw/irdma/verbs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Applied to for-next, thanks

Jason