diff options
author | Max Gurtovoy <mgurtovoy@nvidia.com> | 2021-01-10 14:19:03 +0300 |
---|---|---|
committer | Jason Gunthorpe <jgg@nvidia.com> | 2021-01-18 23:59:04 +0300 |
commit | a6dc16b6996388d016df83fb92eae16242ab7ac5 (patch) | |
tree | 1eccf8b5be8e5975c8c91ed3a77fcc1e436d4642 /drivers/infiniband/ulp | |
parent | ec53a2a6540d6025f0ff205af0ba635c9b1cce02 (diff) | |
download | linux-a6dc16b6996388d016df83fb92eae16242ab7ac5.tar.xz |
IB/isert: Simplify signature cap check
Use if/else clause instead of "condition ? val1 : val2" to make the code
cleaner and simpler.
Link: https://lore.kernel.org/r/20210110111903.486681-3-mgurtovoy@nvidia.com
Reviewed-by: Israel Rukshin <israelr@nvidia.com>
Signed-off-by: Max Gurtovoy <mgurtovoy@nvidia.com>
Acked-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Diffstat (limited to 'drivers/infiniband/ulp')
-rw-r--r-- | drivers/infiniband/ulp/isert/ib_isert.c | 6 |
1 files 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; } |