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

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

 



>> +++ 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");
>> -	seq_printf(m, "BogoMips\t: %lu.%02lu\n",
>> -		(loops_per_jiffy * HZ) / 500000,
>> -		((loops_per_jiffy * HZ) / 5000) % 100);
>> -	seq_printf(m, "\n");
>> +	seq_printf(m,
>> +		   "processor\t: %d\n"
>> +		   "model name\t: Hexagon Virtual Machine\n"
>> +		   "BogoMips\t: %lu.%02lu\n"
>> +		   "\n",
>> +		   cpu,
>> +		   (loops_per_jiffy * HZ) / 500000,
>> +		   ((loops_per_jiffy * HZ) / 5000) % 100);
> 
> This looks completely pointless.

Thanks for your software development opinion in this use case.


> 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 relatively small) format string?

Regards,
Markus
--
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