[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <14c7e158390db531969e7520710d5fab@208suo.com>
Date: Thu, 13 Jul 2023 17:29:21 +0800
From: hanyu001@...suo.com
To: jk@...abs.org, joel@....id.au, alistair@...ple.id.au,
eajames@...ux.ibm.com
Cc: linux-fsi@...ts.ozlabs.org, linux-kernel@...r.kernel.org
Subject: Fwd: [PATCH] fsi: Replace snprintf in show functions with sysfs_emit
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@...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);
}
Powered by blists - more mailing lists