summaryrefslogtreecommitdiff
path: root/drivers/nvme/target/admin-cmd.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2016-09-30 14:51:10 +0300
committerJens Axboe <axboe@fb.com>2016-10-19 20:36:22 +0300
commite9c9346e20c1b18a3ec30defd5ff7134bcc0da6d (patch)
tree59f0374ef21752149323ff4e5d05cbc5f5c016e4 /drivers/nvme/target/admin-cmd.c
parentfa60682677c594d81e9b68b8a4046cde75a7374b (diff)
downloadlinux-e9c9346e20c1b18a3ec30defd5ff7134bcc0da6d.tar.xz
nvmet: use symbolic constants for CNS values
Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Gabriel Krisman Bertazi <krisman@linux.vnet.ibm.com> Reviewed-by: Jay Freyensee <james_p_freyensee@linux.intel.com> Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'drivers/nvme/target/admin-cmd.c')
-rw-r--r--drivers/nvme/target/admin-cmd.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/nvme/target/admin-cmd.c b/drivers/nvme/target/admin-cmd.c
index 6944f246e562..6fe4c48a21e4 100644
--- a/drivers/nvme/target/admin-cmd.c
+++ b/drivers/nvme/target/admin-cmd.c
@@ -511,13 +511,13 @@ int nvmet_parse_admin_cmd(struct nvmet_req *req)
case nvme_admin_identify:
req->data_len = 4096;
switch (le32_to_cpu(cmd->identify.cns)) {
- case 0x00:
+ case NVME_ID_CNS_NS:
req->execute = nvmet_execute_identify_ns;
return 0;
- case 0x01:
+ case NVME_ID_CNS_CTRL:
req->execute = nvmet_execute_identify_ctrl;
return 0;
- case 0x02:
+ case NVME_ID_CNS_NS_ACTIVE_LIST:
req->execute = nvmet_execute_identify_nslist;
return 0;
}