* [PATCH] thermal: debugfs: Use seq_puts() for constant string output
@ 2026-01-10 18:38 Sumeet Pawnikar
2026-01-15 20:07 ` Rafael J. Wysocki
0 siblings, 1 reply; 2+ messages in thread
From: Sumeet Pawnikar @ 2026-01-10 18:38 UTC (permalink / raw)
To: daniel.lezcano, rafael, linux-pm; +Cc: linux-kernel, sumeet4linux
Replace seq_printf() with seq_puts() when outputting a constant string
without format specifiers in the thermal mitigation debugfs interface.
seq_puts() is more appropriate and efficient as it avoids unnecessary
format string parsing overhead.
No functional change.
Signed-off-by: Sumeet Pawnikar <sumeet4linux@gmail.com>
---
drivers/thermal/thermal_debugfs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/thermal/thermal_debugfs.c b/drivers/thermal/thermal_debugfs.c
index 11d34f2a3d9f..11668f5b3c28 100644
--- a/drivers/thermal/thermal_debugfs.c
+++ b/drivers/thermal/thermal_debugfs.c
@@ -807,7 +807,7 @@ static int tze_seq_show(struct seq_file *s, void *v)
seq_printf(s, ",-Mitigation at %llums, duration%c%llums, max. temp=%dm°C\n",
ktime_to_ms(tze->timestamp), c, duration_ms, tze->max_temp);
- seq_printf(s, "| trip | type | temp(m°C) | hyst(m°C) | duration(ms) | avg(m°C) | min(m°C) |\n");
+ seq_puts(s, "| trip | type | temp(m°C) | hyst(m°C) | duration(ms) | avg(m°C) | min(m°C) |\n");
for_each_trip_desc(tz, td) {
const struct thermal_trip *trip = &td->trip;
--
2.43.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] thermal: debugfs: Use seq_puts() for constant string output
2026-01-10 18:38 [PATCH] thermal: debugfs: Use seq_puts() for constant string output Sumeet Pawnikar
@ 2026-01-15 20:07 ` Rafael J. Wysocki
0 siblings, 0 replies; 2+ messages in thread
From: Rafael J. Wysocki @ 2026-01-15 20:07 UTC (permalink / raw)
To: Sumeet Pawnikar; +Cc: daniel.lezcano, rafael, linux-pm, linux-kernel
On Sat, Jan 10, 2026 at 7:39 PM Sumeet Pawnikar <sumeet4linux@gmail.com> wrote:
>
> Replace seq_printf() with seq_puts() when outputting a constant string
> without format specifiers in the thermal mitigation debugfs interface.
> seq_puts() is more appropriate and efficient as it avoids unnecessary
> format string parsing overhead.
>
> No functional change.
>
> Signed-off-by: Sumeet Pawnikar <sumeet4linux@gmail.com>
> ---
> drivers/thermal/thermal_debugfs.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/thermal/thermal_debugfs.c b/drivers/thermal/thermal_debugfs.c
> index 11d34f2a3d9f..11668f5b3c28 100644
> --- a/drivers/thermal/thermal_debugfs.c
> +++ b/drivers/thermal/thermal_debugfs.c
> @@ -807,7 +807,7 @@ static int tze_seq_show(struct seq_file *s, void *v)
> seq_printf(s, ",-Mitigation at %llums, duration%c%llums, max. temp=%dm°C\n",
> ktime_to_ms(tze->timestamp), c, duration_ms, tze->max_temp);
>
> - seq_printf(s, "| trip | type | temp(m°C) | hyst(m°C) | duration(ms) | avg(m°C) | min(m°C) |\n");
> + seq_puts(s, "| trip | type | temp(m°C) | hyst(m°C) | duration(ms) | avg(m°C) | min(m°C) |\n");
>
> for_each_trip_desc(tz, td) {
> const struct thermal_trip *trip = &td->trip;
> --
Applied as 6.20 material, thanks!
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-01-15 20:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-01-10 18:38 [PATCH] thermal: debugfs: Use seq_puts() for constant string output Sumeet Pawnikar
2026-01-15 20:07 ` Rafael J. Wysocki
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®