lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <07ad7a3621b9f92e291710ec58225a5e4580a46e.1643183118.git.yang.guang5@zte.com.cn>
Date:   Thu, 27 Jan 2022 07:57:28 +0800
From:   davidcomponentone@...il.com
To:     jk@...abs.org
Cc:     davidcomponentone@...il.com, joel@....id.au, alistair@...ple.id.au,
        eajames@...ux.ibm.com, linux-fsi@...ts.ozlabs.org,
        linux-kernel@...r.kernel.org, Yang Guang <yang.guang5@....com.cn>,
        Zeal Robot <zealci@....com.cn>
Subject: [PATCH] fsi: master-ast-cf: replace snprintf with sysfs_emit

From: Yang Guang <yang.guang5@....com.cn>

coccinelle report:
./drivers/fsi/fsi-master-ast-cf.c:1086:8-16:
WARNING: use scnprintf or sprintf

Use sysfs_emit instead of scnprintf or sprintf makes more sense.

Reported-by: Zeal Robot <zealci@....com.cn>
Signed-off-by: Yang Guang <yang.guang5@....com.cn>
Signed-off-by: David Yang <davidcomponentone@...il.com>
---
 drivers/fsi/fsi-master-ast-cf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/fsi/fsi-master-ast-cf.c b/drivers/fsi/fsi-master-ast-cf.c
index 24292acdbaf8..e33c1cfb44cd 100644
--- a/drivers/fsi/fsi-master-ast-cf.c
+++ b/drivers/fsi/fsi-master-ast-cf.c
@@ -1083,7 +1083,7 @@ static ssize_t external_mode_show(struct device *dev,
 {
 	struct fsi_master_acf *master = dev_get_drvdata(dev);
 
-	return snprintf(buf, PAGE_SIZE - 1, "%u\n",
+	return sysfs_emit(buf, "%u\n",
 			master->external_mode ? 1 : 0);
 }
 
-- 
2.30.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ