* [PATCH] rtc: rv3028: use sysfs_emit() instead of sprintf()
@ 2026-10-22 8:12 Akshat Rawat
2026-10-22 8:14 ` sashiko-bot
0 siblings, 1 reply; 2+ messages in thread
From: Akshat Rawat @ 2026-10-22 8:12 UTC (permalink / raw)
To: Alexandre Belloni; +Cc: linux-rtc, linux-kernel, Akshat Rawat
Use sysfs_emit() instead of sprintf() in sysfs show callbacks
(timestamp0_show and timestamp0_count_show) to conform to the
recommended sysfs attribute formatting guidelines in
Documentation/filesystems/sysfs.rst.
Signed-off-by: Akshat Rawat <akshatrawat095@gmail.com>
---
drivers/rtc/rtc-rv3028.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/rtc/rtc-rv3028.c b/drivers/rtc/rtc-rv3028.c
index d25e33d08..b3a5b1ef3 100644
--- a/drivers/rtc/rtc-rv3028.c
+++ b/drivers/rtc/rtc-rv3028.c
@@ -147,8 +147,8 @@ static ssize_t timestamp0_show(struct device *dev,
if (ret)
return ret;
- return sprintf(buf, "%llu\n",
- (unsigned long long)rtc_tm_to_time64(&tm));
+ return sysfs_emit(buf, "%llu\n",
+ (unsigned long long)rtc_tm_to_time64(&tm));
};
static DEVICE_ATTR_RW(timestamp0);
@@ -164,7 +164,7 @@ static ssize_t timestamp0_count_show(struct device *dev,
if (ret)
return ret;
- return sprintf(buf, "%u\n", count);
+ return sysfs_emit(buf, "%u\n", count);
};
static DEVICE_ATTR_RO(timestamp0_count);
--
2.56.0.windows.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] rtc: rv3028: use sysfs_emit() instead of sprintf()
2026-10-22 8:12 [PATCH] rtc: rv3028: use sysfs_emit() instead of sprintf() Akshat Rawat
@ 2026-10-22 8:14 ` sashiko-bot
0 siblings, 0 replies; 2+ messages in thread
From: sashiko-bot @ 2026-10-22 8:14 UTC (permalink / raw)
To: Akshat Rawat; +Cc: linux-rtc, Alexandre Belloni
> Use sysfs_emit() instead of sprintf() in sysfs show callbacks
> (timestamp0_show and timestamp0_count_show) to conform to the
> recommended sysfs attribute formatting guidelines in
> Documentation/filesystems/sysfs.rst.
>
> Signed-off-by: Akshat Rawat <akshatrawat095@gmail.com>
Sashiko has reviewed this patch and found no issues.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261022081242.421-1-akshatrawat095@gmail.com?part=1
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-10-22 8:14 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-22 8:12 [PATCH] rtc: rv3028: use sysfs_emit() instead of sprintf() Akshat Rawat
2026-10-22 8:14 ` sashiko-bot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox