camdd: Use the NVMEV macro instead of expanded versions

Reviewed by:	imp
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D43599
This commit is contained in:
John Baldwin 2024-01-29 10:50:41 -08:00
parent 94962f5a72
commit c9d9315b74

View File

@ -1430,9 +1430,8 @@ camdd_probe_pass_nvme(struct cam_device *cam_dev, union ccb *ccb,
*maxsector = nsdata.nsze;
/* The LBA Data Size (LBADS) is reported as a power of 2 */
format = nsdata.flbas & NVME_NS_DATA_FLBAS_FORMAT_MASK;
lbads = (nsdata.lbaf[format] >> NVME_NS_DATA_LBAF_LBADS_SHIFT) &
NVME_NS_DATA_LBAF_LBADS_MASK;
format = NVMEV(NVME_NS_DATA_FLBAS_FORMAT, nsdata.flbas);
lbads = NVMEV(NVME_NS_DATA_LBAF_LBADS, nsdata.lbaf[format]);
*block_len = 1 << lbads;
retval = 0;