[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180621143316.GA27616@hirez.programming.kicks-ass.net>
Date: Thu, 21 Jun 2018 16:33:16 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Vincent Guittot <vincent.guittot@...aro.org>
Cc: mingo@...nel.org, linux-kernel@...r.kernel.org, rjw@...ysocki.net,
juri.lelli@...hat.com, dietmar.eggemann@....com,
Morten.Rasmussen@....com, viresh.kumar@...aro.org,
valentin.schneider@....com, patrick.bellasi@....com,
joel@...lfernandes.org, daniel.lezcano@...aro.org,
quentin.perret@....com, Ingo Molnar <mingo@...hat.com>
Subject: Re: [PATCH v6 02/11] sched/pelt: remove blank line
On Fri, Jun 08, 2018 at 02:09:45PM +0200, Vincent Guittot wrote:
> diff --git a/kernel/sched/pelt.c b/kernel/sched/pelt.c
> index e6ecbb2..4174582 100644
> --- a/kernel/sched/pelt.c
> +++ b/kernel/sched/pelt.c
> @@ -287,7 +287,6 @@ int __update_load_avg_se(u64 now, int cpu, struct cfs_rq *cfs_rq, struct sched_e
>
> if (___update_load_sum(now, cpu, &se->avg, !!se->on_rq, !!se->on_rq,
> cfs_rq->curr == se)) {
> -
> ___update_load_avg(&se->avg, se_weight(se), se_runnable(se));
> cfs_se_util_change(&se->avg);
> return 1;
> @@ -302,7 +301,6 @@ int __update_load_avg_cfs_rq(u64 now, int cpu, struct cfs_rq *cfs_rq)
> scale_load_down(cfs_rq->load.weight),
> scale_load_down(cfs_rq->runnable_weight),
> cfs_rq->curr != NULL)) {
> -
> ___update_load_avg(&cfs_rq->avg, 1, 1);
> return 1;
> }
So I put them there on purpose, I find it easier to read when a
multi-line if statement and the body are separated. Makes it clearer
where the if ends and the block begins.
I mean, all whitespace in C is superfluous, and yet we keep adding it to
these files :-)
Powered by blists - more mailing lists