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 1/2] nvmet: open code nvmet_get_feat_async_event()
Date: Wed, 9 Mar 2022 09:43:07 -0800	[thread overview]
Message-ID: <20220309174308.41832-2-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_async_event() for NVME_FEAT_ASYNC_EVENT.

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 6fb24746de06..e034ced953a3 100644
--- a/drivers/nvme/target/admin-cmd.c
+++ b/drivers/nvme/target/admin-cmd.c
@@ -894,11 +894,6 @@ void nvmet_get_feat_kato(struct nvmet_req *req)
 	nvmet_set_result(req, req->sq->ctrl->kato * 1000);
 }
 
-void nvmet_get_feat_async_event(struct nvmet_req *req)
-{
-	nvmet_set_result(req, READ_ONCE(req->sq->ctrl->aen_enabled));
-}
-
 void nvmet_execute_get_features(struct nvmet_req *req)
 {
 	struct nvmet_subsys *subsys = nvmet_req_subsys(req);
@@ -931,7 +926,7 @@ void nvmet_execute_get_features(struct nvmet_req *req)
 		break;
 #endif
 	case NVME_FEAT_ASYNC_EVENT:
-		nvmet_get_feat_async_event(req);
+		nvmet_set_result(req, READ_ONCE(req->sq->ctrl->aen_enabled));
 		break;
 	case NVME_FEAT_VOLATILE_WC:
 		nvmet_set_result(req, 1);
-- 
2.29.0



  reply	other threads:[~2022-03-09 18:01 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 ` Chaitanya Kulkarni [this message]
2022-03-09 17:43 ` [PATCH 2/2] nvmet: open code nvmet_get_feat_kato() Chaitanya Kulkarni
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-2-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