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 for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1629800356-45550-1-git-send-email-lirongqing@baidu.com>
Date:   Tue, 24 Aug 2021 18:19:16 +0800
From:   Li RongQing <lirongqing@...du.com>
To:     mingo@...hat.com, peterz@...radead.org, juri.lelli@...hat.com,
        vincent.guittot@...aro.org, linux-kernel@...r.kernel.org,
        lirongqing@...du.com
Subject: [PATCH] sched/core: return prio_less() directly in __sched_core_less

return prio_less() directly to avoid unnecessary checking

Signed-off-by: Li RongQing <lirongqing@...du.com>
---
 kernel/sched/core.c |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)

diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 2d9ff40..73478c9 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -140,10 +140,7 @@ static inline bool __sched_core_less(struct task_struct *a, struct task_struct *
 		return false;
 
 	/* flip prio, so high prio is leftmost */
-	if (prio_less(b, a, task_rq(a)->core->core_forceidle))
-		return true;
-
-	return false;
+	return prio_less(b, a, task_rq(a)->core->core_forceidle);
 }
 
 #define __node_2_sc(node) rb_entry((node), struct task_struct, core_node)
-- 
1.7.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ