Skip to contentSkip to conversation

IB/hfi1: Delete an unneeded bool conversion

PATCH Applied Zhen Lei 2 participants 2 messages May 10, 2021 – May 11, 2021

Subsystems (2)
lore
Share & tools
lore

Zhen Lei

author
#0 lore raw

PATCH 1/1 IB/hfi1: Delete an unneeded bool conversion

The result of an expression consisting of a single relational operator is already of the bool type and does not need to be evaluated explicitly.

No functional change.

---
 drivers/infiniband/hw/hfi1/tid_rdma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/infiniband/hw/hfi1/tid_rdma.c +1 -1
index 0b1f9e4d038b06c..233ea48b72c80c0 100644
@@ -1115,7 +1115,7 @@ static u32 kern_find_pages(struct tid_rdma_flow *flow,
 	}
 
 	flow->length = flow->req->seg_len - length;
-	*last = req->isge == ss->num_sge ? false : true;
+	*last = req->isge != ss->num_sge;
 	return i;
 }
 
Signature · 1 line
2.26.0.106.g9fadedd
maintainer Applied
#1 lore raw
Quoted 9 lines · Zhen Lei

The result of an expression consisting of a single relational operator is already of the bool type and does not need to be evaluated explicitly.

No functional change.

---
 drivers/infiniband/hw/hfi1/tid_rdma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Applied to for-next, thanks

Jason