Skip to content

Commit 58a1aa7

Browse files
JoePerchestorvalds
authored andcommitted
openrisc: 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 1f33c41 ("seq_file: Rename seq_overflow() to seq_has_overflowed() and make public") Signed-off-by: Joe Perches <joe@perches.com> Cc: Jonas Bonn <jonas@southpole.se> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent cd2b293 commit 58a1aa7

1 file changed

Lines changed: 26 additions & 24 deletions

File tree

‎arch/openrisc/kernel/setup.c‎

Lines changed: 26 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -329,30 +329,32 @@ static int show_cpuinfo(struct seq_file *m, void *v)
329329
version = (vr & SPR_VR_VER) >> 24;
330330
revision = vr & SPR_VR_REV;
331331

332-
return seq_printf(m,
333-
"cpu\t\t: OpenRISC-%x\n"
334-
"revision\t: %d\n"
335-
"frequency\t: %ld\n"
336-
"dcache size\t: %d bytes\n"
337-
"dcache block size\t: %d bytes\n"
338-
"icache size\t: %d bytes\n"
339-
"icache block size\t: %d bytes\n"
340-
"immu\t\t: %d entries, %lu ways\n"
341-
"dmmu\t\t: %d entries, %lu ways\n"
342-
"bogomips\t: %lu.%02lu\n",
343-
version,
344-
revision,
345-
loops_per_jiffy * HZ,
346-
cpuinfo.dcache_size,
347-
cpuinfo.dcache_block_size,
348-
cpuinfo.icache_size,
349-
cpuinfo.icache_block_size,
350-
1 << ((mfspr(SPR_DMMUCFGR) & SPR_DMMUCFGR_NTS) >> 2),
351-
1 + (mfspr(SPR_DMMUCFGR) & SPR_DMMUCFGR_NTW),
352-
1 << ((mfspr(SPR_IMMUCFGR) & SPR_IMMUCFGR_NTS) >> 2),
353-
1 + (mfspr(SPR_IMMUCFGR) & SPR_IMMUCFGR_NTW),
354-
(loops_per_jiffy * HZ) / 500000,
355-
((loops_per_jiffy * HZ) / 5000) % 100);
332+
seq_printf(m,
333+
"cpu\t\t: OpenRISC-%x\n"
334+
"revision\t: %d\n"
335+
"frequency\t: %ld\n"
336+
"dcache size\t: %d bytes\n"
337+
"dcache block size\t: %d bytes\n"
338+
"icache size\t: %d bytes\n"
339+
"icache block size\t: %d bytes\n"
340+
"immu\t\t: %d entries, %lu ways\n"
341+
"dmmu\t\t: %d entries, %lu ways\n"
342+
"bogomips\t: %lu.%02lu\n",
343+
version,
344+
revision,
345+
loops_per_jiffy * HZ,
346+
cpuinfo.dcache_size,
347+
cpuinfo.dcache_block_size,
348+
cpuinfo.icache_size,
349+
cpuinfo.icache_block_size,
350+
1 << ((mfspr(SPR_DMMUCFGR) & SPR_DMMUCFGR_NTS) >> 2),
351+
1 + (mfspr(SPR_DMMUCFGR) & SPR_DMMUCFGR_NTW),
352+
1 << ((mfspr(SPR_IMMUCFGR) & SPR_IMMUCFGR_NTS) >> 2),
353+
1 + (mfspr(SPR_IMMUCFGR) & SPR_IMMUCFGR_NTW),
354+
(loops_per_jiffy * HZ) / 500000,
355+
((loops_per_jiffy * HZ) / 5000) % 100);
356+
357+
return 0;
356358
}
357359

358360
static void *c_start(struct seq_file *m, loff_t * pos)

0 commit comments

Comments
 (0)