Re: [PATCH 4/4] MIPS/kernel/proc: Combine four seq_printf() calls into one call in show_cpuinfo()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux