Browse Source

nvme : Use correct scnprintf in cmb show

Make sure we are using the correct scnprintf in the sysfs show
function for the CMB.

Signed-off-by: Stephen Bates <sbates@raithlin.com>
Reviewed-by Jon Derrick: <jonathan.derrick@intel.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
Stephen Bates 8 years ago
parent
commit
c965809c66
1 changed files with 2 additions and 2 deletions
  1. 2 2
      drivers/nvme/host/pci.c

+ 2 - 2
drivers/nvme/host/pci.c

@@ -50,7 +50,7 @@
 #define NVME_AQ_DEPTH		256
 #define NVME_AQ_DEPTH		256
 #define SQ_SIZE(depth)		(depth * sizeof(struct nvme_command))
 #define SQ_SIZE(depth)		(depth * sizeof(struct nvme_command))
 #define CQ_SIZE(depth)		(depth * sizeof(struct nvme_completion))
 #define CQ_SIZE(depth)		(depth * sizeof(struct nvme_completion))
-		
+
 /*
 /*
  * We handle AEN commands ourselves and don't even let the
  * We handle AEN commands ourselves and don't even let the
  * block layer know about them.
  * block layer know about them.
@@ -1349,7 +1349,7 @@ static ssize_t nvme_cmb_show(struct device *dev,
 {
 {
 	struct nvme_dev *ndev = to_nvme_dev(dev_get_drvdata(dev));
 	struct nvme_dev *ndev = to_nvme_dev(dev_get_drvdata(dev));
 
 
-	return snprintf(buf, PAGE_SIZE, "cmbloc : x%08x\ncmbsz  : x%08x\n",
+	return scnprintf(buf, PAGE_SIZE, "cmbloc : x%08x\ncmbsz  : x%08x\n",
 		       ndev->cmbloc, ndev->cmbsz);
 		       ndev->cmbloc, ndev->cmbsz);
 }
 }
 static DEVICE_ATTR(cmb, S_IRUGO, nvme_cmb_show, NULL);
 static DEVICE_ATTR(cmb, S_IRUGO, nvme_cmb_show, NULL);