linux-rdma.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] IB/hfi1: Delete an unneeded bool conversion
@ 2021-05-10 12:06 Zhen Lei
  2021-05-11 20:06 ` Jason Gunthorpe
  0 siblings, 1 reply; 2+ messages in thread
From: Zhen Lei @ 2021-05-10 12:06 UTC (permalink / raw)
  To: Mike Marciniszyn, Dennis Dalessandro, Doug Ledford,
	Jason Gunthorpe, linux-rdma
  Cc: 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.

Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
---
 drivers/infiniband/hw/hfi1/tid_rdma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/infiniband/hw/hfi1/tid_rdma.c b/drivers/infiniband/hw/hfi1/tid_rdma.c
index 0b1f9e4d038b06c..233ea48b72c80c0 100644
--- a/drivers/infiniband/hw/hfi1/tid_rdma.c
+++ b/drivers/infiniband/hw/hfi1/tid_rdma.c
@@ -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;
 }
 
-- 
2.26.0.106.g9fadedd



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH 1/1] IB/hfi1: Delete an unneeded bool conversion
  2021-05-10 12:06 [PATCH 1/1] IB/hfi1: Delete an unneeded bool conversion Zhen Lei
@ 2021-05-11 20:06 ` Jason Gunthorpe
  0 siblings, 0 replies; 2+ messages in thread
From: Jason Gunthorpe @ 2021-05-11 20:06 UTC (permalink / raw)
  To: Zhen Lei; +Cc: Mike Marciniszyn, Dennis Dalessandro, Doug Ledford, linux-rdma

On Mon, May 10, 2021 at 08:06:35PM +0800, Zhen Lei wrote:
> 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.
> 
> Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
> ---
>  drivers/infiniband/hw/hfi1/tid_rdma.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Applied to for-next, thanks

Jason

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-05-11 20:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-05-10 12:06 [PATCH 1/1] IB/hfi1: Delete an unneeded bool conversion Zhen Lei
2021-05-11 20:06 ` Jason Gunthorpe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).