[PATCH 1/2] nvme: Cleanup the definition of the controller config register fields

Christoph Hellwig hch at lst.de
Wed Feb 12 22:00:51 PST 2025


> +++ b/include/linux/nvme.h
> @@ -202,24 +202,35 @@ enum {
>  enum {
>  	NVME_CC_ENABLE		= 1 << 0,
>  	NVME_CC_EN_SHIFT	= 0,
> +
>  	NVME_CC_CSS_SHIFT	= 4,
> -	NVME_CC_MPS_SHIFT	= 7,
> -	NVME_CC_AMS_SHIFT	= 11,
> -	NVME_CC_SHN_SHIFT	= 14,
> -	NVME_CC_IOSQES_SHIFT	= 16,
> -	NVME_CC_IOCQES_SHIFT	= 20,
> +	NVME_CC_CSS_MASK	= 7 << NVME_CC_CSS_SHIFT,

While you're at it, maybe use a separate anonymous enum for each
field and a comment about which field it describes?




More information about the Linux-nvme mailing list