linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Masami Hiramatsu <mhiramat@kernel.org>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: frowand.list@gmail.com, linux-kernel@vger.kernel.org,
	Masami Hiramatsu <mhiramat@kernel.org>,
	Ingo Molnar <mingo@kernel.org>,
	Tom Zanussi <tom.zanussi@linux.intel.com>,
	Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com>
Subject: Re: [PATCH v2] tracing: initialize variable in create_dyn_event()
Date: Sat, 23 Mar 2019 19:30:48 +0900	[thread overview]
Message-ID: <20190323193048.35d96b86388552b0b7f7a36d@kernel.org> (raw)
In-Reply-To: <20190322152000.0a357bb1@gandalf.local.home>

On Fri, 22 Mar 2019 15:20:00 -0400
Steven Rostedt <rostedt@goodmis.org> wrote:

> On Thu, 21 Mar 2019 23:58:20 -0700
> frowand.list@gmail.com wrote:
> 
> > From: Frank Rowand <frank.rowand@sony.com>
> > 
> > Fix compile warning in create_dyn_event(): 'ret' may be used uninitialized
> > in this function [-Wuninitialized].
> > 
> > Fixes: 5448d44c3855 ("tracing: Add unified dynamic event framework")
> > 
> > Signed-off-by: Frank Rowand <frank.rowand@sony.com>
> 
> Applied. Thanks Frank!

Thank you Frank and Steve,

feel free to add my ack.

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

Thanks!

> 
> -- Steve
> 
> > ---
> > 
> > changes since v1:
> >   - initialize to -ENODEV instead of 0, as suggested by Steve
> > 
> >  kernel/trace/trace_dynevent.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/kernel/trace/trace_dynevent.c b/kernel/trace/trace_dynevent.c
> > index dd1f43588d70..fa100ed3b4de 100644
> > --- a/kernel/trace/trace_dynevent.c
> > +++ b/kernel/trace/trace_dynevent.c
> > @@ -74,7 +74,7 @@ int dyn_event_release(int argc, char **argv, struct dyn_event_operations *type)
> >  static int create_dyn_event(int argc, char **argv)
> >  {
> >  	struct dyn_event_operations *ops;
> > -	int ret;
> > +	int ret = -ENODEV;
> >  
> >  	if (argv[0][0] == '-' || argv[0][0] == '!')
> >  		return dyn_event_release(argc, argv, NULL);
> 


-- 
Masami Hiramatsu <mhiramat@kernel.org>

      reply	other threads:[~2019-03-23 10:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-22  6:58 [PATCH v2] tracing: initialize variable in create_dyn_event() frowand.list
2019-03-22 19:20 ` Steven Rostedt
2019-03-23 10:30   ` 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=20190323193048.35d96b86388552b0b7f7a36d@kernel.org \
    --to=mhiramat@kernel.org \
    --cc=frowand.list@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=ravi.bangoria@linux.vnet.ibm.com \
    --cc=rostedt@goodmis.org \
    --cc=tom.zanussi@linux.intel.com \
    /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).