mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Alex Shi <alex.shi@linux.alibaba.com>
Cc: Ingo Molnar <mingo@redhat.com>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] tracing: remove unused ret
Date: Tue, 21 Jan 2020 17:35:49 -0500	[thread overview]
Message-ID: <20200121173549.3de146d5@gandalf.local.home> (raw)
In-Reply-To: <1579586083-45359-1-git-send-email-alex.shi@linux.alibaba.com>

On Tue, 21 Jan 2020 13:54:43 +0800
Alex Shi <alex.shi@linux.alibaba.com> wrote:

> No body care the variable 'ret' in function unregister_field_var_hists,
> better to remove it.
> 
> Signed-off-by: Alex Shi <alex.shi@linux.alibaba.com>
> Cc: Steven Rostedt <rostedt@goodmis.org> 
> Cc: Ingo Molnar <mingo@redhat.com> 
> Cc: linux-kernel@vger.kernel.org 
> ---
>  kernel/trace/trace_events_hist.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/kernel/trace/trace_events_hist.c b/kernel/trace/trace_events_hist.c
> index f62de5f43e79..0acfac95ca2a 100644
> --- a/kernel/trace/trace_events_hist.c
> +++ b/kernel/trace/trace_events_hist.c
> @@ -5712,12 +5712,11 @@ static void unregister_field_var_hists(struct hist_trigger_data *hist_data)
>  	struct trace_event_file *file;
>  	unsigned int i;
>  	char *cmd;
> -	int ret;
>  
>  	for (i = 0; i < hist_data->n_field_var_hists; i++) {
>  		file = hist_data->field_var_hists[i]->hist_data->event_file;
>  		cmd = hist_data->field_var_hists[i]->cmd;
> -		ret = event_hist_trigger_func(&trigger_hist_cmd, file,
> +		event_hist_trigger_func(&trigger_hist_cmd, file,

I pulled in some of your other patches (removing unused macros), but
these that remove 'ret' I prefer not to take. Yes, we currently do not
use ret here, but the compiler will easily remove its existence. I'm
thinking if anything, we should report an error if they do return
something other than success.

-- Steve



>  					      "!hist", "hist", cmd);
>  	}
>  }


  reply	other threads:[~2020-01-21 22:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-21  5:54 Alex Shi
2020-01-21 22:35 ` Steven Rostedt [this message]
2020-02-04 11:11   ` Alex Shi

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=20200121173549.3de146d5@gandalf.local.home \
    --to=rostedt@goodmis.org \
    --cc=alex.shi@linux.alibaba.com \
    --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®