Commit 08df1e05 authored by Keith Busch's avatar Keith Busch Committed by Matthew Wilcox

NVMe: Add result to nvme_get_features

nvme_get_features() was not returning the result.  Add a parameter
to return the result in (similar to nvme_set_features()) and change
all callers.
Signed-off-by: default avatarKeith Busch <keith.busch@intel.com>
Signed-off-by: default avatarMatthew Wilcox <matthew.r.wilcox@intel.com>
parent f4f117f6
...@@ -838,8 +838,8 @@ static int nvme_identify(struct nvme_dev *dev, unsigned nsid, unsigned cns, ...@@ -838,8 +838,8 @@ static int nvme_identify(struct nvme_dev *dev, unsigned nsid, unsigned cns,
return nvme_submit_admin_cmd(dev, &c, NULL); return nvme_submit_admin_cmd(dev, &c, NULL);
} }
static int nvme_get_features(struct nvme_dev *dev, unsigned fid, static int nvme_get_features(struct nvme_dev *dev, unsigned fid, unsigned nsid,
unsigned nsid, dma_addr_t dma_addr) dma_addr_t dma_addr, u32 *result)
{ {
struct nvme_command c; struct nvme_command c;
...@@ -849,7 +849,7 @@ static int nvme_get_features(struct nvme_dev *dev, unsigned fid, ...@@ -849,7 +849,7 @@ static int nvme_get_features(struct nvme_dev *dev, unsigned fid,
c.features.prp1 = cpu_to_le64(dma_addr); c.features.prp1 = cpu_to_le64(dma_addr);
c.features.fid = cpu_to_le32(fid); c.features.fid = cpu_to_le32(fid);
return nvme_submit_admin_cmd(dev, &c, NULL); return nvme_submit_admin_cmd(dev, &c, result);
} }
static int nvme_set_features(struct nvme_dev *dev, unsigned fid, static int nvme_set_features(struct nvme_dev *dev, unsigned fid,
...@@ -1535,7 +1535,7 @@ static int __devinit nvme_dev_add(struct nvme_dev *dev) ...@@ -1535,7 +1535,7 @@ static int __devinit nvme_dev_add(struct nvme_dev *dev)
continue; continue;
res = nvme_get_features(dev, NVME_FEAT_LBA_RANGE, i, res = nvme_get_features(dev, NVME_FEAT_LBA_RANGE, i,
dma_addr + 4096); dma_addr + 4096, NULL);
if (res) if (res)
continue; continue;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment