From nobody Mon Aug 26 18:03:18 2024 X-Original-To: dev-commits-src-branches@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 4Wsz7B4g6kz5TLZW; Mon, 26 Aug 2024 18:03:18 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Wsz7B3F2yz44mQ; Mon, 26 Aug 2024 18:03:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1724695398; 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=ILtue+TKeRppPhMQCbXQCBlIa7kOPuGe2y5ov4xkZTg=; b=NlZkxUqN6UNV9m+DZoswG0kFnY////0lZYv2a5Gnjw9I1PaA3jit4UpN3L9rY+bdS7GhhC BUzn9SgXyyVZuNg2pfmuwYehRIpruNBvVZCaHms8tg6IG3sQRHJRNoSp6h/VUDeiABysTm kKM+b1iYrsUulQcjBeskrsoOvQOA7nKKTH0WVuyznZUPCJNWqHs3eshXmimBzP+Gz18NXP XYD2cdQd4nyim+Oy0dibrXEqJ1X8HDE8PSyqcUQwIk0iWcRSwQHxKhLc5qQihPTCDbRiAy mgXV+0Q4m++YIQKuacK8IeESLFhIkrPVN5UV9l9yoIW4fi++gow7Jr8OAyD4RQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1724695398; a=rsa-sha256; cv=none; b=R1zOqZsmArspOw0XfxslO4pAEyNyxa2VATcXeIgwxCJcKc03aOVlW2aDzI8DcB+/c7Z3pg qmBXAGJD1f/PiKkr/QO8GcaOChavMwILNopwueIkuKQOtEhfk3FjZ3sxGTYQwYWLhDud+a YCDiqz1fKVVrk5JAGLsy+SR3SaXDPdlE758Jl0H3v8HdJmpz2QfPEpQSnzzibVURD5QtIk vT0j1ZwExtMr8U9Bar8wbsCJt/VYFqBz3KQnBYoALJh0qK93ll6gQcLb5WUfZmfudaGEk9 SwGJs5PHSJyyFVO3XJ0wHlA13X/7ryAv+LHSvzmTZcDMzqACAsawNygBO0GLyQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1724695398; 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=ILtue+TKeRppPhMQCbXQCBlIa7kOPuGe2y5ov4xkZTg=; b=oQZAkWI7NC/wN0o82G8bXwI/Ab+qcX5mJWJWO89fWXVCk0dCOTaprANWWPuZ9ANl2G9ORn zAMhcepX8CbiurGmoBN18T5BOMRCUSfVXEHPCmg93FlNB/s231Too3i8QWcruMTiNyqvxe I0Roj159P1IJfyORv8FsWKBiutHHNg8IDPTqJAo2gz0Wpi9KYiEWrUNp7qHOV5JMJhAubG GMvNZ+BzOg2teUQxcdl78cSqEqQICKXB8WH8uAxHsf9jzWQMgoda1JlZnOmWYgLb50vWsY pvPFBFNWru7mfS258+YYKbRCjPVAQmKIj6RtIbwV1FQM2UdDVglbiAha9fMOoQ== 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 4Wsz7B2qkBzH4L; Mon, 26 Aug 2024 18:03:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 47QI3IMJ042671; Mon, 26 Aug 2024 18:03:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 47QI3IRS042668; Mon, 26 Aug 2024 18:03:18 GMT (envelope-from git) Date: Mon, 26 Aug 2024 18:03:18 GMT Message-Id: <202408261803.47QI3IRS042668@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 2208f2c15688 - stable/14 - nvme: Use the NVMEM macro instead of expanded versions List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 2208f2c15688e6b517680535053bfba39b67c0a4 Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=2208f2c15688e6b517680535053bfba39b67c0a4 commit 2208f2c15688e6b517680535053bfba39b67c0a4 Author: John Baldwin AuthorDate: 2024-01-29 18:59:37 +0000 Commit: John Baldwin CommitDate: 2024-08-26 17:26:47 +0000 nvme: Use the NVMEM macro instead of expanded versions A few of these omitted a shift of 0, but this is more consistent. Reviewed by: chuck Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D43602 (cherry picked from commit 8488fc417fc24af37fa6f1e880f09a5023670950) --- sys/dev/nvme/nvme_ctrlr.c | 6 +++--- sys/dev/nvme/nvme_ns.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/dev/nvme/nvme_ctrlr.c b/sys/dev/nvme/nvme_ctrlr.c index 7096f0443f1d..3ef5a2b51544 100644 --- a/sys/dev/nvme/nvme_ctrlr.c +++ b/sys/dev/nvme/nvme_ctrlr.c @@ -326,7 +326,7 @@ nvme_ctrlr_disable(struct nvme_controller *ctrlr) return (err); } - cc &= ~NVME_CC_REG_EN_MASK; + cc &= ~NVMEM(NVME_CC_REG_EN); nvme_mmio_write_4(ctrlr, cc, cc); /* @@ -1258,7 +1258,7 @@ nvme_pt_done(void *arg, const struct nvme_completion *cpl) pt->cpl.cdw0 = cpl->cdw0; status = cpl->status; - status &= ~NVME_STATUS_P_MASK; + status &= ~NVMEM(NVME_STATUS_P); pt->cpl.status = status; mtx_lock(mtx); @@ -1600,7 +1600,7 @@ nvme_ctrlr_shutdown(struct nvme_controller *ctrlr) int timeout; cc = nvme_mmio_read_4(ctrlr, cc); - cc &= ~(NVME_CC_REG_SHN_MASK << NVME_CC_REG_SHN_SHIFT); + cc &= ~NVMEM(NVME_CC_REG_SHN); cc |= NVME_SHN_NORMAL << NVME_CC_REG_SHN_SHIFT; nvme_mmio_write_4(ctrlr, cc, cc); diff --git a/sys/dev/nvme/nvme_ns.c b/sys/dev/nvme/nvme_ns.c index 329b8d583898..c172663f75a3 100644 --- a/sys/dev/nvme/nvme_ns.c +++ b/sys/dev/nvme/nvme_ns.c @@ -286,7 +286,7 @@ nvme_bio_child_inbed(struct bio *parent, int bio_error) if (inbed == children) { bzero(&parent_cpl, sizeof(parent_cpl)); if (parent->bio_flags & BIO_ERROR) { - parent_cpl.status &= ~(NVME_STATUS_SC_MASK << NVME_STATUS_SC_SHIFT); + parent_cpl.status &= ~NVMEM(NVME_STATUS_SC); parent_cpl.status |= (NVME_SC_DATA_TRANSFER_ERROR) << NVME_STATUS_SC_SHIFT; } nvme_ns_bio_done(parent, &parent_cpl);