From: Christoph Hellwig <hch@lst.de>
To: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Cc: kbusch@kernel.org, sagi@grimberg.me,
linux-nvme@lists.infradead.org, hch@lst.de
Subject: Re: [PATCH 1/2] nvme-core: cleanup nvme_pr_type()
Date: Tue, 3 Nov 2020 19:08:23 +0100 [thread overview]
Message-ID: <20201103180823.GA22028@lst.de> (raw)
In-Reply-To: <20201029185958.7013-2-chaitanya.kulkarni@wdc.com>
On Thu, Oct 29, 2020 at 11:59:57AM -0700, Chaitanya Kulkarni wrote:
> The switch in the nvme_pr_type() returns values which can be mapped 1:1
> on the PR_XXX macors. Get rid of the long switch and replace with simple
> conditional operator to return the value.
We'd need BUILD_BUG_ON statements to check this all actually maps.
At which point just doing the mapping as done in the current code seem
much more sensible for something that isn't exactly a fast path.
_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme
next prev parent reply other threads:[~2020-11-03 18:08 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-29 18:59 [PATCH 0/2] nvme-core: pr related small cleanups Chaitanya Kulkarni
2020-10-29 18:59 ` [PATCH 1/2] nvme-core: cleanup nvme_pr_type() Chaitanya Kulkarni
2020-11-03 18:08 ` Christoph Hellwig [this message]
2020-10-29 18:59 ` [PATCH 2/2] nvme-core: add new line after variable declatation Chaitanya Kulkarni
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=20201103180823.GA22028@lst.de \
--to=hch@lst.de \
--cc=chaitanya.kulkarni@wdc.com \
--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.