Commit c965809c authored by Stephen Bates's avatar Stephen Bates Committed by Jens Axboe

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: default avatarStephen Bates <sbates@raithlin.com>
Reviewed-by Jon Derrick: <jonathan.derrick@intel.com>
Signed-off-by: default avatarJens Axboe <axboe@fb.com>
parent 25cdb645
......@@ -1349,7 +1349,7 @@ static ssize_t nvme_cmb_show(struct device *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);
}
static DEVICE_ATTR(cmb, S_IRUGO, nvme_cmb_show, NULL);
......
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