From nobody Mon Jan 29 19:03:07 2024 X-Original-To: dev-commits-src-main@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 4TNyP83xNrz59DH8; Mon, 29 Jan 2024 19:03:08 +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 4TNyP8111jz40FJ; Mon, 29 Jan 2024 19:03:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706554988; 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=b5uDpk/m1ojFHlP9+LBEvJP+labRJi9NAThbtQrivyI=; b=NJVAbbzxTOFUU20R10hNIEXbrL446m772fXkKCpfYFzxP9w5a/Ie3olG+Lzagn/e28uPli JjjkN1Z127//bVilETNqjfFVCLmVhAkTOc91gKpWOyUPK/92IV2LpdJCmj+pAYYFfidH6Q oZLzI/iXGi1jpy/5FpvOTydNZIsjxSxn+fuQmF7Vi+oDIzNbXle5USjsmG0aNsDolL+mQW ShDNnv+sUoneMMM0Hzj+NPMdrF6IFbWe0q27WhbQDdUPoIwDRxRJ/KRb5oanbu27I8HbtJ 9d62mW6yeCcxLBUxnlDDkjAvq/j2JRDECnqVrV0GZ2Udfj+SCX43l7Lt59qhHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706554988; 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=b5uDpk/m1ojFHlP9+LBEvJP+labRJi9NAThbtQrivyI=; b=WpkwYymjtTD+5+qVZpIFKQHPJ45hLBpUsF/iBfLT9tNCRJH+jjpInU75oy6cZ82XJLiopC ry469guNWhqLVJ6y5iXQzIRN0kox9Mz2dv9jT2seJqH+qe4NaD7UzMvQxovmOVnu4Rx16e jenu9E7Gw+wKlFFtSitCIhK5Gah1silTlcJR/bYXuvtJ3tjr9X8E5EVexTb0yZXY9MYWcJ kiDp3FRmwqRPyhsDkfRIPwDNJeHMNJvSiVoFjtq8Y4vC7KSwS0ak35kkbJCMD4s+yK4j4z Bmhbv+meoj44JWqXsMVYn8HbWzfUEiaPgAaWDBe434Ljj5Norn31pVvS80SpTA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706554988; a=rsa-sha256; cv=none; b=KzTNYWseUyiCvB8Gj0+RsiyynY9Nd1ux4ywk5v0ll5CP0b1T+WMrtCFReEKwYrUi8gTBAZ EH30QAXmVBsM5p5AfgbqH0CSAANqcPOBEStforH1iyMll5bmB7Mi5kX1O9AXiW56UnYArC yhOZy1ddMePg0B437xk/ciiC/QOSRfoIGaGhafZXAedKBS2/yj1m4lt8NCari5U+sQbBEn mqcHUNEuuaODISum/z65Pj1hs00oysBNfj8i+CaulYsaqV+QMmpFrcfUkNSiNTn59nIur6 8AcCWiL58dX3TFcdlBAy8Hi8ZqscAksu/4h8axRatuCNkfXRhfMnFRemQEGUAg== 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 4TNyP75wdbz13jW; Mon, 29 Jan 2024 19:03:07 +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 40TJ37Fr058698; Mon, 29 Jan 2024 19:03:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40TJ37dC058696; Mon, 29 Jan 2024 19:03:07 GMT (envelope-from git) Date: Mon, 29 Jan 2024 19:03:07 GMT Message-Id: <202401291903.40TJ37dC058696@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: 8488fc417fc2 - main - nvme: Use the NVMEM macro instead of expanded versions List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@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: 8488fc417fc24af37fa6f1e880f09a5023670950 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=8488fc417fc24af37fa6f1e880f09a5023670950 commit 8488fc417fc24af37fa6f1e880f09a5023670950 Author: John Baldwin AuthorDate: 2024-01-29 18:59:37 +0000 Commit: John Baldwin CommitDate: 2024-01-29 18:59:37 +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 --- 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 ad56141a556d..c662371aebfd 100644 --- a/sys/dev/nvme/nvme_ctrlr.c +++ b/sys/dev/nvme/nvme_ctrlr.c @@ -295,7 +295,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); /* @@ -1215,7 +1215,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); @@ -1556,7 +1556,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 89779f23ad4d..8826a1f5ff8f 100644 --- a/sys/dev/nvme/nvme_ns.c +++ b/sys/dev/nvme/nvme_ns.c @@ -285,7 +285,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);