Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

s390/ptdump: Use seq_puts() in pt_dump_seq_puts() macro

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>

authored by josie.lol and committed by

Heiko Carstens 215231de 5e09c0a0

+1 -1
+1 -1
arch/s390/mm/dump_pagetables.c
··· 51 51 struct seq_file *__m = (m); \ 52 52 \ 53 53 if (__m) \ 54 - seq_printf(__m, fmt); \ 54 + seq_puts(__m, fmt); \ 55 55 }) 56 56 57 57 static void print_prot(struct seq_file *m, unsigned int pr, int level)