diff mbox series

[net-next] net: qed: use true,false for bool variables

Message ID 20200919074543.3460008-1-yanaijie@huawei.com
State New
Headers show
Series [net-next] net: qed: use true,false for bool variables | expand

Commit Message

Jason Yan Sept. 19, 2020, 7:45 a.m. UTC
This addresses the following coccinelle warning:

drivers/net/ethernet/qlogic/qed/qed_rdma.c:1465:2-13: WARNING:
Assignment of 0/1 to bool variable
drivers/net/ethernet/qlogic/qed/qed_rdma.c:1468:2-14: WARNING:
Assignment of 0/1 to bool variable
drivers/net/ethernet/qlogic/qed/qed_rdma.c:1471:2-13: WARNING:
Assignment of 0/1 to bool variable
drivers/net/ethernet/qlogic/qed/qed_rdma.c:1472:2-14: WARNING:
Assignment of 0/1 to bool variable

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Jason Yan <yanaijie@huawei.com>
---
 drivers/net/ethernet/qlogic/qed/qed_rdma.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Comments

David Miller Sept. 19, 2020, 9:24 p.m. UTC | #1
From: Jason Yan <yanaijie@huawei.com>

Date: Sat, 19 Sep 2020 15:45:43 +0800

> This addresses the following coccinelle warning:

> 

> drivers/net/ethernet/qlogic/qed/qed_rdma.c:1465:2-13: WARNING:

> Assignment of 0/1 to bool variable

> drivers/net/ethernet/qlogic/qed/qed_rdma.c:1468:2-14: WARNING:

> Assignment of 0/1 to bool variable

> drivers/net/ethernet/qlogic/qed/qed_rdma.c:1471:2-13: WARNING:

> Assignment of 0/1 to bool variable

> drivers/net/ethernet/qlogic/qed/qed_rdma.c:1472:2-14: WARNING:

> Assignment of 0/1 to bool variable

> 

> Reported-by: Hulk Robot <hulkci@huawei.com>

> Signed-off-by: Jason Yan <yanaijie@huawei.com>


Applied.
diff mbox series

Patch

diff --git a/drivers/net/ethernet/qlogic/qed/qed_rdma.c b/drivers/net/ethernet/qlogic/qed/qed_rdma.c
index 7a1a41791f52..da864d12916b 100644
--- a/drivers/net/ethernet/qlogic/qed/qed_rdma.c
+++ b/drivers/net/ethernet/qlogic/qed/qed_rdma.c
@@ -1463,14 +1463,14 @@  static int qed_rdma_modify_qp(void *rdma_cxt,
 
 	switch (qp->qp_type) {
 	case QED_RDMA_QP_TYPE_XRC_INI:
-		qp->has_req = 1;
+		qp->has_req = true;
 		break;
 	case QED_RDMA_QP_TYPE_XRC_TGT:
-		qp->has_resp = 1;
+		qp->has_resp = true;
 		break;
 	default:
-		qp->has_req = 1;
-		qp->has_resp = 1;
+		qp->has_req  = true;
+		qp->has_resp = true;
 	}
 
 	if (QED_IS_IWARP_PERSONALITY(p_hwfn)) {