[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170630161716.GA16132@redhat.com>
Date: Fri, 30 Jun 2017 18:17:17 +0200
From: Stanislaw Gruszka <sgruszka@...hat.com>
To: mingo@...nel.org, fransklaver@...il.com, hpa@...or.com,
fweisbec@...il.com, torvalds@...ux-foundation.org, riel@...hat.com,
tglx@...utronix.de, wanpeng.li@...mail.com,
linux-kernel@...r.kernel.org, garsilva@...eddedor.com,
peterz@...radead.org
Cc: linux-tip-commits@...r.kernel.org
Subject: Re: [tip:sched/core] sched/cputime: Refactor the cputime_adjust()
code
On Fri, Jun 30, 2017 at 06:10:35AM -0700, tip-bot for Gustavo A. R. Silva wrote:
> diff --git a/kernel/sched/cputime.c b/kernel/sched/cputime.c
> index aea3135..67c70e2 100644
> --- a/kernel/sched/cputime.c
> +++ b/kernel/sched/cputime.c
> @@ -615,19 +615,13 @@ static void cputime_adjust(struct task_cputime *curr,
> * userspace. Once a task gets some ticks, the monotonicy code at
> * 'update' will ensure things converge to the observed ratio.
^^^^^^
> */
> - if (stime == 0) {
> - utime = rtime;
> - goto update;
> + if (stime != 0) {
> + if (utime == 0)
> + stime = rtime;
> + else
> + stime = scale_stime(stime, rtime, stime + utime);
> }
>
> - if (utime == 0) {
> - stime = rtime;
> - goto update;
> - }
> -
> - stime = scale_stime(stime, rtime, stime + utime);
> -
> -update:
Since 'update' label is removed, I think above comment should be
corrected too. Eventually patch could just remove 'utime = rtime;'
line to shut up coverity.
Stanislaw
Powered by blists - more mailing lists