Fwd: [PATCH] fsi: Replace snprintf in show functions with sysfs_emit
hanyu001 at 208suo.com
hanyu001 at 208suo.com
Thu Jul 13 19:29:21 AEST 2023
Fix the following coccicheck warning:
drivers/macintosh/ams/ams-core.c:53: WARNING: use scnprintf or
sprintf.
./drivers/fsi/fsi-master-gpio.c:721:8-16: WARNING: use scnprintf or
sprintf
Signed-off-by: ztt <1549089851 at qq.com>
---
drivers/fsi/fsi-master-gpio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/fsi/fsi-master-gpio.c
b/drivers/fsi/fsi-master-gpio.c
index 7d5f29b4b595..75499365729f 100644
--- a/drivers/fsi/fsi-master-gpio.c
+++ b/drivers/fsi/fsi-master-gpio.c
@@ -718,7 +718,7 @@ static ssize_t external_mode_show(struct device
*dev,
{
struct fsi_master_gpio *master = dev_get_drvdata(dev);
- return snprintf(buf, PAGE_SIZE - 1, "%u\n",
+ return scnprintf(buf, PAGE_SIZE - 1, "%u\n",
master->external_mode ? 1 : 0);
}
More information about the linux-fsi
mailing list