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-next>] [day] [month] [year] [list]
Message-Id: <20181030144530.89995-1-smuchun@gmail.com>
Date:   Tue, 30 Oct 2018 22:45:30 +0800
From:   Muchun Song <smuchun@...il.com>
To:     mingo@...nel.org, peterz@...radead.org
Cc:     linux-kernel@...r.kernel.org
Subject: [PATCH] sched/rt: Remove unnecessary CONFIG_RT_GROUP_SCHED in rt_se_prio()

When CONFIG_RT_GROUP_SCHED is not configured, group_rt_rq() will
return NULL. With this patch applied, we also can get the same result.
Because the compiler will help us optimize the code.

So, we can remove unnecessary CONFIG_RT_GROUP_SCHED in rt_se_prio().

Signed-off-by: Muchun Song <smuchun@...il.com>
---
 kernel/sched/rt.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c
index a21ea6021929..47b4800761db 100644
--- a/kernel/sched/rt.c
+++ b/kernel/sched/rt.c
@@ -894,12 +894,10 @@ static int do_sched_rt_period_timer(struct rt_bandwidth *rt_b, int overrun)
 
 static inline int rt_se_prio(struct sched_rt_entity *rt_se)
 {
-#ifdef CONFIG_RT_GROUP_SCHED
 	struct rt_rq *rt_rq = group_rt_rq(rt_se);
 
 	if (rt_rq)
 		return rt_rq->highest_prio.curr;
-#endif
 
 	return rt_task_of(rt_se)->prio;
 }
-- 
2.17.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ