Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Max Gurtovoy and committed by
Jason Gunthorpe
a6dc16b6 ec53a2a6

+4 -2
+4 -2
drivers/infiniband/ulp/isert/ib_isert.c
··· 230 230 } 231 231 232 232 /* Check signature cap */ 233 - device->pi_capable = ib_dev->attrs.device_cap_flags & 234 - IB_DEVICE_INTEGRITY_HANDOVER ? true : false; 233 + if (ib_dev->attrs.device_cap_flags & IB_DEVICE_INTEGRITY_HANDOVER) 234 + device->pi_capable = true; 235 + else 236 + device->pi_capable = false; 235 237 236 238 return 0; 237 239 }