[PATCH 2/2] nvmet: open code nvmet_get_feat_kato()

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


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




More information about the Linux-nvme mailing list