Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 Aug 2024 18:03:14 GMT
From:      John Baldwin <jhb@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 4846d72432a8 - stable/14 - camdd: Use the NVMEV macro instead of expanded versions
Message-ID:  <202408261803.47QI3EVj042502@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/14 has been updated by jhb:

URL: https://cgit.FreeBSD.org/src/commit/?id=4846d72432a89614d7ceb3522cf7b5ac0185c775

commit 4846d72432a89614d7ceb3522cf7b5ac0185c775
Author:     John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2024-01-29 18:50:41 +0000
Commit:     John Baldwin <jhb@FreeBSD.org>
CommitDate: 2024-08-26 17:26:24 +0000

    camdd: Use the NVMEV macro instead of expanded versions
    
    Reviewed by:    imp
    Sponsored by:   Chelsio Communications
    Differential Revision:  https://reviews.freebsd.org/D43599
    
    (cherry picked from commit c9d9315b74017b0637bcbcc2e7a5c01d7bc58bf1)
---
 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;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202408261803.47QI3EVj042502>