[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210821034250.27914-1-jing.yangyang@zte.com.cn>
Date: Fri, 20 Aug 2021 20:42:50 -0700
From: CGEL <cgel.zte@...il.com>
To: Jeremy Kerr <jk@...abs.org>
Cc: Joel Stanley <joel@....id.au>,
Alistar Popple <alistair@...ple.id.au>,
Eddie James <eajames@...ux.ibm.com>,
linux-fsi@...ts.ozlabs.org, linux-kernel@...r.kernel.org,
jing yangyang <jing.yangyang@....com.cn>,
Zeal Robot <zealci@....com.cn>
Subject: [PATCH linux-next] fsi:(fsi-master-gpio)Convert sysfs sprintf/snprintf family to sysfs_emit
From: jing yangyang <jing.yangyang@....com.cn>
Fix the following coccicheck warning:
./drivers/fsi/fsi-master-gpio.c:721:8-16:WARNING:use scnprintf or sprintf
Reported-by: Zeal Robot <zealci@....com.cn>
Signed-off-by: jing yangyang <jing.yangyang@....com.cn>
---
drivers/fsi/fsi-master-gpio.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/fsi/fsi-master-gpio.c b/drivers/fsi/fsi-master-gpio.c
index 7d5f29b..865acb3 100644
--- a/drivers/fsi/fsi-master-gpio.c
+++ b/drivers/fsi/fsi-master-gpio.c
@@ -718,8 +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",
- master->external_mode ? 1 : 0);
+ return sysfs_emit(buf, "%u\n", master->external_mode ? 1 : 0);
}
static ssize_t external_mode_store(struct device *dev,
--
1.8.3.1
Powered by blists - more mailing lists