lkml.org 
[lkml]   [2014]   [Nov]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 3/3] trace: Replace single-character seq_puts with seq_putc
On Sat,  8 Nov 2014 21:42:12 +0100
Rasmus Villemoes <linux@rasmusvillemoes.dk> wrote:

> Printing a single character to a seqfile might as well be done with
> seq_putc instead of seq_puts; this avoids a strlen() call and a memory
> access. It also shaves another few bytes off the generated code.
>
> Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
> ---
> kernel/trace/ftrace.c | 2 +-
> kernel/trace/trace_events_trigger.c | 4 ++--
> kernel/trace/trace_functions_graph.c | 4 ++--
> kernel/trace/trace_kprobe.c | 10 +++++-----
> kernel/trace/trace_printk.c | 2 +-
> kernel/trace/trace_uprobe.c | 4 ++--
> 6 files changed, 13 insertions(+), 13 deletions(-)
>
> diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
> index 7890718..9ffd006 100644
> --- a/kernel/trace/ftrace.c
> +++ b/kernel/trace/ftrace.c
> @@ -2969,7 +2969,7 @@ static int t_show(struct seq_file *m, void *v)
> }
> }
>
> - seq_puts(m, "\n");
> + seq_putc(m, '\n');

Ah, you did it here. Well, it is fine to have it in the first patch
anyway.

-- Steve



\
 
 \ /
  Last update: 2014-11-14 04:21    [W:0.067 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site