提交 4122669e 编写于 作者: J Joe Perches 提交者: Linus Torvalds

nios2: cpuinfo: remove use of seq_printf return value

The seq_printf return value, because it's frequently misused,
will eventually be converted to void.

See: commit 1f33c41c ("seq_file: Rename seq_overflow() to
     seq_has_overflowed() and make public")
Signed-off-by: NJoe Perches <joe@perches.com>
Cc: Ley Foon Tan <lftan@altera.com>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 81f0cd97
...@@ -126,47 +126,46 @@ void __init setup_cpuinfo(void) ...@@ -126,47 +126,46 @@ void __init setup_cpuinfo(void)
*/ */
static int show_cpuinfo(struct seq_file *m, void *v) static int show_cpuinfo(struct seq_file *m, void *v)
{ {
int count = 0;
const u32 clockfreq = cpuinfo.cpu_clock_freq; const u32 clockfreq = cpuinfo.cpu_clock_freq;
count = seq_printf(m, seq_printf(m,
"CPU:\t\tNios II/%s\n" "CPU:\t\tNios II/%s\n"
"MMU:\t\t%s\n" "MMU:\t\t%s\n"
"FPU:\t\tnone\n" "FPU:\t\tnone\n"
"Clocking:\t%u.%02u MHz\n" "Clocking:\t%u.%02u MHz\n"
"BogoMips:\t%lu.%02lu\n" "BogoMips:\t%lu.%02lu\n"
"Calibration:\t%lu loops\n", "Calibration:\t%lu loops\n",
cpuinfo.cpu_impl, cpuinfo.cpu_impl,
cpuinfo.mmu ? "present" : "none", cpuinfo.mmu ? "present" : "none",
clockfreq / 1000000, (clockfreq / 100000) % 10, clockfreq / 1000000, (clockfreq / 100000) % 10,
(loops_per_jiffy * HZ) / 500000, (loops_per_jiffy * HZ) / 500000,
((loops_per_jiffy * HZ) / 5000) % 100, ((loops_per_jiffy * HZ) / 5000) % 100,
(loops_per_jiffy * HZ)); (loops_per_jiffy * HZ));
count += seq_printf(m, seq_printf(m,
"HW:\n" "HW:\n"
" MUL:\t\t%s\n" " MUL:\t\t%s\n"
" MULX:\t\t%s\n" " MULX:\t\t%s\n"
" DIV:\t\t%s\n", " DIV:\t\t%s\n",
cpuinfo.has_mul ? "yes" : "no", cpuinfo.has_mul ? "yes" : "no",
cpuinfo.has_mulx ? "yes" : "no", cpuinfo.has_mulx ? "yes" : "no",
cpuinfo.has_div ? "yes" : "no"); cpuinfo.has_div ? "yes" : "no");
count += seq_printf(m, seq_printf(m,
"Icache:\t\t%ukB, line length: %u\n", "Icache:\t\t%ukB, line length: %u\n",
cpuinfo.icache_size >> 10, cpuinfo.icache_size >> 10,
cpuinfo.icache_line_size); cpuinfo.icache_line_size);
count += seq_printf(m, seq_printf(m,
"Dcache:\t\t%ukB, line length: %u\n", "Dcache:\t\t%ukB, line length: %u\n",
cpuinfo.dcache_size >> 10, cpuinfo.dcache_size >> 10,
cpuinfo.dcache_line_size); cpuinfo.dcache_line_size);
count += seq_printf(m, seq_printf(m,
"TLB:\t\t%u ways, %u entries, %u PID bits\n", "TLB:\t\t%u ways, %u entries, %u PID bits\n",
cpuinfo.tlb_num_ways, cpuinfo.tlb_num_ways,
cpuinfo.tlb_num_entries, cpuinfo.tlb_num_entries,
cpuinfo.tlb_pid_num_bits); cpuinfo.tlb_pid_num_bits);
return 0; return 0;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册