From: Damien Le Moal <dlemoal@kernel.org>
To: Christoph Hellwig <hch@lst.de>
Cc: linux-nvme@lists.infradead.org, Keith Busch <kbusch@kernel.org>,
Sagi Grimberg <sagi@grimberg.me>
Subject: Re: [PATCH 1/2] nvme: Cleanup the definition of the controller config register fields
Date: Thu, 13 Feb 2025 15:07:51 +0900 [thread overview]
Message-ID: <9455ccc9-75d4-4329-938f-e5691d92caa5@kernel.org> (raw)
In-Reply-To: <20250213060051.GD19506@lst.de>
On 2025/02/13 15:00, Christoph Hellwig wrote:
>> +++ 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?
I find the single enum for all the fields of the same u32 register to be a nice
grouping of things. But I agree that more comments would indeed be nice.
I can add that. But do we really need separate enums for each field ?
--
Damien Le Moal
Western Digital Research
next prev parent reply other threads:[~2025-02-13 6:07 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-10 0:29 [PATCH 0/2] Cleanup controller configuration register handling Damien Le Moal
2025-02-10 0:29 ` [PATCH 1/2] nvme: Cleanup the definition of the controller config register fields Damien Le Moal
2025-02-12 18:26 ` Chaitanya Kulkarni
2025-02-13 6:00 ` Christoph Hellwig
2025-02-13 6:07 ` Damien Le Moal [this message]
2025-02-13 6:23 ` Christoph Hellwig
2025-02-13 6:24 ` Damien Le Moal
2025-02-10 0:29 ` [PATCH 2/2] nvmet: Use enum definitions instead of hardcoded values Damien Le Moal
2025-02-12 18:26 ` Chaitanya Kulkarni
2025-02-13 6:01 ` Christoph Hellwig
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9455ccc9-75d4-4329-938f-e5691d92caa5@kernel.org \
--to=dlemoal@kernel.org \
--cc=hch@lst.de \
--cc=kbusch@kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=sagi@grimberg.me \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.