mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: sunliming <sunliming@kylinos.cn>
Cc: mingo@kernel.org, linux-kernel@vger.kernel.org, kelulanainsley@gmail.com
Subject: Re: [PATCH] tracing: Simplify conditional compilation code in tracing_set_tracer()
Date: Thu, 2 Jun 2022 08:25:59 -0400	[thread overview]
Message-ID: <20220602082559.795189e1@rorschach.local.home> (raw)
In-Reply-To: <20220602022404.508144-1-sunliming@kylinos.cn>

On Thu,  2 Jun 2022 10:24:04 +0800
sunliming <sunliming@kylinos.cn> wrote:

> Two conditional compilation directives "#ifdef CONFIG_TRACER_SNAPSHOT"
> are used consecutively, and no other code in between. Simplify conditional
> the compilation code and only use one "#ifdef CONFIG_TRACER_SNAPSHOT".

I think you mean CONFIG_TRACER_MAX_TRACE here.

-- Steve

> 
> Signed-off-by: sunliming <sunliming@kylinos.cn>
> ---
>  kernel/trace/trace.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
> index f400800bc910..dc959e339512 100644
> --- a/kernel/trace/trace.c
> +++ b/kernel/trace/trace.c
> @@ -6430,9 +6430,7 @@ int tracing_set_tracer(struct trace_array *tr, const char *buf)
>  		synchronize_rcu();
>  		free_snapshot(tr);
>  	}
> -#endif
>  
> -#ifdef CONFIG_TRACER_MAX_TRACE
>  	if (t->use_max_tr && !had_max_tr) {
>  		ret = tracing_alloc_snapshot_instance(tr);
>  		if (ret < 0)


  reply	other threads:[~2022-06-02 12:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-02  2:24 sunliming
2022-06-02 12:25 ` Steven Rostedt [this message]
2022-06-02 13:54   ` sunliming

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220602082559.795189e1@rorschach.local.home \
    --to=rostedt@goodmis.org \
    --cc=kelulanainsley@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=sunliming@kylinos.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®