linux-mips.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thorsten Blum <thorsten.blum@linux.dev>
To: "Maciej W. Rozycki" <macro@orcam.me.uk>
Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>,
	linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] MIPS: kernel: proc: Use str_yes_no() helper function
Date: Tue, 5 Nov 2024 00:45:28 +0100	[thread overview]
Message-ID: <F2FC5695-440E-4A29-B683-4335452F6FAB@linux.dev> (raw)
In-Reply-To: <alpine.DEB.2.21.2411031921020.9262@angie.orcam.me.uk>

On 3. Nov 2024, at 20:29, Maciej W. Rozycki wrote:
> 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.

What about the comma and newline? Using str_yes_no() would remove them.

Thanks,
Thorsten

  reply	other threads:[~2024-11-04 23:45 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-02 22:04 [PATCH] MIPS: kernel: proc: Use str_yes_no() helper function Thorsten Blum
2024-11-03 19:29 ` Maciej W. Rozycki
2024-11-04 23:45   ` Thorsten Blum [this message]
2024-11-04 23:51     ` Maciej W. Rozycki
2024-11-05  0:40       ` Thorsten Blum

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=F2FC5695-440E-4A29-B683-4335452F6FAB@linux.dev \
    --to=thorsten.blum@linux.dev \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=macro@orcam.me.uk \
    --cc=tsbogend@alpha.franken.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).