git: c9d9315b7401 - main - camdd: Use the NVMEV macro instead of expanded versions
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 29 Jan 2024 19:03:04 UTC
The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=c9d9315b74017b0637bcbcc2e7a5c01d7bc58bf1 commit c9d9315b74017b0637bcbcc2e7a5c01d7bc58bf1 Author: John Baldwin <jhb@FreeBSD.org> AuthorDate: 2024-01-29 18:50:41 +0000 Commit: John Baldwin <jhb@FreeBSD.org> CommitDate: 2024-01-29 18:50:41 +0000 camdd: Use the NVMEV macro instead of expanded versions Reviewed by: imp Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D43599 --- usr.sbin/camdd/camdd.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/usr.sbin/camdd/camdd.c b/usr.sbin/camdd/camdd.c index 4f15aa8eedcf..1f067113c562 100644 --- a/usr.sbin/camdd/camdd.c +++ b/usr.sbin/camdd/camdd.c @@ -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;