Skip to contentSkip to conversation

nvmet: remove nvmet_req_cns_error_complete

PATCH In review Christoph Hellwig 3 participants 3 messages Mar 22, 2023

Subsystems (2)
lore
Share & tools
lore

Christoph Hellwig

author maintainer
#0 lore raw

PATCH 1/1 nvmet: remove nvmet_req_cns_error_complete

Just fold it into the only caller.

---
 drivers/nvme/target/admin-cmd.c | 5 ++++-
 drivers/nvme/target/nvmet.h     | 8 --------
 2 files changed, 4 insertions(+), 9 deletions(-)
drivers/nvme/target/admin-cmd.c +4 -1
index afdf69f925997a..39cb570f833dde 100644
@@ -721,7 +721,10 @@ static void nvmet_execute_identify(struct nvmet_req *req)
 		break;
 	}
 
-	nvmet_req_cns_error_complete(req);
+	pr_debug("unhandled identify cns %d on qid %d\n",
+	       req->cmd->identify.cns, req->sq->qid);
+	req->error_loc = offsetof(struct nvme_identify, cns);
+	nvmet_req_complete(req, NVME_SC_INVALID_FIELD | NVME_SC_DNR);
 }
 
 /*
drivers/nvme/target/nvmet.h +0 -8
index 2c1522d4063bde..dc60a22646f783 100644
@@ -687,14 +687,6 @@ static inline bool nvmet_use_inline_bvec(struct nvmet_req *req)
 	       req->sg_cnt <= NVMET_MAX_INLINE_BIOVEC;
 }
 
-static inline void nvmet_req_cns_error_complete(struct nvmet_req *req)
-{
-	pr_debug("unhandled identify cns %d on qid %d\n",
-	       req->cmd->identify.cns, req->sq->qid);
-	req->error_loc = offsetof(struct nvme_identify, cns);
-	nvmet_req_complete(req, NVME_SC_INVALID_FIELD | NVME_SC_DNR);
-}
-
 static inline void nvmet_req_bio_put(struct nvmet_req *req, struct bio *bio)
 {
 	if (bio != &req->b.inline_bio)
Signature · 1 line
2.39.2