diff options
author | Xuezhi Zhang <zhangxuezhi1@coolpad.com> | 2022-06-07 14:06:49 +0200 |
---|---|---|
committer | Bjorn Andersson <bjorn.andersson@linaro.org> | 2022-07-17 06:08:47 +0200 |
commit | 7113ac825371c17c15e2d0be79d850e5e16d3328 (patch) | |
tree | a253011962b452f3fb726da4142fe3056e23989c /drivers | |
parent | rpmsg: qcom_smd: Fix refcount leak in qcom_smd_parse_edge (diff) | |
download | linux-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')
-rw-r--r-- | drivers/rpmsg/qcom_glink_native.c | 2 |
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); |