All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Keith Busch <kbusch@kernel.org>
Cc: Christoph Hellwig <hch@lst.de>,
	linux-nvme@lists.infradead.org, sagi@grimberg.me
Subject: Re: [PATCHv2] nvme: define constants for identification values
Date: Tue, 7 Apr 2020 19:25:59 +0200	[thread overview]
Message-ID: <20200407172559.GA6876@lst.de> (raw)
In-Reply-To: <20200404170742.GA53042@C02WT3WMHTD6>

On Sat, Apr 04, 2020 at 11:07:42AM -0600, Keith Busch wrote:
> 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.

Sometimes they do, but especially for nvme they often don't.  Anyway,
I'd like to hear from Sagi and/or Jens to see if we have more people
who like this or don't instead of just us two having different
preferences.

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

  reply	other threads:[~2020-04-07 17:26 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
2020-04-07 17:25     ` Christoph Hellwig [this message]
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=20200407172559.GA6876@lst.de \
    --to=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.