linux-trace-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Masami Hiramatsu (Google) <mhiramat@kernel.org>
To: Julia Lawall <Julia.Lawall@inria.fr>
Cc: Steven Rostedt <rostedt@goodmis.org>,
	kernel-janitors@vger.kernel.org,
	Masami Hiramatsu <mhiramat@kernel.org>,
	linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org
Subject: Re: [PATCH] tracing/eprobe: drop unneeded breaks
Date: Fri, 29 Sep 2023 20:32:59 +0900	[thread overview]
Message-ID: <20230929203259.74d4ba263b3455172ef37f06@kernel.org> (raw)
In-Reply-To: <20230928104334.41215-1-Julia.Lawall@inria.fr>

On Thu, 28 Sep 2023 12:43:34 +0200
Julia Lawall <Julia.Lawall@inria.fr> wrote:

> Drop break after return.
> 

Good catch! This looks good to me.

Acked-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>

And

Fixes: 7491e2c44278 ("tracing: Add a probe that attaches to trace events")

> Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>
> 
> ---
>  kernel/trace/trace_eprobe.c |    5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/kernel/trace/trace_eprobe.c b/kernel/trace/trace_eprobe.c
> index 72714cbf475c..03c851f57969 100644
> --- a/kernel/trace/trace_eprobe.c
> +++ b/kernel/trace/trace_eprobe.c
> @@ -788,12 +788,9 @@ find_and_get_event(const char *system, const char *event_name)
>  		name = trace_event_name(tp_event);
>  		if (!name || strcmp(event_name, name))
>  			continue;
> -		if (!trace_event_try_get_ref(tp_event)) {
> +		if (!trace_event_try_get_ref(tp_event))
>  			return NULL;
> -			break;
> -		}
>  		return tp_event;
> -		break;
>  	}
>  	return NULL;
>  }
> 


-- 
Masami Hiramatsu (Google) <mhiramat@kernel.org>

  reply	other threads:[~2023-09-29 11:33 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-28 10:43 [PATCH] tracing/eprobe: drop unneeded breaks Julia Lawall
2023-09-29 11:32 ` Masami Hiramatsu [this message]
2023-09-29 11:37   ` Julia Lawall
2023-09-30  9:19     ` Masami Hiramatsu
2023-10-12 10:40       ` Dan Carpenter

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=20230929203259.74d4ba263b3455172ef37f06@kernel.org \
    --to=mhiramat@kernel.org \
    --cc=Julia.Lawall@inria.fr \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-trace-kernel@vger.kernel.org \
    --cc=rostedt@goodmis.org \
    /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;
as well as URLs for NNTP newsgroup(s).