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
This commit is contained in:
Xuezhi Zhang 2022-06-07 20:06:49 +08:00 committed by Bjorn Andersson
parent 65382585f0
commit 7113ac8253

View File

@ -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);