]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
s390/ptdump: Use seq_puts() in pt_dump_seq_puts() macro
authorJosephine Pfeiffer <hi@josie.lol>
Sat, 18 Oct 2025 17:05:21 +0000 (19:05 +0200)
committerHeiko Carstens <hca@linux.ibm.com>
Tue, 21 Oct 2025 08:29:50 +0000 (10:29 +0200)
The pt_dump_seq_puts() macro incorrectly uses seq_printf() instead of
seq_puts(). This is both a performance issue and conceptually wrong,
as the macro name suggests plain string output (puts) but the
implementation uses formatted output (printf).

The macro is used in dump_pagetables.c:67-68 and 131 to output
constant strings. Using seq_printf() adds unnecessary overhead for
format string parsing.

Signed-off-by: Josephine Pfeiffer <hi@josie.lol>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
arch/s390/mm/dump_pagetables.c

index 9af2aae0a5152a9d92e116df8b8bd910cf5ee528..3692f9d20f0d4326f921ed1fc3ceeda39e298ad6 100644 (file)
@@ -51,7 +51,7 @@ struct pg_state {
        struct seq_file *__m = (m);             \
                                                \
        if (__m)                                \
-               seq_printf(__m, fmt);           \
+               seq_puts(__m, fmt);             \
 })
 
 static void print_prot(struct seq_file *m, unsigned int pr, int level)