mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: frowand.list@gmail.com
Cc: 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: Fri, 22 Mar 2019 15:20:00 -0400	[thread overview]
Message-ID: <20190322152000.0a357bb1@gandalf.local.home> (raw)
In-Reply-To: <1553237900-8555-1-git-send-email-frowand.list@gmail.com>

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!

-- 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);


  reply	other threads:[~2019-03-22 19:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-22  6:58 frowand.list
2019-03-22 19:20 ` Steven Rostedt [this message]
2019-03-23 10:30   ` Masami Hiramatsu

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=20190322152000.0a357bb1@gandalf.local.home \
    --to=rostedt@goodmis.org \
    --cc=frowand.list@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mhiramat@kernel.org \
    --cc=mingo@kernel.org \
    --cc=ravi.bangoria@linux.vnet.ibm.com \
    --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

all inboxes | Powered by JetHome®