Re: Hexagon-setup: Combine four seq_printf() calls into one call in show_cpuinfo()

2016-10-25 Thread Richard Kuo
I wrote it the original way precisely for readability; it's easier, at least to me, to read and modify the old way. However, in my development version I happen to be printing a lot more stuff. To test, I collapsed 18 of my seq_printf's into one call. That reduced the function size by a couple hu

Re: Hexagon-setup: Combine four seq_printf() calls into one call in show_cpuinfo()

2016-10-22 Thread SF Markus Elfring
Am 21.10.2016 um 19:53 schrieb Theodore Ts'o: > On Fri, Oct 21, 2016 at 07:33:30PM +0200, SF Markus Elfring wrote: >> >>> but (a) this isn't performance critical, >> >> This can be. > > In this case, no, it really can't possibly be performance critical. > If you can't see why, you have no business

Re: Hexagon-setup: Combine four seq_printf() calls into one call in show_cpuinfo()

2016-10-21 Thread SF Markus Elfring
> When the author of the semantic patch language is telling you to stand down, The collaboration evolved between Julia and me during the years somehow. Different software development opinions occur then as usual. Further opinions from contributors like you can eventually show variations between di

Re: Hexagon-setup: Combine four seq_printf() calls into one call in show_cpuinfo()

2016-10-21 Thread Theodore Ts'o
On Fri, Oct 21, 2016 at 07:33:30PM +0200, SF Markus Elfring wrote: > > > but (a) this isn't performance critical, > > This can be. In this case, no, it really can't possibly be performance critical. If you can't see why, you have no business trying to send patches. > > and (b) the number of byt

Re: Hexagon-setup: Combine four seq_printf() calls into one call in show_cpuinfo()

2016-10-21 Thread SF Markus Elfring
>> Is it really so difficult to interpret the suggested construction >> of a single (and relatively small) format string? > > It's not so difficult, so much as it makes things worse. It's easier > the way it originally was. Thanks for your view on this refactoring approach. > It might be inter

Re: [PATCH] Hexagon-setup: Combine four seq_printf() calls into one call in show_cpuinfo()

2016-10-21 Thread Theodore Ts'o
On Fri, Oct 21, 2016 at 11:00:22AM +0200, SF Markus Elfring wrote: > > > It is harder to see how the arguments fit into the strings > > and it is harder to see where the strings end and the arguments begin. > > Is it really so difficult to interpret the suggested construction > of a single (and r

Re: [PATCH] Hexagon-setup: Combine four seq_printf() calls into one call in show_cpuinfo()

2016-10-21 Thread SF Markus Elfring
>> +++ b/arch/hexagon/kernel/setup.c >> @@ -132,13 +132,14 @@ static int show_cpuinfo(struct seq_file *m, void *v) >> if (!cpu_online(cpu)) >> return 0; >> #endif >> - >> -seq_printf(m, "processor\t: %d\n", cpu); >> -seq_printf(m, "model name\t: Hexagon Virtual Machine\n"

Re: [PATCH] Hexagon-setup: Combine four seq_printf() calls into one call in show_cpuinfo()

2016-10-21 Thread Julia Lawall
On Fri, 21 Oct 2016, SF Markus Elfring wrote: > From: Markus Elfring > Date: Fri, 21 Oct 2016 08:18:38 +0200 > > Some data were printed into a sequence by four separate function calls. > Print the same data by a single function call instead. > > This issue was detected by using the Coccinelle s

[PATCH] Hexagon-setup: Combine four seq_printf() calls into one call in show_cpuinfo()

2016-10-20 Thread SF Markus Elfring
From: Markus Elfring Date: Fri, 21 Oct 2016 08:18:38 +0200 Some data were printed into a sequence by four separate function calls. Print the same data by a single function call instead. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- arch/hexagon/ke