Fwd: [PATCH] fsi: Replace snprintf in show functions with sysfs_emit
From: hanyu001
Date: Thu Jul 13 2023 - 05:29:31 EST
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@xxxxxx>
---
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);
}