Skip to content

Commit c5a9abf

Browse files
author
Christoph Hellwig
committed
nvmet: remove nvmet_req_cns_error_complete
Just fold it into the only caller. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
1 parent 9326353 commit c5a9abf

2 files changed

Lines changed: 4 additions & 9 deletions

File tree

drivers/nvme/target/admin-cmd.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -721,7 +721,10 @@ static void nvmet_execute_identify(struct nvmet_req *req)
721721
break;
722722
}
723723

724-
nvmet_req_cns_error_complete(req);
724+
pr_debug("unhandled identify cns %d on qid %d\n",
725+
req->cmd->identify.cns, req->sq->qid);
726+
req->error_loc = offsetof(struct nvme_identify, cns);
727+
nvmet_req_complete(req, NVME_SC_INVALID_FIELD | NVME_SC_DNR);
725728
}
726729

727730
/*

drivers/nvme/target/nvmet.h

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -687,14 +687,6 @@ static inline bool nvmet_use_inline_bvec(struct nvmet_req *req)
687687
req->sg_cnt <= NVMET_MAX_INLINE_BIOVEC;
688688
}
689689

690-
static inline void nvmet_req_cns_error_complete(struct nvmet_req *req)
691-
{
692-
pr_debug("unhandled identify cns %d on qid %d\n",
693-
req->cmd->identify.cns, req->sq->qid);
694-
req->error_loc = offsetof(struct nvme_identify, cns);
695-
nvmet_req_complete(req, NVME_SC_INVALID_FIELD | NVME_SC_DNR);
696-
}
697-
698690
static inline void nvmet_req_bio_put(struct nvmet_req *req, struct bio *bio)
699691
{
700692
if (bio != &req->b.inline_bio)

0 commit comments

Comments
 (0)