From 187c4ed20a5636105ae88b28351fc4b730506bc0 Mon Sep 17 00:00:00 2001 From: Alexandre Belloni Date: Thu, 29 Oct 2026 14:23:27 +0100 Subject: [PATCH] rtc: bq32k: use sysfs_emit() instead of sprintf() Use sysfs_emit() instead of sprintf() in the sysfs show callback (bq32k_sysfs_show_tricklecharge_bypass) to conform to the recommended sysfs attribute formatting guidelines in Documentation/filesystems/sysfs.rst. Link: https://patch.msgid.link/20261029132339.925021-4-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni --- drivers/rtc/rtc-bq32k.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/rtc/rtc-bq32k.c b/drivers/rtc/rtc-bq32k.c index 573231613e52..0f50cfce88cb 100644 --- a/drivers/rtc/rtc-bq32k.c +++ b/drivers/rtc/rtc-bq32k.c @@ -210,7 +210,7 @@ static ssize_t bq32k_sysfs_show_tricklecharge_bypass(struct device *dev, if (error) return error; - return sprintf(buf, "%d\n", (reg & BQ32K_TCFE) ? 1 : 0); + return sysfs_emit(buf, "%d\n", (reg & BQ32K_TCFE) ? 1 : 0); } static ssize_t bq32k_sysfs_store_tricklecharge_bypass(struct device *dev,