mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Masami Hiramatsu <mhiramat@kernel.org>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Lukas Bulwahn <lukas.bulwahn@gmail.com>,
	Ingo Molnar <mingo@redhat.com>,
	kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org,
	Masami Hiramatsu <mhiramat@kernel.org>
Subject: Re: [PATCH] trace: remove unneeded initialization in __trace_uprobe_create()
Date: Thu, 6 Jan 2022 09:47:58 +0900	[thread overview]
Message-ID: <20220106094758.7f6e5b12962639559cf9afb8@kernel.org> (raw)
In-Reply-To: <20220105185715.0b40cb3f@gandalf.local.home>

On Wed, 5 Jan 2022 18:57:15 -0500
Steven Rostedt <rostedt@goodmis.org> wrote:

> Masami, want to ack this?
> 
> -- Steve
> 
> 
> On Mon, 27 Dec 2021 13:53:08 +0100
> Lukas Bulwahn <lukas.bulwahn@gmail.com> wrote:
> 
> > There is no need to initialize ret with 0, as all the early error branches
> > simply return constant values, and the default path always reaches
> > ret = kern_path(filename, LOOKUP_FOLLOW, &path), which will reset ret
> > before the initial value was ever used.
> > 
> > Remove this unneeded initialization and keep the code succinct.

Thanks, this looks good to me.

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

Regards,

> > 
> > Signed-off-by: Lukas Bulwahn <lukas.bulwahn@gmail.com>
> > ---
> >  kernel/trace/trace_uprobe.c | 1 -
> >  1 file changed, 1 deletion(-)
> > 
> > diff --git a/kernel/trace/trace_uprobe.c b/kernel/trace/trace_uprobe.c
> > index 5921951a0d5c..9da10c5efdce 100644
> > --- a/kernel/trace/trace_uprobe.c
> > +++ b/kernel/trace/trace_uprobe.c
> > @@ -548,7 +548,6 @@ static int __trace_uprobe_create(int argc, const char **argv)
> >  	bool is_return = false;
> >  	int i, ret;
> >  
> > -	ret = 0;
> >  	ref_ctr_offset = 0;
> >  
> >  	switch (argv[0][0]) {
> 


-- 
Masami Hiramatsu <mhiramat@kernel.org>

      reply	other threads:[~2022-01-06  0:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-27 12:53 Lukas Bulwahn
2022-01-05 23:57 ` Steven Rostedt
2022-01-06  0:47   ` Masami Hiramatsu [this message]

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=20220106094758.7f6e5b12962639559cf9afb8@kernel.org \
    --to=mhiramat@kernel.org \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lukas.bulwahn@gmail.com \
    --cc=mingo@redhat.com \
    --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

all inboxes | Powered by JetHome®