From: Frank Rowand <frowand.list@gmail.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: linux-kernel@vger.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] tracing: initialize variable in create_dyn_event()
Date: Thu, 14 Mar 2019 14:05:02 -0700 [thread overview]
Message-ID: <2872713a-8b99-5117-27df-eeda824e55a0@gmail.com> (raw)
In-Reply-To: <1548382670-30266-1-git-send-email-frowand.list@gmail.com>
Hi Steve,
Ping.
-Frank
On 1/24/19 6:17 PM, 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>
> ---
>
> Compile and boot tested only. Please verify the initialization value
> of zero is correct.
>
> There is also a sparse warning you might want to check into (when
> ARCH=arm, so 32 bit):
>
> include/uapi/linux/perf_event.h:147:56: warning: cast truncates bits from constant value (8000000000000000 becomes 0)
>
>
> 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..4f633476c307 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 = 0;
>
> if (argv[0][0] == '-' || argv[0][0] == '!')
> return dyn_event_release(argc, argv, NULL);
>
next prev parent reply other threads:[~2019-03-14 21:05 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-25 2:17 frowand.list
2019-03-14 21:05 ` Frank Rowand [this message]
2019-03-14 22:19 ` Steven Rostedt
2019-03-14 23:26 ` Masami Hiramatsu
2019-03-15 15:56 ` Frank Rowand
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=2872713a-8b99-5117-27df-eeda824e55a0@gmail.com \
--to=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
all inboxes | Powered by JetHome®