Commit a6dc16b6 authored by Max Gurtovoy's avatar Max Gurtovoy Committed by Jason Gunthorpe

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.comReviewed-by: default avatarIsrael Rukshin <israelr@nvidia.com>
Signed-off-by: default avatarMax Gurtovoy <mgurtovoy@nvidia.com>
Acked-by: default avatarSagi Grimberg <sagi@grimberg.me>
Signed-off-by: default avatarJason Gunthorpe <jgg@nvidia.com>
parent ec53a2a6
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment