public inbox for linux-nvme@lists.infradead.org
 help / color / mirror / Atom feed
From: Chaitanya Kulkarni <kch@nvidia.com>
To: <linux-nvme@lists.infradead.org>
Cc: <hch@lst.de>, <sagi@grimberg.me>, Chaitanya Kulkarni <kch@nvidia.com>
Subject: [PATCH 2/2] nvmet: open code nvmet_get_feat_kato()
Date: Wed, 9 Mar 2022 09:43:08 -0800	[thread overview]
Message-ID: <20220309174308.41832-3-kch@nvidia.com> (raw)
In-Reply-To: <20220309174308.41832-1-kch@nvidia.com>

Just like we have open coded NVME_FEAT_HOST_ID handling, open code one
liner function nvmet_get_feat_kato() for NVME_FEAT_KATO.

Signed-off-by: Chaitanya Kulkarni <kch@nvidia.com>
---
 drivers/nvme/target/admin-cmd.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/drivers/nvme/target/admin-cmd.c b/drivers/nvme/target/admin-cmd.c
index e034ced953a3..50db5dfc1929 100644
--- a/drivers/nvme/target/admin-cmd.c
+++ b/drivers/nvme/target/admin-cmd.c
@@ -889,11 +889,6 @@ static u16 nvmet_get_feat_write_protect(struct nvmet_req *req)
 	return 0;
 }
 
-void nvmet_get_feat_kato(struct nvmet_req *req)
-{
-	nvmet_set_result(req, req->sq->ctrl->kato * 1000);
-}
-
 void nvmet_execute_get_features(struct nvmet_req *req)
 {
 	struct nvmet_subsys *subsys = nvmet_req_subsys(req);
@@ -936,7 +931,7 @@ void nvmet_execute_get_features(struct nvmet_req *req)
 			(subsys->max_qid-1) | ((subsys->max_qid-1) << 16));
 		break;
 	case NVME_FEAT_KATO:
-		nvmet_get_feat_kato(req);
+		nvmet_set_result(req, req->sq->ctrl->kato * 1000);
 		break;
 	case NVME_FEAT_HOST_ID:
 		/* need 128-bit host identifier flag */
-- 
2.29.0



  parent reply	other threads:[~2022-03-09 17:43 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-09 17:43 [PATCH 0/2] nvmet: nvme_excute_get_feat() cleanup Chaitanya Kulkarni
2022-03-09 17:43 ` [PATCH 1/2] nvmet: open code nvmet_get_feat_async_event() Chaitanya Kulkarni
2022-03-09 17:43 ` Chaitanya Kulkarni [this message]
2022-03-14  7:42 ` [PATCH 0/2] nvmet: nvme_excute_get_feat() cleanup Christoph Hellwig
2022-03-14 23:00   ` Chaitanya Kulkarni
2022-03-15  6:30     ` Christoph Hellwig
2022-03-14 23:05   ` 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=20220309174308.41832-3-kch@nvidia.com \
    --to=kch@nvidia.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox