Linux RDMA and InfiniBand development
 help / color / mirror / Atom feed
From: Max Gurtovoy <mgurtovoy@nvidia.com>
To: <linux-rdma@vger.kernel.org>, <dledford@redhat.com>,
	<jgg@nvidia.com>, <leonro@nvidia.com>, <sagi@grimberg.me>
Cc: <oren@nvidia.com>, Max Gurtovoy <mgurtovoy@nvidia.com>,
	Israel Rukshin <israelr@nvidia.com>
Subject: [PATCH 3/3] IB/isert: simplify signature cap check
Date: Sun, 10 Jan 2021 11:19:03 +0000	[thread overview]
Message-ID: <20210110111903.486681-3-mgurtovoy@nvidia.com> (raw)
In-Reply-To: <20210110111903.486681-1-mgurtovoy@nvidia.com>

Use if/else clause instead of "condition ? val1 : val2" to make the code
cleaner and simpler.

Reviewed-by: Israel Rukshin <israelr@nvidia.com>
Signed-off-by: Max Gurtovoy <mgurtovoy@nvidia.com>
---
 drivers/infiniband/ulp/isert/ib_isert.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/infiniband/ulp/isert/ib_isert.c b/drivers/infiniband/ulp/isert/ib_isert.c
index 96514f675427..7305ed8976c2 100644
--- a/drivers/infiniband/ulp/isert/ib_isert.c
+++ b/drivers/infiniband/ulp/isert/ib_isert.c
@@ -230,8 +230,10 @@ isert_create_device_ib_res(struct isert_device *device)
 	}
 
 	/* Check signature cap */
-	device->pi_capable = ib_dev->attrs.device_cap_flags &
-			     IB_DEVICE_INTEGRITY_HANDOVER ? true : false;
+	if (ib_dev->attrs.device_cap_flags & IB_DEVICE_INTEGRITY_HANDOVER)
+		device->pi_capable = true;
+	else
+		device->pi_capable = false;
 
 	return 0;
 }
-- 
2.25.4


  parent reply	other threads:[~2021-01-10 11:20 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-10 11:19 [PATCH 1/3] IB/isert: remove unneeded new lines Max Gurtovoy
2021-01-10 11:19 ` [PATCH 2/3] IB/isert: remove unneeded semicolon Max Gurtovoy
2021-01-10 11:36   ` Leon Romanovsky
2021-01-10 12:07     ` Max Gurtovoy
2021-01-14  0:07   ` Sagi Grimberg
2021-01-10 11:19 ` Max Gurtovoy [this message]
2021-01-14  0:08   ` [PATCH 3/3] IB/isert: simplify signature cap check Sagi Grimberg
2021-01-14  7:29     ` Leon Romanovsky
2021-01-14 12:49       ` Jason Gunthorpe
2021-01-14 12:54         ` Max Gurtovoy
2021-01-14 13:00           ` Leon Romanovsky
2021-01-14 12:59         ` Leon Romanovsky
2021-01-14  0:06 ` [PATCH 1/3] IB/isert: remove unneeded new lines Sagi Grimberg
2021-01-18 21:02 ` Jason Gunthorpe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210110111903.486681-3-mgurtovoy@nvidia.com \
    --to=mgurtovoy@nvidia.com \
    --cc=dledford@redhat.com \
    --cc=israelr@nvidia.com \
    --cc=jgg@nvidia.com \
    --cc=leonro@nvidia.com \
    --cc=linux-rdma@vger.kernel.org \
    --cc=oren@nvidia.com \
    --cc=sagi@grimberg.me \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox