[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220607120649.78436-1-zhangxuezhi1@coolpad.com>
Date: Tue, 7 Jun 2022 20:06:49 +0800
From: Xuezhi Zhang <zhangxuezhi1@...lpad.com>
To: agross@...nel.org, bjorn.andersson@...aro.org,
mathieu.poirier@...aro.org
Cc: linux-arm-msm@...r.kernel.org, linux-remoteproc@...r.kernel.org,
linux-kernel@...r.kernel.org,
Xuezhi Zhang <zhangxuezhi1@...lpad.com>
Subject: [PATCH] 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@...lpad.com>
---
drivers/rpmsg/qcom_glink_native.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/rpmsg/qcom_glink_native.c b/drivers/rpmsg/qcom_glink_native.c
index 07586514991f..62e741883222 100644
--- a/drivers/rpmsg/qcom_glink_native.c
+++ b/drivers/rpmsg/qcom_glink_native.c
@@ -1674,7 +1674,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);
--
2.34.1
Powered by blists - more mailing lists