Commit 7113ac82 authored by Xuezhi Zhang's avatar Xuezhi Zhang Committed by Bjorn Andersson

rpmsg: convert sysfs snprintf to sysfs_emit

Fix the following coccicheck warning:
drivers/rpmsg/qcom_glink_native.c:1677:8-16:
WARNING: use scnprintf or sprintf
Signed-off-by: default avatarXuezhi Zhang <zhangxuezhi1@coolpad.com>
Signed-off-by: default avatarBjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20220607120649.78436-1-zhangxuezhi1@coolpad.com
parent 65382585
...@@ -1672,7 +1672,7 @@ static ssize_t rpmsg_name_show(struct device *dev, ...@@ -1672,7 +1672,7 @@ static ssize_t rpmsg_name_show(struct device *dev,
if (ret < 0) if (ret < 0)
name = dev->of_node->name; name = dev->of_node->name;
return snprintf(buf, RPMSG_NAME_SIZE, "%s\n", name); return sysfs_emit(buf, "%s\n", name);
} }
static DEVICE_ATTR_RO(rpmsg_name); static DEVICE_ATTR_RO(rpmsg_name);
......
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