mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-12 05:24:12 +08:00
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:
parent
ec53a2a654
commit
a6dc16b699
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user