[PATCH] nvme: use BIT_MASK and GENMASK for NVME definitions
Tokunori Ikegami
ikegami.t at gmail.com
Thu Nov 14 06:43:22 PST 2024
On 2024/11/14 14:14, Christoph Hellwig wrote:
> No, why would it be?
Understood. (The reason is BIT() used more than BIT_MASK() in kernel and
also still I think better to use the macro instead of the shift operator
as below.) Thank you.
#define BIT(nr) (UL(1) << (nr))
...
- NVME_CMBSZ_SQS = 1 << 0,
- NVME_CMBSZ_CQS = 1 << 1,
- NVME_CMBSZ_LISTS = 1 << 2,
- NVME_CMBSZ_RDS = 1 << 3,
- NVME_CMBSZ_WDS = 1 << 4,
+ NVME_CMBSZ_SQS = BIT(0),
+ NVME_CMBSZ_CQS = BIT(1),
+ NVME_CMBSZ_LISTS = BIT(2),
+ NVME_CMBSZ_RDS = BIT(3),
+ NVME_CMBSZ_WDS = BIT(4),
More information about the Linux-nvme
mailing list