]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
nvmet: remove nvmet_req_cns_error_complete
authorChristoph Hellwig <hch@lst.de>
Wed, 22 Mar 2023 08:08:59 +0000 (09:08 +0100)
committerChristoph Hellwig <hch@lst.de>
Thu, 13 Apr 2023 06:55:05 +0000 (08:55 +0200)
Just fold it into the only caller.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
drivers/nvme/target/admin-cmd.c
drivers/nvme/target/nvmet.h

index afdf69f925997a6127241c930dbcc8e33cff5aeb..39cb570f833dde9ec57ed406547ffbbf705e546f 100644 (file)
@@ -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);
 }
 
 /*
index 2c1522d4063bde20b6e0cdcdbca935ab54e0a7d0..dc60a22646f783eb61655bed66c33e0d7ff5fb14 100644 (file)
@@ -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)