Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 81f0cd97 authored by Joe Perches's avatar Joe Perches Committed by Linus Torvalds
Browse files

microblaze: mb: 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: default avatarJoe Perches <joe@perches.com>
Acked-by: default avatarMichal Simek <monstr@monstr.eu>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 7f032d6e
Loading
Loading
Loading
Loading
+73 −76
Original line number Diff line number Diff line
@@ -27,7 +27,6 @@

static int show_cpuinfo(struct seq_file *m, void *v)
{
	int count = 0;
	char *fpga_family = "Unknown";
	char *cpu_ver = "Unknown";
	int i;
@@ -48,7 +47,7 @@ static int show_cpuinfo(struct seq_file *m, void *v)
		}
	}

	count = seq_printf(m,
	seq_printf(m,
		   "CPU-Family:	MicroBlaze\n"
		   "FPGA-Arch:	%s\n"
		   "CPU-Ver:	%s, %s endian\n"
@@ -57,14 +56,12 @@ static int show_cpuinfo(struct seq_file *m, void *v)
		   fpga_family,
		   cpu_ver,
		   cpuinfo.endian ? "little" : "big",
			cpuinfo.cpu_clock_freq /
			1000000,
			cpuinfo.cpu_clock_freq %
			1000000,
		   cpuinfo.cpu_clock_freq / 1000000,
		   cpuinfo.cpu_clock_freq % 1000000,
		   loops_per_jiffy / (500000 / HZ),
		   (loops_per_jiffy / (5000 / HZ)) % 100);

	count += seq_printf(m,
	seq_printf(m,
		   "HW:\n Shift:\t\t%s\n"
		   " MSR:\t\t%s\n"
		   " PCMP:\t\t%s\n"
@@ -74,11 +71,9 @@ static int show_cpuinfo(struct seq_file *m, void *v)
		   (cpuinfo.use_instr & PVR2_USE_PCMP_INSTR) ? "yes" : "no",
		   (cpuinfo.use_instr & PVR0_USE_DIV_MASK) ? "yes" : "no");

	count += seq_printf(m,
			" MMU:\t\t%x\n",
			cpuinfo.mmu);
	seq_printf(m, " MMU:\t\t%x\n", cpuinfo.mmu);

	count += seq_printf(m,
	seq_printf(m,
		   " MUL:\t\t%s\n"
		   " FPU:\t\t%s\n",
		   (cpuinfo.use_mult & PVR2_USE_MUL64_MASK) ? "v2" :
@@ -86,7 +81,7 @@ static int show_cpuinfo(struct seq_file *m, void *v)
		   (cpuinfo.use_fpu & PVR2_USE_FPU2_MASK) ? "v2" :
		   (cpuinfo.use_fpu & PVR0_USE_FPU_MASK) ? "v1" : "no");

	count += seq_printf(m,
	seq_printf(m,
		   " Exc:\t\t%s%s%s%s%s%s%s%s\n",
		   (cpuinfo.use_exc & PVR2_OPCODE_0x0_ILL_MASK) ? "op0x0 " : "",
		   (cpuinfo.use_exc & PVR2_UNALIGNED_EXC_MASK) ? "unal " : "",
@@ -97,42 +92,44 @@ static int show_cpuinfo(struct seq_file *m, void *v)
		   (cpuinfo.use_exc & PVR2_FPU_EXC_MASK) ? "fpu " : "",
		   (cpuinfo.use_exc & PVR2_USE_FSL_EXC) ? "fsl " : "");

	count += seq_printf(m,
	seq_printf(m,
		   "Stream-insns:\t%sprivileged\n",
		   cpuinfo.mmu_privins ? "un" : "");

	if (cpuinfo.use_icache)
		count += seq_printf(m,
		seq_printf(m,
			   "Icache:\t\t%ukB\tline length:\t%dB\n",
			   cpuinfo.icache_size >> 10,
			   cpuinfo.icache_line_length);
	else
		count += seq_printf(m, "Icache:\t\tno\n");
		seq_puts(m, "Icache:\t\tno\n");

	if (cpuinfo.use_dcache) {
		count += seq_printf(m,
		seq_printf(m,
			   "Dcache:\t\t%ukB\tline length:\t%dB\n",
			   cpuinfo.dcache_size >> 10,
			   cpuinfo.dcache_line_length);
		seq_printf(m, "Dcache-Policy:\t");
		seq_puts(m, "Dcache-Policy:\t");
		if (cpuinfo.dcache_wb)
			count += seq_printf(m, "write-back\n");
			seq_puts(m, "write-back\n");
		else
			count += seq_printf(m, "write-through\n");
	} else
		count += seq_printf(m, "Dcache:\t\tno\n");
			seq_puts(m, "write-through\n");
	} else {
		seq_puts(m, "Dcache:\t\tno\n");
	}

	count += seq_printf(m,
	seq_printf(m,
		   "HW-Debug:\t%s\n",
		   cpuinfo.hw_debug ? "yes" : "no");

	count += seq_printf(m,
	seq_printf(m,
		   "PVR-USR1:\t%02x\n"
		   "PVR-USR2:\t%08x\n",
		   cpuinfo.pvr_user1,
		   cpuinfo.pvr_user2);

	count += seq_printf(m, "Page size:\t%lu\n", PAGE_SIZE);
	seq_printf(m, "Page size:\t%lu\n", PAGE_SIZE);

	return 0;
}