summaryrefslogtreecommitdiffstats
path: root/drivers/rpmsg
diff options
context:
space:
mode:
authorXuezhi Zhang <zhangxuezhi1@coolpad.com>2022-06-07 14:06:49 +0200
committerBjorn Andersson <bjorn.andersson@linaro.org>2022-07-17 06:08:47 +0200
commit7113ac825371c17c15e2d0be79d850e5e16d3328 (patch)
treea253011962b452f3fb726da4142fe3056e23989c /drivers/rpmsg
parentrpmsg: qcom_smd: Fix refcount leak in qcom_smd_parse_edge (diff)
downloadlinux-7113ac825371c17c15e2d0be79d850e5e16d3328.tar.xz
linux-7113ac825371c17c15e2d0be79d850e5e16d3328.zip
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: Xuezhi Zhang <zhangxuezhi1@coolpad.com> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org> Link: https://lore.kernel.org/r/20220607120649.78436-1-zhangxuezhi1@coolpad.com
Diffstat (limited to 'drivers/rpmsg')
-rw-r--r--drivers/rpmsg/qcom_glink_native.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/rpmsg/qcom_glink_native.c b/drivers/rpmsg/qcom_glink_native.c
index 72a1c0fd091d..115c0a1eddb1 100644
--- a/drivers/rpmsg/qcom_glink_native.c
+++ b/drivers/rpmsg/qcom_glink_native.c
@@ -1672,7 +1672,7 @@ static ssize_t rpmsg_name_show(struct device *dev,
if (ret < 0)
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);