[PATCH] nvme: use BIT_MASK and GENMASK for NVME definitions
Christoph Hellwig
hch at infradead.org
Thu Nov 14 07:31:26 PST 2024
On Thu, Nov 14, 2024 at 11:43:22PM +0900, Tokunori Ikegami wrote:
> 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.
And this still make the code less readable. 1 << 2 is totally
obvious to any one with the most basic knowledge of C. BIT(1) OTOH
requires looking up the definition.
More information about the Linux-nvme
mailing list