lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e9daa136-c6ab-2f96-3d20-6e143fa1170b@users.sourceforge.net>
Date:   Fri, 21 Oct 2016 11:00:22 +0200
From:   SF Markus Elfring <elfring@...rs.sourceforge.net>
To:     Julia Lawall <julia.lawall@...6.fr>
Cc:     linux-hexagon@...r.kernel.org, Richard Kuo <rkuo@...eaurora.org>,
        LKML <linux-kernel@...r.kernel.org>,
        kernel-janitors@...r.kernel.org
Subject: Re: [PATCH] Hexagon-setup: Combine four seq_printf() calls into one
 call in show_cpuinfo()

>> +++ 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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ