Skip to content

Commit

Permalink
rpmsg: convert sysfs snprintf to sysfs_emit
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Xuezhi Zhang authored and Bjorn Andersson committed Jul 17, 2022
1 parent 6538258 commit 7113ac8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/rpmsg/qcom_glink_native.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 7113ac8

Please sign in to comment.