From: Steven Rostedt <rostedt@goodmis.org>
To: Colin King <colin.king@canonical.com>
Cc: Ingo Molnar <mingo@redhat.com>,
kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] tracing: remove redundant assignment to pointer 'event'
Date: Mon, 17 Jun 2019 09:42:44 -0400 [thread overview]
Message-ID: <20190617094244.14562920@gandalf.local.home> (raw)
In-Reply-To: <20190617123722.27376-1-colin.king@canonical.com>
On Mon, 17 Jun 2019 13:37:22 +0100
Colin King <colin.king@canonical.com> wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> The value assigned to pointer 'event' is never read and hence it
> is redundant and can be removed.
>
> Addresses-Coverity: ("Unused value")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
> kernel/trace/trace_events_hist.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/kernel/trace/trace_events_hist.c b/kernel/trace/trace_events_hist.c
> index ca6b0dff60c5..0013b43d8b4d 100644
> --- a/kernel/trace/trace_events_hist.c
> +++ b/kernel/trace/trace_events_hist.c
> @@ -1294,7 +1294,6 @@ static int __create_synth_event(int argc, const char *name, const char **argv)
> event = alloc_synth_event(name, n_fields, fields);
> if (IS_ERR(event)) {
> ret = PTR_ERR(event);
> - event = NULL;
This is one of those cases where I rather not touch it.
Yeah, it may not be read, but assigning event to NULL isn't dangerous
here. And if we change the code to expect event to be NULL or something
real, it is better to keep this.
-- Steve
> goto err;
> }
> ret = register_synth_event(event);
next prev parent reply other threads:[~2019-06-17 13:42 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-17 12:37 Colin King
2019-06-17 13:42 ` Steven Rostedt [this message]
2019-06-17 13:43 ` Colin Ian King
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=20190617094244.14562920@gandalf.local.home \
--to=rostedt@goodmis.org \
--cc=colin.king@canonical.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.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®