Messages in this thread Patch in this message | | | Subject | [PATCH 1/4] MIPS/kernel/r2-to-r6-emul: Use seq_puts() in mipsr2_stats_show() | From | SF Markus Elfring <> | Date | Mon, 24 Oct 2016 14:27:55 +0200 |
| |
From: Markus Elfring <elfring@users.sourceforge.net> Date: Mon, 24 Oct 2016 09:34:51 +0200
A string which did not contain a data format specification should be put into a sequence. Thus use the corresponding function "seq_puts" so that the data output will be a bit more efficient for the headline.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> --- arch/mips/kernel/mips-r2-to-r6-emul.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/arch/mips/kernel/mips-r2-to-r6-emul.c b/arch/mips/kernel/mips-r2-to-r6-emul.c index 22dedd6..1bdcb65 100644 --- a/arch/mips/kernel/mips-r2-to-r6-emul.c +++ b/arch/mips/kernel/mips-r2-to-r6-emul.c @@ -2232,9 +2232,10 @@ int mipsr2_decoder(struct pt_regs *regs, u32 inst, unsigned long *fcr31) static int mipsr2_stats_show(struct seq_file *s, void *unused) { - - seq_printf(s, "Instruction\tTotal\tBDslot\n------------------------------\n"); - seq_printf(s, "movs\t\t%ld\t%ld\n", + seq_puts(s, + "Instruction\tTotal\tBDslot\n------------------------------\n" + "movs\t\t"); + seq_printf(s, "%ld\t%ld\n", (unsigned long)__this_cpu_read(mipsr2emustats.movs), (unsigned long)__this_cpu_read(mipsr2bdemustats.movs)); seq_printf(s, "hilo\t\t%ld\t%ld\n", -- 2.10.1
| |