[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20161025090822.GB4795@linux-mips.org>
Date: Tue, 25 Oct 2016 11:08:22 +0200
From: Ralf Baechle <ralf@...ux-mips.org>
To: Geert Uytterhoeven <geert@...ux-m68k.org>
Cc: SF Markus Elfring <elfring@...rs.sourceforge.net>,
Linux MIPS Mailing List <linux-mips@...ux-mips.org>,
Andrea Gelmini <andrea.gelmini@...ma.net>,
Andrew Morton <akpm@...ux-foundation.org>,
Leonid Yegoshin <Leonid.Yegoshin@...tec.com>,
Masahiro Yamada <yamada.masahiro@...ionext.com>,
Matt Redfearn <matt.redfearn@...tec.com>,
Paul Burton <paul.burton@...tec.com>,
Paul Gortmaker <paul.gortmaker@...driver.com>,
Zubair Lutfullah Kakakhel <Zubair.Kakakhel@...tec.com>,
LKML <linux-kernel@...r.kernel.org>,
"kernel-janitors@...r.kernel.org" <kernel-janitors@...r.kernel.org>
Subject: Re: [PATCH 4/4] MIPS/kernel/proc: Combine four seq_printf() calls
into one call in show_cpuinfo()
On Tue, Oct 25, 2016 at 10:55:42AM +0200, Geert Uytterhoeven wrote:
> > - seq_printf(m, "shadow register sets\t: %d\n",
> > - cpu_data[n].srsets);
> > - seq_printf(m, "kscratch registers\t: %d\n",
> > - hweight8(cpu_data[n].kscratch_mask));
> > - seq_printf(m, "package\t\t\t: %d\n", cpu_data[n].package);
> > - seq_printf(m, "core\t\t\t: %d\n", cpu_data[n].core);
> > + seq_printf(m,
> > + "shadow register sets\t: %d\n"
> > + "kscratch registers\t: %d\n"
> > + "package\t\t\t: %d\n"
> > + "core\t\t\t: %d\n",
> > + cpu_data[n].srsets,
> > + hweight8(cpu_data[n].kscratch_mask),
> > + cpu_data[n].package,
> > + cpu_data[n].core);
>
> I think the code is much easier to read with separate seq_printf()s for
> each line printed.
Which is why I originally implemented this as separate function calls.
Code size and performance are hardly an argument for /proc/cpuinfo.
Ralf
Powered by blists - more mailing lists