[PATCH 1/2] nvmet: open code nvmet_get_feat_async_event()

Chaitanya Kulkarni kch at nvidia.com
Wed Mar 9 09:43:07 PST 2022


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 at 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




More information about the Linux-nvme mailing list