public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Wan Jiabing <wanjiabing@vivo.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@redhat.com>,
	Mark Rutland <mark.rutland@arm.com>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Jiri Olsa <jolsa@kernel.org>, Namhyung Kim <namhyung@kernel.org>,
	linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org,
	kael_w@yeah.net
Subject: Re: [PATCH] perf sched: simplify if-if to if-else
Date: Sun, 24 Apr 2022 21:01:36 -0300	[thread overview]
Message-ID: <YmXk4K/w9+j+tRki@kernel.org> (raw)
In-Reply-To: <20220424090727.97865-1-wanjiabing@vivo.com>

Em Sun, Apr 24, 2022 at 05:07:27PM +0800, Wan Jiabing escreveu:
> Use if and else instead of if(A) and if (!A).

I'm now looking for a brown paper bag... There is some hope, but I'm not
in a mood, will check tomorrow, but certainly this should go in, thanks!

- Arnaldo
 
> Signed-off-by: Wan Jiabing <wanjiabing@vivo.com>
> ---
>  tools/perf/builtin-sched.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/tools/perf/builtin-sched.c b/tools/perf/builtin-sched.c
> index 646bd938927a..66f8e9318123 100644
> --- a/tools/perf/builtin-sched.c
> +++ b/tools/perf/builtin-sched.c
> @@ -3070,8 +3070,7 @@ static int perf_sched__timehist(struct perf_sched *sched)
>  	/* summary_only implies summary option, but don't overwrite summary if set */
>  	if (sched->summary_only)
>  		sched->summary = sched->summary_only;
> -
> -	if (!sched->summary_only)
> +	else
>  		timehist_header(sched);
>  
>  	err = perf_session__process_events(session);
> -- 
> 2.35.1

-- 

- Arnaldo

      reply	other threads:[~2022-04-25  0:01 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-24  9:07 [PATCH] perf sched: simplify if-if to if-else Wan Jiabing
2022-04-25  0:01 ` Arnaldo Carvalho de Melo [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=YmXk4K/w9+j+tRki@kernel.org \
    --to=acme@kernel.org \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=jolsa@kernel.org \
    --cc=kael_w@yeah.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    --cc=wanjiabing@vivo.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