From nobody Mon Jan 29 19:03:04 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TNyP46FF0z59DQd; Mon, 29 Jan 2024 19:03:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TNyP44HZMz40Qg; Mon, 29 Jan 2024 19:03:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706554984; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tHjg/ZjJ6hPya7y4UfjkodkFtVU8mU+pKb32PMhUjcI=; b=Pw590AgKnZlmUBqNmhYf+fCuXfTNRqIqhubi7dd8506zfBOzAxv+HHAORvMELXEm9+QUv8 O7Zx/Xb5FSlsZG/tlUCYYx2XJn7JezZakfX58iIwQi2cg8K9nBr/XVzIbR0OueeWcnzu86 2y2RZrhz+D8BApZs/RYmaeWrchUBcouYpz2+DoS9mN3zh5LHOL0bSo8YAnikPsUsrhjDMi dtYt+ZtUqLqbupk2o+MbEbSGREgd5sjZP3GRzVkwLee6T0VZxmURRGJDpdIzINJ5DYs7Gl FoEcghKra2+Xq3K4gtXdaxS6wbMYCi3OfwwlapLJwDD7g8uoTjWe18214bFOhw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706554984; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tHjg/ZjJ6hPya7y4UfjkodkFtVU8mU+pKb32PMhUjcI=; b=wwruz0wXoYffBJ1M5/GegaQWUDDG5vjMiXJlxn/xH+lNq4nYOsbptSAH8YYp8yXjeYjOXo jsrxTBIEjVJXpS+AbJ7aL3bUWO2++KurkD89WmHR9PJavAA7aF8oy6Pyn3jvEaj1uHNhcO XkB2Rw2B+H+OrDvn8XxqUP8gAaTCfdU9laKfWvTjeOlr20UXl05nyCU590qkdD3HnWmAdf s6912ZeImONVYy9WqKwle7f08dKIzOcnvqTy4uKKBUI8wFQ8yKxGZWT1h2Wc9xNpM8LNZI oXxQa1SNCGwSmH9Rx+stTPFjvAklGx2JNJr08nDlY3/MDrxuc9pct8qyyj6QGg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706554984; a=rsa-sha256; cv=none; b=g45o+ocT57jsPGUH8k57kLkadn8HL/hpE3WEl6FmSJ9s2uLFR8Sxdgwe2vB22pI1rmyiDz +eg2NZYDvKyvqpi9b1/AeADzOenX2EwE75AnPgjUXBgSeJd8iZ0DzAASmf21xGrxU4SI0L 032d7FCpfF9dFxIV1y+KwpJBtPR17uozMYgVKheJGu9JU8GYJcoR+f2u0GhZweGe2xU/YR VlutI1Pm39xEPiaNxWSOjbDxKhHMtw38qtDo9QvPA9dekI5f9XiTuoC60XUe6sk4m9Bux6 wZ/JrTYT6SZKoqGS1YXmN61dbkPfxfnhzPnV4FBM/aPeaHYVDXx1v0OepsIcyA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TNyP43LY3z13ll; Mon, 29 Jan 2024 19:03:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 40TJ34XZ058524; Mon, 29 Jan 2024 19:03:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40TJ34s7058521; Mon, 29 Jan 2024 19:03:04 GMT (envelope-from git) Date: Mon, 29 Jan 2024 19:03:04 GMT Message-Id: <202401291903.40TJ34s7058521@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: c9d9315b7401 - main - camdd: Use the NVMEV macro instead of expanded versions List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c9d9315b74017b0637bcbcc2e7a5c01d7bc58bf1 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=c9d9315b74017b0637bcbcc2e7a5c01d7bc58bf1 commit c9d9315b74017b0637bcbcc2e7a5c01d7bc58bf1 Author: John Baldwin AuthorDate: 2024-01-29 18:50:41 +0000 Commit: John Baldwin 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;