Commit 49ef431d authored by Tomas Winkler's avatar Tomas Winkler Committed by Greg Kroah-Hartman

mei: bus: use simple sprintf for sysfs

Replace scnprintf with simple sprintf for sysfs files.
it is implicitly known that the buffer is big enough
for the variables to fit in.
Signed-off-by: default avatarTomas Winkler <tomas.winkler@intel.com>
Link: https://lore.kernel.org/r/20191126123002.4835-1-tomas.winkler@intel.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent c79f46a2
......@@ -765,7 +765,7 @@ static ssize_t uuid_show(struct device *dev, struct device_attribute *a,
struct mei_cl_device *cldev = to_mei_cl_device(dev);
const uuid_le *uuid = mei_me_cl_uuid(cldev->me_cl);
return scnprintf(buf, PAGE_SIZE, "%pUl", uuid);
return sprintf(buf, "%pUl", uuid);
}
static DEVICE_ATTR_RO(uuid);
......@@ -775,7 +775,7 @@ static ssize_t version_show(struct device *dev, struct device_attribute *a,
struct mei_cl_device *cldev = to_mei_cl_device(dev);
u8 version = mei_me_cl_ver(cldev->me_cl);
return scnprintf(buf, PAGE_SIZE, "%02X", version);
return sprintf(buf, "%02X", version);
}
static DEVICE_ATTR_RO(version);
......@@ -797,7 +797,7 @@ static ssize_t max_conn_show(struct device *dev, struct device_attribute *a,
struct mei_cl_device *cldev = to_mei_cl_device(dev);
u8 maxconn = mei_me_cl_max_conn(cldev->me_cl);
return scnprintf(buf, PAGE_SIZE, "%d", maxconn);
return sprintf(buf, "%d", maxconn);
}
static DEVICE_ATTR_RO(max_conn);
......@@ -807,7 +807,7 @@ static ssize_t fixed_show(struct device *dev, struct device_attribute *a,
struct mei_cl_device *cldev = to_mei_cl_device(dev);
u8 fixed = mei_me_cl_fixed(cldev->me_cl);
return scnprintf(buf, PAGE_SIZE, "%d", fixed);
return sprintf(buf, "%d", fixed);
}
static DEVICE_ATTR_RO(fixed);
......@@ -817,7 +817,7 @@ static ssize_t max_len_show(struct device *dev, struct device_attribute *a,
struct mei_cl_device *cldev = to_mei_cl_device(dev);
u32 maxlen = mei_me_cl_max_len(cldev->me_cl);
return scnprintf(buf, PAGE_SIZE, "%u", maxlen);
return sprintf(buf, "%u", maxlen);
}
static DEVICE_ATTR_RO(max_len);
......
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