]> Git Repo - J-linux.git/commitdiff
rpmsg: convert sysfs snprintf to sysfs_emit
authorXuezhi Zhang <[email protected]>
Tue, 7 Jun 2022 12:06:49 +0000 (20:06 +0800)
committerBjorn Andersson <[email protected]>
Sun, 17 Jul 2022 04:08:47 +0000 (23:08 -0500)
Fix the following coccicheck warning:
drivers/rpmsg/qcom_glink_native.c:1677:8-16:
WARNING: use scnprintf or sprintf

Signed-off-by: Xuezhi Zhang <[email protected]>
Signed-off-by: Bjorn Andersson <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
drivers/rpmsg/qcom_glink_native.c

index 72a1c0fd091db50bef5a17b1924834649677384f..115c0a1eddb10a3ea29574a1104b0eb5a745e543 100644 (file)
@@ -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);
 
This page took 0.044966 seconds and 4 git commands to generate.