[PATCH 03/12] rtc: ep93xx: use sysfs_emit() instead of sprintf()

From: alexandre . belloni

Date: Thu Oct 29 2026 - 09:38:53 EST


From: Alexandre Belloni <alexandre.belloni@xxxxxxxxxxx>

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

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

diff --git a/drivers/rtc/rtc-ep93xx.c b/drivers/rtc/rtc-ep93xx.c
index 507c9f22036c..f105aba28459 100644
--- a/drivers/rtc/rtc-ep93xx.c
+++ b/drivers/rtc/rtc-ep93xx.c
@@ -93,7 +93,7 @@ static ssize_t comp_preload_show(struct device *dev,

ep93xx_rtc_get_swcomp(dev->parent, &preload, NULL);

- return sprintf(buf, "%d\n", preload);
+ return sysfs_emit(buf, "%d\n", preload);
}
static DEVICE_ATTR_RO(comp_preload);

@@ -104,7 +104,7 @@ static ssize_t comp_delete_show(struct device *dev,

ep93xx_rtc_get_swcomp(dev->parent, NULL, &delete);

- return sprintf(buf, "%d\n", delete);
+ return sysfs_emit(buf, "%d\n", delete);
}
static DEVICE_ATTR_RO(comp_delete);

--
2.56.0