All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 01/12] rtc: rv3029: use sysfs_emit() instead of sprintf()
@ 2026-10-29 13:23 alexandre.belloni
  2026-10-29 13:23 ` [PATCH 02/12] rtc: pcf2127: " alexandre.belloni
                   ` (11 more replies)
  0 siblings, 12 replies; 26+ messages in thread
From: alexandre.belloni @ 2026-10-29 13:23 UTC (permalink / raw)
  To: Alexandre Belloni; +Cc: linux-rtc, linux-kernel

From: Alexandre Belloni <alexandre.belloni@bootlin.com>

Use sysfs_emit() instead of sprintf() in sysfs show callbacks
(rv3029_hwmon_show_temp and rv3029_hwmon_show_update_interval) to
conform to the recommended sysfs attribute formatting guidelines in
Documentation/filesystems/sysfs.rst.

Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
---
 drivers/rtc/rtc-rv3029c2.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/rtc/rtc-rv3029c2.c b/drivers/rtc/rtc-rv3029c2.c
index c348b31928e9..33b73bbcaf52 100644
--- a/drivers/rtc/rtc-rv3029c2.c
+++ b/drivers/rtc/rtc-rv3029c2.c
@@ -601,7 +601,7 @@ static ssize_t rv3029_hwmon_show_temp(struct device *dev,
 	if (ret < 0)
 		return ret;
 
-	return sprintf(buf, "%d\n", temp_mC);
+	return sysfs_emit(buf, "%d\n", temp_mC);
 }
 
 static ssize_t rv3029_hwmon_set_update_interval(struct device *dev,
@@ -654,7 +654,7 @@ static ssize_t rv3029_hwmon_show_update_interval(struct device *dev,
 		interval_ms = 0;
 	}
 
-	return sprintf(buf, "%d\n", interval_ms);
+	return sysfs_emit(buf, "%d\n", interval_ms);
 }
 
 static SENSOR_DEVICE_ATTR(temp1_input, S_IRUGO, rv3029_hwmon_show_temp,
-- 
2.56.0


^ permalink raw reply related	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2026-10-29 18:20 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-29 13:23 [PATCH 01/12] rtc: rv3029: use sysfs_emit() instead of sprintf() alexandre.belloni
2026-10-29 13:23 ` [PATCH 02/12] rtc: pcf2127: " alexandre.belloni
2026-10-29 13:38   ` sashiko-bot
2026-10-29 18:20   ` Bruno Thomsen
2026-10-29 13:23 ` [PATCH 03/12] rtc: ep93xx: " alexandre.belloni
2026-10-29 13:38   ` sashiko-bot
2026-10-29 13:23 ` [PATCH 04/12] rtc: bq32k: " alexandre.belloni
2026-10-29 13:40   ` sashiko-bot
2026-10-29 13:23 ` [PATCH 05/12] rtc: x1205: " alexandre.belloni
2026-10-29 13:39   ` sashiko-bot
2026-10-29 13:23 ` [PATCH 06/12] rtc: abx80x: " alexandre.belloni
2026-10-29 13:38   ` sashiko-bot
2026-10-29 13:23 ` [PATCH 07/12] rtc: rx8025: " alexandre.belloni
2026-10-29 13:41   ` sashiko-bot
2026-10-29 13:23 ` [PATCH 08/12] rtc: ds1343: " alexandre.belloni
2026-10-29 13:38   ` sashiko-bot
2026-10-29 13:23 ` [PATCH 09/12] rtc: ds1685: " alexandre.belloni
2026-10-29 13:40   ` sashiko-bot
2026-10-29 13:49   ` Joshua Kinard
2026-10-29 13:23 ` [PATCH 10/12] rtc: isl1208: " alexandre.belloni
2026-10-29 13:39   ` sashiko-bot
2026-10-29 13:23 ` [PATCH 11/12] rtc: ds1307: " alexandre.belloni
2026-10-29 13:39   ` sashiko-bot
2026-10-29 13:23 ` [PATCH 12/12] rtc: rs5c372: " alexandre.belloni
2026-10-29 13:41   ` sashiko-bot
2026-10-29 13:38 ` [PATCH 01/12] rtc: rv3029: " sashiko-bot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.