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:
parent
65382585f0
commit
7113ac8253
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user