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: <20260207181825.13481-1-neelb2403@gmail.com>
Date: Sat,  7 Feb 2026 13:18:25 -0500
From: Neel Bullywon <neelb2403@...il.com>
To: lee@...nel.org,
	pavel@...nel.org
Cc: linux-leds@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	Neel Bullywon <neelb2403@...il.com>
Subject: [PATCH v1] leds: lp5569: Use sysfs_emit instead of sprintf()

Replace sprintf() with sysfs_emit(), which is the modern standard for
formatting sysfs output.

This change aligng with the kernel's best practices and ensures usage of
the most up to date API.

Signed-off-by: Neel Bullywon <neelb2403@...il.com>
---
 drivers/leds/leds-lp5569.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/leds/leds-lp5569.c b/drivers/leds/leds-lp5569.c
index 786f2aa35319..a252ba6c455d 100644
--- a/drivers/leds/leds-lp5569.c
+++ b/drivers/leds/leds-lp5569.c
@@ -410,12 +410,12 @@ static ssize_t lp5569_selftest(struct device *dev,
 	/* Test LED Open */
 	pos = lp5569_led_open_test(led, buf);
 	if (pos < 0)
-		return sprintf(buf, "FAIL\n");
+		return sysfs_emit(buf, "FAIL\n");
 
 	/* Test LED Shorted */
 	pos += lp5569_led_short_test(led, buf);
 	if (pos < 0)
-		return sprintf(buf, "FAIL\n");
+		return sysfs_emit(buf, "FAIL\n");
 
 	for (i = 0; i < chip->pdata->num_channels; i++) {
 		/* Restore current */
-- 
2.44.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ