diff options
author | Max Gurtovoy <maxg@mellanox.com> | 2017-03-06 00:30:38 +0200 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2017-04-04 09:48:23 -0600 |
commit | 2ca0786d5a66b919acac865b11b51df43f9457a2 (patch) | |
tree | fc19468ef1ca4f5a46c0d9cdbf9339f4f8ad1595 /drivers/nvme/target/admin-cmd.c | |
parent | 64a0ca88eaa66e3d219296b17aa08b78894e42c8 (diff) | |
download | linux-2ca0786d5a66b919acac865b11b51df43f9457a2.tar.bz2 |
nvmet: use symbolic constants for log identifiers
Signed-off-by: Max Gurtovoy <maxg@mellanox.com>
Reviewed-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/admin-cmd.c')
-rw-r--r-- | drivers/nvme/target/admin-cmd.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/nvme/target/admin-cmd.c b/drivers/nvme/target/admin-cmd.c index 105ace88d07e..7ddf75b4d1df 100644 --- a/drivers/nvme/target/admin-cmd.c +++ b/drivers/nvme/target/admin-cmd.c @@ -121,7 +121,7 @@ static void nvmet_execute_get_log_page(struct nvmet_req *req) } switch (req->cmd->get_log_page.lid) { - case 0x01: + case NVME_LOG_ERROR: /* * We currently never set the More bit in the status field, * so all error log entries are invalid and can be zeroed out. @@ -129,7 +129,7 @@ static void nvmet_execute_get_log_page(struct nvmet_req *req) * mandatory log page. */ break; - case 0x02: + case NVME_LOG_SMART: /* * XXX: fill out actual smart log * @@ -149,7 +149,7 @@ static void nvmet_execute_get_log_page(struct nvmet_req *req) goto err; } break; - case 0x03: + case NVME_LOG_FW_SLOT: /* * We only support a single firmware slot which always is * active, so we can zero out the whole firmware slot log and @@ -496,9 +496,9 @@ u16 nvmet_parse_admin_cmd(struct nvmet_req *req) req->data_len = nvmet_get_log_page_len(cmd); switch (cmd->get_log_page.lid) { - case 0x01: - case 0x02: - case 0x03: + case NVME_LOG_ERROR: + case NVME_LOG_SMART: + case NVME_LOG_FW_SLOT: req->execute = nvmet_execute_get_log_page; return 0; } |