summaryrefslogtreecommitdiffstats
path: root/drivers/nvme/target/fabrics-cmd.c
diff options
context:
space:
mode:
authorParav Pandit <parav@mellanox.com>2017-02-28 06:21:33 +0100
committerJens Axboe <axboe@fb.com>2017-04-04 17:48:23 +0200
commit64a0ca88eaa66e3d219296b17aa08b78894e42c8 (patch)
treeda9d6c8470ede1cc415e7117d29cd3a5a9baed1d /drivers/nvme/target/fabrics-cmd.c
parentnvmet: Fixed avoided printing nvmet: twice in error logs. (diff)
downloadlinux-64a0ca88eaa66e3d219296b17aa08b78894e42c8.tar.xz
linux-64a0ca88eaa66e3d219296b17aa08b78894e42c8.zip
nvmet: Introduced helper routine for controller status check.
This patch introduces helper function for checking controller status during admin and io command processing which returns u16 status. As to bring consistency on returning status, other friend functions also now return u16 status instead of int to match the spec. As part of the theseerror log prints in also prints qid on which command error occured. Signed-off-by: Parav Pandit <parav@mellanox.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Sagi Grimberg <sagi@grimberg.me> Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'drivers/nvme/target/fabrics-cmd.c')
-rw-r--r--drivers/nvme/target/fabrics-cmd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/nvme/target/fabrics-cmd.c b/drivers/nvme/target/fabrics-cmd.c
index 8bd022af3df6..2a3c15b57f6e 100644
--- a/drivers/nvme/target/fabrics-cmd.c
+++ b/drivers/nvme/target/fabrics-cmd.c
@@ -73,7 +73,7 @@ static void nvmet_execute_prop_get(struct nvmet_req *req)
nvmet_req_complete(req, status);
}
-int nvmet_parse_fabrics_cmd(struct nvmet_req *req)
+u16 nvmet_parse_fabrics_cmd(struct nvmet_req *req)
{
struct nvme_command *cmd = req->cmd;
@@ -214,7 +214,7 @@ out_ctrl_put:
goto out;
}
-int nvmet_parse_connect_cmd(struct nvmet_req *req)
+u16 nvmet_parse_connect_cmd(struct nvmet_req *req)
{
struct nvme_command *cmd = req->cmd;