From: Christoph Hellwig <hch@infradead.org>
To: Tokunori Ikegami <ikegami.t@gmail.com>
Cc: Christoph Hellwig <hch@infradead.org>, linux-nvme@lists.infradead.org
Subject: Re: [PATCH] nvme: use BIT_MASK and GENMASK for NVME definitions
Date: Thu, 14 Nov 2024 07:31:26 -0800 [thread overview]
Message-ID: <ZzYXzuM-8AjwVVl_@infradead.org> (raw)
In-Reply-To: <26444a5c-8b93-4aa6-ab7e-891a83811afa@gmail.com>
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.
prev parent reply other threads:[~2024-11-14 15:33 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-11 17:09 [PATCH] nvme: use BIT_MASK and GENMASK for NVME definitions Tokunori Ikegami
2024-11-12 4:26 ` Christoph Hellwig
2024-11-13 15:14 ` Tokunori Ikegami
2024-11-14 5:14 ` Christoph Hellwig
2024-11-14 14:43 ` Tokunori Ikegami
2024-11-14 15:31 ` Christoph Hellwig [this message]
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=ZzYXzuM-8AjwVVl_@infradead.org \
--to=hch@infradead.org \
--cc=ikegami.t@gmail.com \
--cc=linux-nvme@lists.infradead.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox