Date: Mon, 26 Aug 2024 18:03:17 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: 80a92f1b91ed - stable/14 - nvme: Rename NVMEB helper macro to NVMEM Message-ID: <202408261803.47QI3HUn042611@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=80a92f1b91ed90a5245651507b1af8c4fb616136 commit 80a92f1b91ed90a5245651507b1af8c4fb616136 Author: John Baldwin <jhb@FreeBSD.org> AuthorDate: 2024-01-29 18:58:28 +0000 Commit: John Baldwin <jhb@FreeBSD.org> CommitDate: 2024-08-26 17:26:38 +0000 nvme: Rename NVMEB helper macro to NVMEM The current macro always builds a full mask for a named field, so use the M suffix for mask. Reviewed by: chuck, imp Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D43601 (cherry picked from commit 1dade1f255ee535ad357211395b46188bece52dc) --- sys/dev/nvme/nvme.h | 2 +- usr.sbin/bhyve/pci_nvme.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/dev/nvme/nvme.h b/sys/dev/nvme/nvme.h index cb5e1a5f1118..7b3cdd89f146 100644 --- a/sys/dev/nvme/nvme.h +++ b/sys/dev/nvme/nvme.h @@ -605,7 +605,7 @@ enum nvme_critical_warning_state { #define NVME_FEAT_SET_FID_MASK (0xff) /* Helper macro to combine *_MASK and *_SHIFT defines */ -#define NVMEB(name) (name##_MASK << name##_SHIFT) +#define NVMEM(name) (name##_MASK << name##_SHIFT) /* Helper macro to extract value from x */ #define NVMEV(name, x) (((x) >> name##_SHIFT) & name##_MASK) diff --git a/usr.sbin/bhyve/pci_nvme.c b/usr.sbin/bhyve/pci_nvme.c index dd6c9a41d17f..2d426fb19096 100644 --- a/usr.sbin/bhyve/pci_nvme.c +++ b/usr.sbin/bhyve/pci_nvme.c @@ -538,12 +538,12 @@ pci_nvme_init_ctrldata(struct pci_nvme_softc *sc) cd->cntrltype = NVME_CNTRLTYPE_IO; cd->oacs = 1 << NVME_CTRLR_DATA_OACS_FORMAT_SHIFT; - cd->oaes = NVMEB(NVME_CTRLR_DATA_OAES_NS_ATTR); + cd->oaes = NVMEM(NVME_CTRLR_DATA_OAES_NS_ATTR); cd->acl = 2; cd->aerl = 4; /* Advertise 1, Read-only firmware slot */ - cd->frmw = NVMEB(NVME_CTRLR_DATA_FRMW_SLOT1_RO) | + cd->frmw = NVMEM(NVME_CTRLR_DATA_FRMW_SLOT1_RO) | (1 << NVME_CTRLR_DATA_FRMW_NUM_SLOTS_SHIFT); cd->lpa = 0; /* TODO: support some simple things like SMART */ cd->elpe = 0; /* max error log page entries */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202408261803.47QI3HUn042611>