lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <a6db7f89-bc62-9627-0bd1-1c66b72fc7dd@quicinc.com>
Date:   Mon, 29 May 2023 11:59:59 +0530
From:   Mukesh Ojha <quic_mojha@...cinc.com>
To:     Li kunyu <kunyu@...china.com>, <mingo@...hat.com>,
        <peterz@...radead.org>, <juri.lelli@...hat.com>,
        <vincent.guittot@...aro.org>, <dietmar.eggemann@....com>,
        <rostedt@...dmis.org>, <bsegall@...gle.com>, <mgorman@...e.de>,
        <bristot@...hat.com>, <vschneid@...hat.com>
CC:     <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] sched: deadline: Simplify
 pick_earliest_pushable_dl_task()



On 5/30/2023 11:41 PM, Li kunyu wrote:
> Using the while statement instead of the if and goto statements is more
> concise and efficient.
> 
> Signed-off-by: Li kunyu <kunyu@...china.com>

LGTM, Thanks.
Reviewed-by: Mukesh Ojha <quic_mojha@...cinc.com>

-- Mukesh

> ---
>   kernel/sched/deadline.c | 4 +---
>   1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c
> index d823e608c7f0..b94a498f8cd9 100644
> --- a/kernel/sched/deadline.c
> +++ b/kernel/sched/deadline.c
> @@ -2112,15 +2112,13 @@ static struct task_struct *pick_earliest_pushable_dl_task(struct rq *rq, int cpu
>   
>   	next_node = rb_first_cached(&rq->dl.pushable_dl_tasks_root);
>   
> -next_node:
> -	if (next_node) {
> +	while (next_node) {
>   		p = __node_2_pdl(next_node);
>   
>   		if (pick_dl_task(rq, p, cpu))
>   			return p;
>   
>   		next_node = rb_next(next_node);
> -		goto next_node;
>   	}
>   
>   	return NULL;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ