From: Max Gurtovoy Date: Sun, 10 Jan 2021 11:19:03 +0000 (+0000) Subject: IB/isert: Simplify signature cap check X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=a6dc16b6996388d016df83fb92eae16242ab7ac5;p=linux.git 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 Signed-off-by: Max Gurtovoy Acked-by: Sagi Grimberg Signed-off-by: Jason Gunthorpe --- diff --git a/drivers/infiniband/ulp/isert/ib_isert.c b/drivers/infiniband/ulp/isert/ib_isert.c index 96514f6754271..7305ed8976c24 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; }