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

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: 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
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -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;
}