Skip to content

Commit 08b5577

Browse files
Alexey Dobriyantorvalds
authored andcommitted
proc: use seq_puts() everywhere
seq_printf() without format specifiers == faster seq_puts() Link: http://lkml.kernel.org/r/20190114200545.GC9680@avx2 Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 5713f35 commit 08b5577

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

fs/proc/array.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -343,28 +343,28 @@ static inline void task_seccomp(struct seq_file *m, struct task_struct *p)
343343
#ifdef CONFIG_SECCOMP
344344
seq_put_decimal_ull(m, "\nSeccomp:\t", p->seccomp.mode);
345345
#endif
346-
seq_printf(m, "\nSpeculation_Store_Bypass:\t");
346+
seq_puts(m, "\nSpeculation_Store_Bypass:\t");
347347
switch (arch_prctl_spec_ctrl_get(p, PR_SPEC_STORE_BYPASS)) {
348348
case -EINVAL:
349-
seq_printf(m, "unknown");
349+
seq_puts(m, "unknown");
350350
break;
351351
case PR_SPEC_NOT_AFFECTED:
352-
seq_printf(m, "not vulnerable");
352+
seq_puts(m, "not vulnerable");
353353
break;
354354
case PR_SPEC_PRCTL | PR_SPEC_FORCE_DISABLE:
355-
seq_printf(m, "thread force mitigated");
355+
seq_puts(m, "thread force mitigated");
356356
break;
357357
case PR_SPEC_PRCTL | PR_SPEC_DISABLE:
358-
seq_printf(m, "thread mitigated");
358+
seq_puts(m, "thread mitigated");
359359
break;
360360
case PR_SPEC_PRCTL | PR_SPEC_ENABLE:
361-
seq_printf(m, "thread vulnerable");
361+
seq_puts(m, "thread vulnerable");
362362
break;
363363
case PR_SPEC_DISABLE:
364-
seq_printf(m, "globally mitigated");
364+
seq_puts(m, "globally mitigated");
365365
break;
366366
default:
367-
seq_printf(m, "vulnerable");
367+
seq_puts(m, "vulnerable");
368368
break;
369369
}
370370
seq_putc(m, '\n');

fs/proc/base.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,7 @@ static int proc_pid_schedstat(struct seq_file *m, struct pid_namespace *ns,
456456
struct pid *pid, struct task_struct *task)
457457
{
458458
if (unlikely(!sched_info_on()))
459-
seq_printf(m, "0 0 0\n");
459+
seq_puts(m, "0 0 0\n");
460460
else
461461
seq_printf(m, "%llu %llu %lu\n",
462462
(unsigned long long)task->se.sum_exec_runtime,

fs/proc/task_nommu.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ static int nommu_vma_show(struct seq_file *m, struct vm_area_struct *vma)
178178
seq_file_path(m, file, "");
179179
} else if (mm && is_stack(vma)) {
180180
seq_pad(m, ' ');
181-
seq_printf(m, "[stack]");
181+
seq_puts(m, "[stack]");
182182
}
183183

184184
seq_putc(m, '\n');

0 commit comments

Comments
 (0)