rtc: rv3029: use sysfs_emit() instead of sprintf()
[email protected]
maintainerPATCH 1/12 rtc: rv3029: use sysfs_emit() instead of sprintf()
From: Alexandre Belloni <[email protected]>
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.
--- drivers/rtc/rtc-rv3029c2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/rtc/rtc-rv3029c2.c +2 -2
@@ -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,
Signature · 1 line
2.56.0
[email protected]
maintainerPATCH 2/12 rtc: pcf2127: use sysfs_emit() instead of sprintf()
From: Alexandre Belloni <[email protected]>
Use sysfs_emit() instead of sprintf() in the sysfs show callback (timestamp_show) to conform to the recommended sysfs attribute formatting guidelines in Documentation/filesystems/sysfs.rst.
--- drivers/rtc/rtc-pcf2127.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/rtc/rtc-pcf2127.c +1 -1
@@ -972,7 +972,7 @@ static ssize_t timestamp_show(struct device *dev,if (ret)return ret; } -return sprintf (buf,"%llu\n" , (unsigned long long )ts); +return sysfs_emit (buf,"%llu\n" , (unsigned long long )ts); } static ssize_t timestamp0_show(struct device *dev,
Signature · 1 line
2.56.0
[email protected]
AI reviewRe: [PATCH 02/12] rtc: pcf2127: use sysfs_emit() instead of sprintf()
Sashiko has reviewed this patch and found no issues.
Quoted 7 lines
From: Alexandre Belloni <[email protected]>
Use
sysfs_emit()instead ofsprintf()in the sysfs show callback (timestamp_show) to conform to the recommended sysfs attribute formatting guidelines inDocumentation/filesystems/sysfs.rst.Signed-off-by Alexandre Belloni <[email protected]>
Sashiko has reviewed this patch and found no issues.
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=2
Re: [PATCH 02/12] rtc: pcf2127: use sysfs_emit() instead of sprintf()
In reply to [email protected]Den tors. 29. okt. 2026 kl. 14.38 skrev <[email protected]>:
Quoted 8 lines
From: Alexandre Belloni <[email protected]>
Use
sysfs_emit()instead ofsprintf()in the sysfs show callback (timestamp_show) to conform to the recommended sysfs attribute formatting guidelines inDocumentation/filesystems/sysfs.rst.Signed-off-by Alexandre Belloni <[email protected]>
Quoted 21 lines
--- drivers/rtc/rtc-pcf2127.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/rtc/rtc-pcf2127.c +1
-2@@ -972,7 +972,7 @@ static ssize_t timestamp_show(struct device *dev,if (ret)return ret; } -return sprintf (buf,"%llu\n" , (unsigned long long )ts); +return sysfs_emit (buf,"%llu\n" , (unsigned long long )ts); } static ssize_t timestamp0_show(struct device *dev, --2.56.0
[email protected]
maintainerPATCH 3/12 rtc: ep93xx: use sysfs_emit() instead of sprintf()
In reply to [email protected]From: Alexandre Belloni <[email protected]>
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.
--- drivers/rtc/rtc-ep93xx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/rtc/rtc-ep93xx.c +2 -2
@@ -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);
Signature · 1 line
2.56.0
[email protected]
AI reviewRe: [PATCH 03/12] rtc: ep93xx: use sysfs_emit() instead of sprintf()
Sashiko has reviewed this patch and found no issues.
Quoted 8 lines
From: Alexandre Belloni <[email protected]>
Use
sysfs_emit()instead ofsprintf()in sysfs show callbacks (comp_preload_showandcomp_delete_show) to conform to the recommended sysfs attribute formatting guidelines inDocumentation/filesystems/sysfs.rst.Signed-off-by Alexandre Belloni <[email protected]>
Sashiko has reviewed this patch and found no issues.
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=3
[email protected]
maintainerPATCH 4/12 rtc: bq32k: use sysfs_emit() instead of sprintf()
In reply to [email protected]From: Alexandre Belloni <[email protected]>
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.
--- drivers/rtc/rtc-bq32k.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/rtc/rtc-bq32k.c +1 -1
@@ -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,
Signature · 1 line
2.56.0
[email protected]
AI reviewRe: [PATCH 04/12] rtc: bq32k: use sysfs_emit() instead of sprintf()
Sashiko has reviewed this patch and found no issues.
Quoted 8 lines
From: Alexandre Belloni <[email protected]>
Use
sysfs_emit()instead ofsprintf()in the sysfs show callback (bq32k_sysfs_show_tricklecharge_bypass) to conform to the recommended sysfs attribute formatting guidelines inDocumentation/filesystems/sysfs.rst.Signed-off-by Alexandre Belloni <[email protected]>
Sashiko has reviewed this patch and found no issues.
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=4
[email protected]
maintainerPATCH 5/12 rtc: x1205: use sysfs_emit() instead of sprintf()
In reply to [email protected]From: Alexandre Belloni <[email protected]>
Use sysfs_emit() instead of sprintf() in sysfs show callbacks (x1205_sysfs_show_atrim and x1205_sysfs_show_dtrim) to conform to the recommended sysfs attribute formatting guidelines in Documentation/filesystems/sysfs.rst.
--- drivers/rtc/rtc-x1205.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/rtc/rtc-x1205.c +2 -2
@@ -575,7 +575,7 @@ static ssize_t x1205_sysfs_show_atrim(struct device *dev,if (err)return err; -return sprintf (buf,"%d.%02d pF\n" , atrim /1000 , atrim %1000 ); +return sysfs_emit (buf,"%d.%02d pF\n" , atrim /1000 , atrim %1000 ); } static DEVICE_ATTR(atrim, S_IRUGO, x1205_sysfs_show_atrim, NULL);
@@ -588,7 +588,7 @@ static ssize_t x1205_sysfs_show_dtrim(struct device *dev,if (err)return err; -return sprintf (buf,"%d ppm\n" , dtrim); +return sysfs_emit (buf,"%d ppm\n" , dtrim); } static DEVICE_ATTR(dtrim, S_IRUGO, x1205_sysfs_show_dtrim, NULL);
Signature · 1 line
2.56.0
[email protected]
AI reviewRe: [PATCH 05/12] rtc: x1205: use sysfs_emit() instead of sprintf()
Sashiko has reviewed this patch and found no issues.
Quoted 8 lines
From: Alexandre Belloni <[email protected]>
Use
sysfs_emit()instead ofsprintf()in sysfs show callbacks (x1205_sysfs_show_atrimandx1205_sysfs_show_dtrim) to conform to the recommended sysfs attribute formatting guidelines inDocumentation/filesystems/sysfs.rst.Signed-off-by Alexandre Belloni <[email protected]>
Sashiko has reviewed this patch and found no issues.
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=5
[email protected]
maintainerPATCH 6/12 rtc: abx80x: use sysfs_emit() instead of sprintf()
In reply to [email protected]From: Alexandre Belloni <[email protected]>
Use sysfs_emit() instead of sprintf() in sysfs show callbacks (autocalibration_show and oscillator_show) to conform to the recommended sysfs attribute formatting guidelines in Documentation/filesystems/sysfs.rst.
--- drivers/rtc/rtc-abx80x.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/rtc/rtc-abx80x.c +5 -5
@@ -442,11 +442,11 @@ static ssize_t autocalibration_show(struct device *dev, autocalibration =abx80x_rtc_get_autocalibration (dev->parent);if (autocalibration <0 ) {dev_err (dev,"Failed to read RTC autocalibration\n" ); -sprintf (buf,"0\n" ); +sysfs_emit (buf,"0\n" );return autocalibration; } -return sprintf (buf,"%d\n" , autocalibration); +return sysfs_emit (buf,"%d\n" , autocalibration); }static DEVICE_ATTR_RW (autocalibration);
@@ -490,14 +490,14 @@ static ssize_t oscillator_show(struct device *dev,if (rc_mode <0 ) {dev_err (dev,"Failed to read RTC oscillator selection\n" ); -sprintf (buf,"\n" ); +sysfs_emit (buf,"\n" );return rc_mode; }if (rc_mode) -return sprintf (buf,"rc\n" ); +return sysfs_emit (buf,"rc\n" );else -return sprintf (buf,"xtal\n" ); +return sysfs_emit (buf,"xtal\n" ); }static DEVICE_ATTR_RW (oscillator);
Signature · 1 line
2.56.0
[email protected]
AI reviewRe: [PATCH 06/12] rtc: abx80x: use sysfs_emit() instead of sprintf()
Sashiko has reviewed this patch and found no issues.
Quoted 8 lines
From: Alexandre Belloni <[email protected]>
Use
sysfs_emit()instead ofsprintf()in sysfs show callbacks (autocalibration_showandoscillator_show) to conform to the recommended sysfs attribute formatting guidelines inDocumentation/filesystems/sysfs.rst.Signed-off-by Alexandre Belloni <[email protected]>
Sashiko has reviewed this patch and found no issues.
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=6
Re: [PATCH 06/12] rtc: abx80x: use sysfs_emit() instead of sprintf()
In reply to [email protected]Quoted 17 lines · On Thu, 29 Oct 2026 14:23:29 +0100 [email protected] wrote:
From: Alexandre Belloni <[email protected]>
Use
sysfs_emit()instead ofsprintf()in sysfs show callbacks (autocalibration_showandoscillator_show) to conform to the recommended sysfs attribute formatting guidelines inDocumentation/filesystems/sysfs.rst.Signed-off-by Alexandre Belloni <[email protected]>--- drivers/rtc/rtc-abx80x.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)drivers/rtc/rtc-abx80x.c +0
-0
drivers/rtc/rtc-abx80x.c static ssize_t autocalibration_show(struct device *dev, · line 446
Quoted 6 lines
drivers/rtc/rtc-abx80x.c +1
-1@@ -442,11 +442,11 @@ static ssize_t autocalibration_show(struct device *dev, autocalibration =abx80x_rtc_get_autocalibration (dev->parent);if (autocalibration <0 ) {dev_err (dev,"Failed to read RTC autocalibration\n" ); -sprintf (buf,"0\n" ); +sysfs_emit (buf,"0\n" );return autocalibration;
That doesn't make sense.
The return value is the length of data in the buffer. So there is no point calling sprintf/sysfs_emit and then returning an error.
David
Quoted 25 lines
drivers/rtc/rtc-abx80x.c +4
-4} -return sprintf (buf,"%d\n" , autocalibration); +return sysfs_emit (buf,"%d\n" , autocalibration); }static DEVICE_ATTR_RW (autocalibration);@@ -490,14 +490,14 @@ static ssize_t oscillator_show(struct device *dev,if (rc_mode <0 ) {dev_err (dev,"Failed to read RTC oscillator selection\n" ); -sprintf (buf,"\n" ); +sysfs_emit (buf,"\n" );return rc_mode; }if (rc_mode) -return sprintf (buf,"rc\n" ); +return sysfs_emit (buf,"rc\n" );else -return sprintf (buf,"xtal\n" ); +return sysfs_emit (buf,"xtal\n" ); }static DEVICE_ATTR_RW (oscillator);
[email protected]
maintainerPATCH 7/12 rtc: rx8025: use sysfs_emit() instead of sprintf()
In reply to [email protected]From: Alexandre Belloni <[email protected]>
Use sysfs_emit() instead of sprintf() in the sysfs show callback (rx8025_sysfs_show_clock_adjust) to conform to the recommended sysfs attribute formatting guidelines in Documentation/filesystems/sysfs.rst.
--- drivers/rtc/rtc-rx8025.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/rtc/rtc-rx8025.c +1 -1
@@ -486,7 +486,7 @@ static ssize_t rx8025_sysfs_show_clock_adjust(struct device *dev,if (err)return err; -return sprintf (buf,"%ld\n" , -adj); +return sysfs_emit (buf,"%ld\n" , -adj); } static ssize_t rx8025_sysfs_store_clock_adjust(struct device *dev,
Signature · 1 line
2.56.0
[email protected]
AI reviewRe: [PATCH 07/12] rtc: rx8025: use sysfs_emit() instead of sprintf()
Sashiko has reviewed this patch and found no issues.
Quoted 7 lines
From: Alexandre Belloni <[email protected]>
Use
sysfs_emit()instead ofsprintf()in the sysfs show callback (rx8025_sysfs_show_clock_adjust) to conform to the recommended sysfs attribute formatting guidelines inDocumentation/filesystems/sysfs.rst.Signed-off-by Alexandre Belloni <[email protected]>
Sashiko has reviewed this patch and found no issues.
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=7
[email protected]
maintainerPATCH 8/12 rtc: ds1343: use sysfs_emit() instead of sprintf()
In reply to [email protected]From: Alexandre Belloni <[email protected]>
Use sysfs_emit() instead of sprintf() in sysfs show callbacks (ds1343_show_glitchfilter and ds1343_show_tricklecharger) to conform to the recommended sysfs attribute formatting guidelines in Documentation/filesystems/sysfs.rst.
--- drivers/rtc/rtc-ds1343.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/rtc/rtc-ds1343.c +3 -3
@@ -94,9 +94,9 @@ static ssize_t ds1343_show_glitchfilter(struct device *dev, glitch_filt_status = !!(data &DS1343_EGFIL );if (glitch_filt_status) -return sprintf (buf,"enabled\n" ); +return sysfs_emit (buf,"enabled\n" );else -return sprintf (buf,"disabled\n" ); +return sysfs_emit (buf,"disabled\n" ); } static ssize_t ds1343_store_glitchfilter(struct device *dev,
@@ -180,7 +180,7 @@ static ssize_t ds1343_show_tricklecharger(struct device *dev, } } -return sprintf (buf,"%s %s\n" , diodes, resistors); +return sysfs_emit (buf,"%s %s\n" , diodes, resistors); } static DEVICE_ATTR(trickle_charger, 0444, ds1343_show_tricklecharger, NULL);
Signature · 1 line
2.56.0
[email protected]
AI reviewRe: [PATCH 08/12] rtc: ds1343: use sysfs_emit() instead of sprintf()
Sashiko has reviewed this patch and found no issues.
Quoted 8 lines
From: Alexandre Belloni <[email protected]>
Use
sysfs_emit()instead ofsprintf()in sysfs show callbacks (ds1343_show_glitchfilterandds1343_show_tricklecharger) to conform to the recommended sysfs attribute formatting guidelines inDocumentation/filesystems/sysfs.rst.Signed-off-by Alexandre Belloni <[email protected]>
Sashiko has reviewed this patch and found no issues.
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=8
[email protected]
maintainerPATCH 9/12 rtc: ds1685: use sysfs_emit() instead of sprintf()
In reply to [email protected]From: Alexandre Belloni <[email protected]>
Use sysfs_emit() instead of sprintf() in sysfs show callbacks (ds1685_rtc_sysfs_battery_show, ds1685_rtc_sysfs_auxbatt_show and ds1685_rtc_sysfs_serial_show) to conform to the recommended sysfs attribute formatting guidelines in Documentation/filesystems/sysfs.rst.
--- drivers/rtc/rtc-ds1685.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/rtc/rtc-ds1685.c +5 -5
@@ -988,8 +988,8 @@ ds1685_rtc_sysfs_battery_show(struct device *dev, ctrld = rtc->read (rtc,RTC_CTRL_D ); -return sprintf (buf,"%s\n" , - (ctrld &RTC_CTRL_D_VRT ) ?"ok" :"not ok or N/A" ); +return sysfs_emit (buf,"%s\n" , + (ctrld &RTC_CTRL_D_VRT ) ?"ok" :"not ok or N/A" ); } static DEVICE_ATTR(battery, S_IRUGO, ds1685_rtc_sysfs_battery_show, NULL);
@@ -1010,8 +1010,8 @@ ds1685_rtc_sysfs_auxbatt_show(struct device *dev, ctrl4a = rtc->read (rtc,RTC_EXT_CTRL_4A );ds1685_rtc_switch_to_bank0 (rtc); -return sprintf (buf,"%s\n" , - (ctrl4a &RTC_CTRL_4A_VRT2 ) ?"ok" :"not ok or N/A" ); +return sysfs_emit (buf,"%s\n" , + (ctrl4a &RTC_CTRL_4A_VRT2 ) ?"ok" :"not ok or N/A" ); } static DEVICE_ATTR(auxbatt, S_IRUGO, ds1685_rtc_sysfs_auxbatt_show, NULL);
@@ -1032,7 +1032,7 @@ ds1685_rtc_sysfs_serial_show(struct device *dev,ds1685_rtc_get_ssn (rtc, ssn);ds1685_rtc_switch_to_bank0 (rtc); -return sprintf (buf,"%8phC\n" , ssn); +return sysfs_emit (buf,"%8phC\n" , ssn); } static DEVICE_ATTR(serial, S_IRUGO, ds1685_rtc_sysfs_serial_show, NULL);
Signature · 1 line
2.56.0
[email protected]
AI reviewRe: [PATCH 09/12] rtc: ds1685: use sysfs_emit() instead of sprintf()
Sashiko has reviewed this patch and found no issues.
Quoted 9 lines
From: Alexandre Belloni <[email protected]>
Use
sysfs_emit()instead ofsprintf()in sysfs show callbacks (ds1685_rtc_sysfs_battery_show,ds1685_rtc_sysfs_auxbatt_showandds1685_rtc_sysfs_serial_show) to conform to the recommended sysfs attribute formatting guidelines inDocumentation/filesystems/sysfs.rst.Signed-off-by Alexandre Belloni <[email protected]>
Sashiko has reviewed this patch and found no issues.
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=9
Re: [PATCH 09/12] rtc: ds1685: use sysfs_emit() instead of sprintf()
In reply to [email protected]Quoted 40 lines · On 10/29/2026 09:23, [email protected] wrote:
From: Alexandre Belloni <[email protected]>
Use
sysfs_emit()instead ofsprintf()in sysfs show callbacks (ds1685_rtc_sysfs_battery_show,ds1685_rtc_sysfs_auxbatt_showandds1685_rtc_sysfs_serial_show) to conform to the recommended sysfs attribute formatting guidelines inDocumentation/filesystems/sysfs.rst.Signed-off-by Alexandre Belloni <[email protected]>--- drivers/rtc/rtc-ds1685.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)drivers/rtc/rtc-ds1685.c +4
-4@@ -988,8 +988,8 @@ ds1685_rtc_sysfs_battery_show(struct device *dev, ctrld = rtc->read (rtc,RTC_CTRL_D ); -return sprintf (buf,"%s\n" , - (ctrld &RTC_CTRL_D_VRT ) ?"ok" :"not ok or N/A" ); +return sysfs_emit (buf,"%s\n" , + (ctrld &RTC_CTRL_D_VRT ) ?"ok" :"not ok or N/A" ); } static DEVICE_ATTR(battery, S_IRUGO, ds1685_rtc_sysfs_battery_show, NULL);@@ -1010,8 +1010,8 @@ ds1685_rtc_sysfs_auxbatt_show(struct device *dev, ctrl4a = rtc->read (rtc,RTC_EXT_CTRL_4A );ds1685_rtc_switch_to_bank0 (rtc); -return sprintf (buf,"%s\n" , - (ctrl4a &RTC_CTRL_4A_VRT2 ) ?"ok" :"not ok or N/A" ); +return sysfs_emit (buf,"%s\n" , + (ctrl4a &RTC_CTRL_4A_VRT2 ) ?"ok" :"not ok or N/A" ); } static DEVICE_ATTR(auxbatt, S_IRUGO, ds1685_rtc_sysfs_auxbatt_show, NULL);
drivers/rtc/rtc-ds1685.c ds1685_rtc_sysfs_serial_show(struct device *dev, · line 1038
Quoted 8 lines
drivers/rtc/rtc-ds1685.c +1
-1@@ -1032,7 +1032,7 @@ ds1685_rtc_sysfs_serial_show(struct device *dev,ds1685_rtc_get_ssn (rtc, ssn);ds1685_rtc_switch_to_bank0 (rtc); -return sprintf (buf,"%8phC\n" , ssn); +return sysfs_emit (buf,"%8phC\n" , ssn); } static DEVICE_ATTR(serial, S_IRUGO, ds1685_rtc_sysfs_serial_show, NULL);
[email protected]
maintainerPATCH 10/12 rtc: isl1208: use sysfs_emit() instead of sprintf()
In reply to [email protected]From: Alexandre Belloni <[email protected]>
Use sysfs_emit() instead of sprintf() in sysfs show callbacks (timestamp0_show, isl1208_sysfs_show_atrim, isl1208_sysfs_show_dtrim and isl1208_sysfs_show_usr) to conform to the recommended sysfs attribute formatting guidelines in Documentation/filesystems/sysfs.rst.
--- drivers/rtc/rtc-isl1208.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/rtc/rtc-isl1208.c +5 -5
@@ -615,8 +615,8 @@ static ssize_t timestamp0_show(struct device *dev,if (sr)return sr; -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);
@@ -709,7 +709,7 @@ isl1208_sysfs_show_atrim(struct device *dev,if (atr <0 )return atr; -return sprintf (buf,"%d.%.2d pF\n" , atr >>2 , (atr &0x3 ) *25 ); +return sysfs_emit (buf,"%d.%.2d pF\n" , atr >>2 , (atr &0x3 ) *25 ); } static DEVICE_ATTR(atrim, S_IRUGO, isl1208_sysfs_show_atrim, NULL);
@@ -722,7 +722,7 @@ isl1208_sysfs_show_dtrim(struct device *dev,if (dtr <0 )return dtr; -return sprintf (buf,"%d ppm\n" , dtr -100 ); +return sysfs_emit (buf,"%d ppm\n" , dtr -100 ); } static DEVICE_ATTR(dtrim, S_IRUGO, isl1208_sysfs_show_dtrim, NULL);
@@ -735,7 +735,7 @@ isl1208_sysfs_show_usr(struct device *dev,if (usr <0 )return usr; -return sprintf (buf,"0x%.4x\n" , usr); +return sysfs_emit (buf,"0x%.4x\n" , usr); } static ssize_t
Signature · 1 line
2.56.0
[email protected]
AI reviewRe: [PATCH 10/12] rtc: isl1208: use sysfs_emit() instead of sprintf()
Sashiko has reviewed this patch and found no issues.
Quoted 9 lines
From: Alexandre Belloni <[email protected]>
Use
sysfs_emit()instead ofsprintf()in sysfs show callbacks (timestamp0_show,isl1208_sysfs_show_atrim,isl1208_sysfs_show_dtrimandisl1208_sysfs_show_usr) to conform to the recommended sysfs attribute formatting guidelines inDocumentation/filesystems/sysfs.rst.Signed-off-by Alexandre Belloni <[email protected]>
Sashiko has reviewed this patch and found no issues.
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=10
[email protected]
maintainerPATCH 11/12 rtc: ds1307: use sysfs_emit() instead of sprintf()
In reply to [email protected]From: Alexandre Belloni <[email protected]>
Use sysfs_emit() instead of sprintf() in the sysfs show callback (ds3231_hwmon_show_temp) to conform to the recommended sysfs attribute formatting guidelines in Documentation/filesystems/sysfs.rst.
--- drivers/rtc/rtc-ds1307.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/rtc/rtc-ds1307.c +1 -1
@@ -1380,7 +1380,7 @@ static ssize_t ds3231_hwmon_show_temp(struct device *dev,if (ret)return ret; -return sprintf (buf,"%d\n" , temp); +return sysfs_emit (buf,"%d\n" , temp); } static SENSOR_DEVICE_ATTR(temp1_input, 0444, ds3231_hwmon_show_temp, NULL, 0);
Signature · 1 line
2.56.0
[email protected]
AI reviewRe: [PATCH 11/12] rtc: ds1307: use sysfs_emit() instead of sprintf()
Sashiko has reviewed this patch and found no issues.
Quoted 7 lines
From: Alexandre Belloni <[email protected]>
Use
sysfs_emit()instead ofsprintf()in the sysfs show callback (ds3231_hwmon_show_temp) to conform to the recommended sysfs attribute formatting guidelines inDocumentation/filesystems/sysfs.rst.Signed-off-by Alexandre Belloni <[email protected]>
Sashiko has reviewed this patch and found no issues.
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=11
[email protected]
maintainerPATCH 12/12 rtc: rs5c372: use sysfs_emit() instead of sprintf()
In reply to [email protected]From: Alexandre Belloni <[email protected]>
Use sysfs_emit() instead of sprintf() in sysfs show callbacks (rs5c372_sysfs_show_trim and rs5c372_sysfs_show_osc) to conform to the recommended sysfs attribute formatting guidelines in Documentation/filesystems/sysfs.rst.
--- drivers/rtc/rtc-rs5c372.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/rtc/rtc-rs5c372.c +2 -2
@@ -699,7 +699,7 @@ static ssize_t rs5c372_sysfs_show_trim(struct device *dev,if (err)return err; -return sprintf (buf,"%d\n" , trim); +return sysfs_emit (buf,"%d\n" , trim); } static DEVICE_ATTR(trim, S_IRUGO, rs5c372_sysfs_show_trim, NULL);
@@ -712,7 +712,7 @@ static ssize_t rs5c372_sysfs_show_osc(struct device *dev,if (err)return err; -return sprintf (buf,"%d.%03d KHz\n" , osc /1000 , osc %1000 ); +return sysfs_emit (buf,"%d.%03d KHz\n" , osc /1000 , osc %1000 ); } static DEVICE_ATTR(osc, S_IRUGO, rs5c372_sysfs_show_osc, NULL);
Signature · 1 line
2.56.0
[email protected]
AI reviewRe: [PATCH 12/12] rtc: rs5c372: use sysfs_emit() instead of sprintf()
Sashiko has reviewed this patch and found no issues.
Quoted 8 lines
From: Alexandre Belloni <[email protected]>
Use
sysfs_emit()instead ofsprintf()in sysfs show callbacks (rs5c372_sysfs_show_trimandrs5c372_sysfs_show_osc) to conform to the recommended sysfs attribute formatting guidelines inDocumentation/filesystems/sysfs.rst.Signed-off-by Alexandre Belloni <[email protected]>
Sashiko has reviewed this patch and found no issues.
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=12
[email protected]
AI reviewSashiko has reviewed this patch and found no issues.
Quoted 8 lines
From: Alexandre Belloni <[email protected]>
Use
sysfs_emit()instead ofsprintf()in sysfs show callbacks (rv3029_hwmon_show_tempandrv3029_hwmon_show_update_interval) to conform to the recommended sysfs attribute formatting guidelines inDocumentation/filesystems/sysfs.rst.Signed-off-by Alexandre Belloni <[email protected]>
Sashiko has reviewed this patch and found no issues.
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1