aboutsummaryrefslogtreecommitdiffstats
path: root/arch/nios2
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2015-04-15 19:18:00 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2015-04-15 19:35:24 -0400
commit4122669e5266a2af8a84a499cf7821786ed7d2cf (patch)
treee55a8320627ae5be7d9a8bfbf0f8e67e4c210243 /arch/nios2
parent81f0cd97aaf20b0df97ec888d90aa46f5279282b (diff)
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 1f33c41c03da ("seq_file: Rename seq_overflow() to seq_has_overflowed() and make public") Signed-off-by: Joe Perches <joe@perches.com> Cc: Ley Foon Tan <lftan@altera.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/nios2')
-rw-r--r--arch/nios2/kernel/cpuinfo.c77
1 files changed, 38 insertions, 39 deletions
diff --git a/arch/nios2/kernel/cpuinfo.c b/arch/nios2/kernel/cpuinfo.c
index a223691dff4f..1d96de0bd4aa 100644
--- a/arch/nios2/kernel/cpuinfo.c
+++ b/arch/nios2/kernel/cpuinfo.c
@@ -126,47 +126,46 @@ void __init setup_cpuinfo(void)
126 */ 126 */
127static int show_cpuinfo(struct seq_file *m, void *v) 127static int show_cpuinfo(struct seq_file *m, void *v)
128{ 128{
129 int count = 0;
130 const u32 clockfreq = cpuinfo.cpu_clock_freq; 129 const u32 clockfreq = cpuinfo.cpu_clock_freq;
131 130
132 count = seq_printf(m, 131 seq_printf(m,
133 "CPU:\t\tNios II/%s\n" 132 "CPU:\t\tNios II/%s\n"
134 "MMU:\t\t%s\n" 133 "MMU:\t\t%s\n"
135 "FPU:\t\tnone\n" 134 "FPU:\t\tnone\n"
136 "Clocking:\t%u.%02u MHz\n" 135 "Clocking:\t%u.%02u MHz\n"
137 "BogoMips:\t%lu.%02lu\n" 136 "BogoMips:\t%lu.%02lu\n"
138 "Calibration:\t%lu loops\n", 137 "Calibration:\t%lu loops\n",
139 cpuinfo.cpu_impl, 138 cpuinfo.cpu_impl,
140 cpuinfo.mmu ? "present" : "none", 139 cpuinfo.mmu ? "present" : "none",
141 clockfreq / 1000000, (clockfreq / 100000) % 10, 140 clockfreq / 1000000, (clockfreq / 100000) % 10,
142 (loops_per_jiffy * HZ) / 500000, 141 (loops_per_jiffy * HZ) / 500000,
143 ((loops_per_jiffy * HZ) / 5000) % 100, 142 ((loops_per_jiffy * HZ) / 5000) % 100,
144 (loops_per_jiffy * HZ)); 143 (loops_per_jiffy * HZ));
145 144
146 count += seq_printf(m, 145 seq_printf(m,
147 "HW:\n" 146 "HW:\n"
148 " MUL:\t\t%s\n" 147 " MUL:\t\t%s\n"
149 " MULX:\t\t%s\n" 148 " MULX:\t\t%s\n"
150 " DIV:\t\t%s\n", 149 " DIV:\t\t%s\n",
151 cpuinfo.has_mul ? "yes" : "no", 150 cpuinfo.has_mul ? "yes" : "no",
152 cpuinfo.has_mulx ? "yes" : "no", 151 cpuinfo.has_mulx ? "yes" : "no",
153 cpuinfo.has_div ? "yes" : "no"); 152 cpuinfo.has_div ? "yes" : "no");
154 153
155 count += seq_printf(m, 154 seq_printf(m,
156 "Icache:\t\t%ukB, line length: %u\n", 155 "Icache:\t\t%ukB, line length: %u\n",
157 cpuinfo.icache_size >> 10, 156 cpuinfo.icache_size >> 10,
158 cpuinfo.icache_line_size); 157 cpuinfo.icache_line_size);
159 158
160 count += seq_printf(m, 159 seq_printf(m,
161 "Dcache:\t\t%ukB, line length: %u\n", 160 "Dcache:\t\t%ukB, line length: %u\n",
162 cpuinfo.dcache_size >> 10, 161 cpuinfo.dcache_size >> 10,
163 cpuinfo.dcache_line_size); 162 cpuinfo.dcache_line_size);
164 163
165 count += seq_printf(m, 164 seq_printf(m,
166 "TLB:\t\t%u ways, %u entries, %u PID bits\n", 165 "TLB:\t\t%u ways, %u entries, %u PID bits\n",
167 cpuinfo.tlb_num_ways, 166 cpuinfo.tlb_num_ways,
168 cpuinfo.tlb_num_entries, 167 cpuinfo.tlb_num_entries,
169 cpuinfo.tlb_pid_num_bits); 168 cpuinfo.tlb_pid_num_bits);
170 169
171 return 0; 170 return 0;
172} 171}