Commit 08b55775 authored by Alexey Dobriyan's avatar Alexey Dobriyan Committed by Linus Torvalds

proc: use seq_puts() everywhere

seq_printf() without format specifiers == faster seq_puts()

Link: http://lkml.kernel.org/r/20190114200545.GC9680@avx2Signed-off-by: default avatarAlexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 5713f35c
...@@ -343,28 +343,28 @@ static inline void task_seccomp(struct seq_file *m, struct task_struct *p) ...@@ -343,28 +343,28 @@ static inline void task_seccomp(struct seq_file *m, struct task_struct *p)
#ifdef CONFIG_SECCOMP #ifdef CONFIG_SECCOMP
seq_put_decimal_ull(m, "\nSeccomp:\t", p->seccomp.mode); seq_put_decimal_ull(m, "\nSeccomp:\t", p->seccomp.mode);
#endif #endif
seq_printf(m, "\nSpeculation_Store_Bypass:\t"); seq_puts(m, "\nSpeculation_Store_Bypass:\t");
switch (arch_prctl_spec_ctrl_get(p, PR_SPEC_STORE_BYPASS)) { switch (arch_prctl_spec_ctrl_get(p, PR_SPEC_STORE_BYPASS)) {
case -EINVAL: case -EINVAL:
seq_printf(m, "unknown"); seq_puts(m, "unknown");
break; break;
case PR_SPEC_NOT_AFFECTED: case PR_SPEC_NOT_AFFECTED:
seq_printf(m, "not vulnerable"); seq_puts(m, "not vulnerable");
break; break;
case PR_SPEC_PRCTL | PR_SPEC_FORCE_DISABLE: case PR_SPEC_PRCTL | PR_SPEC_FORCE_DISABLE:
seq_printf(m, "thread force mitigated"); seq_puts(m, "thread force mitigated");
break; break;
case PR_SPEC_PRCTL | PR_SPEC_DISABLE: case PR_SPEC_PRCTL | PR_SPEC_DISABLE:
seq_printf(m, "thread mitigated"); seq_puts(m, "thread mitigated");
break; break;
case PR_SPEC_PRCTL | PR_SPEC_ENABLE: case PR_SPEC_PRCTL | PR_SPEC_ENABLE:
seq_printf(m, "thread vulnerable"); seq_puts(m, "thread vulnerable");
break; break;
case PR_SPEC_DISABLE: case PR_SPEC_DISABLE:
seq_printf(m, "globally mitigated"); seq_puts(m, "globally mitigated");
break; break;
default: default:
seq_printf(m, "vulnerable"); seq_puts(m, "vulnerable");
break; break;
} }
seq_putc(m, '\n'); seq_putc(m, '\n');
......
...@@ -456,7 +456,7 @@ static int proc_pid_schedstat(struct seq_file *m, struct pid_namespace *ns, ...@@ -456,7 +456,7 @@ static int proc_pid_schedstat(struct seq_file *m, struct pid_namespace *ns,
struct pid *pid, struct task_struct *task) struct pid *pid, struct task_struct *task)
{ {
if (unlikely(!sched_info_on())) if (unlikely(!sched_info_on()))
seq_printf(m, "0 0 0\n"); seq_puts(m, "0 0 0\n");
else else
seq_printf(m, "%llu %llu %lu\n", seq_printf(m, "%llu %llu %lu\n",
(unsigned long long)task->se.sum_exec_runtime, (unsigned long long)task->se.sum_exec_runtime,
......
...@@ -178,7 +178,7 @@ static int nommu_vma_show(struct seq_file *m, struct vm_area_struct *vma) ...@@ -178,7 +178,7 @@ static int nommu_vma_show(struct seq_file *m, struct vm_area_struct *vma)
seq_file_path(m, file, ""); seq_file_path(m, file, "");
} else if (mm && is_stack(vma)) { } else if (mm && is_stack(vma)) {
seq_pad(m, ' '); seq_pad(m, ' ');
seq_printf(m, "[stack]"); seq_puts(m, "[stack]");
} }
seq_putc(m, '\n'); seq_putc(m, '\n');
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment