All of lore.kernel.org
 help / color / mirror / Atom feed
From: Keith Busch <kbusch@kernel.org>
To: Christoph Hellwig <hch@lst.de>
Cc: sagi@grimberg.me, linux-nvme@lists.infradead.org
Subject: Re: [PATCHv2] nvme: define constants for identification values
Date: Sat, 4 Apr 2020 11:07:42 -0600	[thread overview]
Message-ID: <20200404170742.GA53042@C02WT3WMHTD6> (raw)
In-Reply-To: <20200404070437.GA14423@lst.de>

On Sat, Apr 04, 2020 at 09:04:37AM +0200, Christoph Hellwig wrote:
> On Fri, Apr 03, 2020 at 10:53:46AM -0700, Keith Busch wrote:
> > Improve code readability by defining the specification's constants that
> > the driver is using when decoding identification payloads.
> > 
> > Signed-off-by: Keith Busch <kbusch@kernel.org>
> 
> I can't say I find this an improvement - the bit values allow you
> to jump straight to the spec, while the names need a translation
> (either to the actual bit or the spec name without underscores and co
> first).

Named constants tell us what they are inline with the code that's
using it. You can make sense of the code just by reading the code,
no additional docs or code comments required.

_______________________________________________
linux-nvme mailing list
linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

  reply	other threads:[~2020-04-04 17:07 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-03 17:53 [PATCHv2] nvme: define constants for identification values Keith Busch
2020-04-03 20:08 ` Chaitanya Kulkarni
2020-04-04  7:04 ` Christoph Hellwig
2020-04-04 17:07   ` Keith Busch [this message]
2020-04-07 17:25     ` Christoph Hellwig
2020-04-07 17:47       ` Sagi Grimberg
2020-04-07 18:16         ` Keith Busch
2020-04-07 20:37           ` Sagi Grimberg
2020-04-10  2:34 ` Bart Van Assche
2020-04-10  5:08   ` Keith Busch
2020-04-10  5:53     ` Sagi Grimberg
2020-05-06  6:56 ` 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=20200404170742.GA53042@C02WT3WMHTD6 \
    --to=kbusch@kernel.org \
    --cc=hch@lst.de \
    --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.