nvmet: use NVME_NSID_ALL
authorChristoph Hellwig <hch@lst.de>
Tue, 18 Jul 2017 17:46:36 +0000 (19:46 +0200)
committerChristoph Hellwig <hch@lst.de>
Mon, 28 Aug 2017 19:38:19 +0000 (21:38 +0200)
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Keith Busch <keith.busch@intel.com>
Reviewed-by: Max Gurtovoy <maxg@mellanox.com>
drivers/nvme/target/admin-cmd.c
drivers/nvme/target/configfs.c

index a53bb6635b8378d00f7fb4d367a16170d81a846e..dffd8064163bd201cdb93362197d19cf55faf603 100644 (file)
@@ -100,7 +100,7 @@ static u16 nvmet_get_smart_log(struct nvmet_req *req,
        u16 status;
 
        WARN_ON(req == NULL || slog == NULL);
-       if (req->cmd->get_log_page.nsid == cpu_to_le32(0xFFFFFFFF))
+       if (req->cmd->get_log_page.nsid == cpu_to_le32(NVME_NSID_ALL))
                status = nvmet_get_smart_log_all(req, slog);
        else
                status = nvmet_get_smart_log_nsid(req, slog);
index 0a0067e771f59d89114a07b5e12b307b820b2670..b6aeb1d709518105d6164395cd0e6c1bf5df39e3 100644 (file)
@@ -444,7 +444,7 @@ static struct config_group *nvmet_ns_make(struct config_group *group,
                goto out;
 
        ret = -EINVAL;
-       if (nsid == 0 || nsid == 0xffffffff)
+       if (nsid == 0 || nsid == NVME_NSID_ALL)
                goto out;
 
        ret = -ENOMEM;