[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.21.2411031921020.9262@angie.orcam.me.uk>
Date: Sun, 3 Nov 2024 19:29:03 +0000 (GMT)
From: "Maciej W. Rozycki" <macro@...am.me.uk>
To: Thorsten Blum <thorsten.blum@...ux.dev>
cc: Thomas Bogendoerfer <tsbogend@...ha.franken.de>,
linux-mips@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] MIPS: kernel: proc: Use str_yes_no() helper function
On Sat, 2 Nov 2024, Thorsten Blum wrote:
> diff --git a/arch/mips/kernel/proc.c b/arch/mips/kernel/proc.c
> index 8eba5a1ed664..3e4be48bab02 100644
> --- a/arch/mips/kernel/proc.c
> +++ b/arch/mips/kernel/proc.c
> @@ -66,12 +66,12 @@ static int show_cpuinfo(struct seq_file *m, void *v)
> seq_printf(m, "BogoMIPS\t\t: %u.%02u\n",
> cpu_data[n].udelay_val / (500000/HZ),
> (cpu_data[n].udelay_val / (5000/HZ)) % 100);
> - seq_printf(m, "wait instruction\t: %s\n", cpu_wait ? "yes" : "no");
> + seq_printf(m, "wait instruction\t: %s\n", str_yes_no(cpu_wait));
> seq_printf(m, "microsecond timers\t: %s\n",
> - cpu_has_counter ? "yes" : "no");
> + str_yes_no(cpu_has_counter));
> seq_printf(m, "tlb_entries\t\t: %d\n", cpu_data[n].tlbsize);
> seq_printf(m, "extra interrupt vector\t: %s\n",
> - cpu_has_divec ? "yes" : "no");
> + str_yes_no(cpu_has_divec));
> seq_printf(m, "hardware watchpoint\t: %s",
> cpu_has_watch ? "yes, " : "no\n");
> if (cpu_has_watch) {
I like this cleanup, but now that it matters I suggest restructuring code
such that the latter `seq_printf' is converted as well.
NB I think there is no need to split the patch into two for such a minor
change, even though technically these would be two independent updates.
Maciej
Powered by blists - more mailing lists