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>
This commit is contained in:
Max Gurtovoy 2021-01-10 11:19:03 +00:00 committed by Jason Gunthorpe
parent ec53a2a654
commit a6dc16b699

View File

@ -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;
}