Re: [PATCH 3/4] MIPS: kernel: proc: Use seq_putc() calls in show_cpuinfo()
From: Thomas Bogendoerfer
Date: Mon Jun 15 2026 - 06:46:03 EST
On Thu, Jun 04, 2026 at 07:54:08PM +0200, Markus Elfring wrote:
> From: Markus Elfring <elfring@xxxxxxxxxxxxxxxxxxxxx>
> Date: Thu, 4 Jun 2026 19:12:11 +0200
>
> Single characters should occasionally be put into a sequence.
> Thus use the corresponding function “seq_putc”.
>
> The source code was transformed by using the Coccinelle software.
>
> Signed-off-by: Markus Elfring <elfring@xxxxxxxxxxxxxxxxxxxxx>
> ---
> arch/mips/kernel/proc.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/arch/mips/kernel/proc.c b/arch/mips/kernel/proc.c
> index 9e8b8f99b606..42430c7f0acf 100644
> --- a/arch/mips/kernel/proc.c
> +++ b/arch/mips/kernel/proc.c
> @@ -79,7 +79,7 @@ static int show_cpuinfo(struct seq_file *m, void *v)
> for (i = 0; i < cpu_data[n].watch_reg_count; i++)
> seq_printf(m, "%s0x%04x", i ? ", " : "",
> cpu_data[n].watch_reg_masks[i]);
> - seq_puts(m, "]");
> + seq_putc(m, ']');
> }
>
> seq_puts(m, "\nisa\t\t\t:");
> @@ -149,7 +149,7 @@ static int show_cpuinfo(struct seq_file *m, void *v)
> seq_puts(m, " loongson-ext");
> if (cpu_has_loongson_ext2)
> seq_puts(m, " loongson-ext2");
> - seq_puts(m, "\n");
> + seq_putc(m, '\n');
>
> if (cpu_has_mmips) {
> seq_printf(m, "micromips kernel\t: %s\n",
> @@ -298,7 +298,7 @@ static int show_cpuinfo(struct seq_file *m, void *v)
> raw_notifier_call_chain(&proc_cpuinfo_chain, 0,
> &proc_cpuinfo_notifier_args);
>
> - seq_puts(m, "\n");
> + seq_putc(m, '\n');
>
> return 0;
> }
> --
> 2.54.0
applied to mips-next
Thomas.
--
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea. [ RFC1925, 2.3 ]