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: <20220727124415.8340-1-zhangxuezhi3@gmail.com>
Date:   Wed, 27 Jul 2022 20:44:15 +0800
From:   Xuezhi Zhang <zhangxuezhi3@...il.com>
To:     gregkh@...uxfoundation.org, zhangxuezhi1@...lpad.com
Cc:     linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH] USB: usbsevseg: convert sysfs snprintf to sysfs_emit

From: Xuezhi Zhang <zhangxuezhi1@...lpad.com>

Fix the following coccincheck warning:
drivers/usb/misc/usbsevseg.c:170:8-16:
WARNING: use scnprintf or sprintf

Signed-off-by: Xuezhi Zhang <zhangxuezhi1@...lpad.com>
---
 drivers/usb/misc/usbsevseg.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/misc/usbsevseg.c b/drivers/usb/misc/usbsevseg.c
index 4bc816bb09bb..c3114d9bd128 100644
--- a/drivers/usb/misc/usbsevseg.c
+++ b/drivers/usb/misc/usbsevseg.c
@@ -167,7 +167,7 @@ static ssize_t text_show(struct device *dev,
 	struct usb_interface *intf = to_usb_interface(dev);
 	struct usb_sevsegdev *mydev = usb_get_intfdata(intf);
 
-	return snprintf(buf, mydev->textlength, "%s\n", mydev->text);
+	return sysfs_emit(buf, "%s\n", mydev->text);
 }
 
 static ssize_t text_store(struct device *dev,
-- 
2.34.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ