diff options
author | Xuezhi Zhang <zhangxuezhi1@coolpad.com> | 2022-06-07 15:06:49 +0300 |
---|---|---|
committer | Bjorn Andersson <bjorn.andersson@linaro.org> | 2022-07-17 07:08:47 +0300 |
commit | 7113ac825371c17c15e2d0be79d850e5e16d3328 (patch) | |
tree | a253011962b452f3fb726da4142fe3056e23989c | |
parent | 65382585f067d4256ba087934f30f85c9b6984de (diff) | |
download | linux-7113ac825371c17c15e2d0be79d850e5e16d3328.tar.xz |
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
-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); |