linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] kernel/sched.c unlikely(x) || unlikely(y) => unlikely(x || y)
@ 2008-02-16 17:09 Roel Kluin
  0 siblings, 0 replies; only message in thread
From: Roel Kluin @ 2008-02-16 17:09 UTC (permalink / raw)
  To: Ingo Molnar, rml; +Cc: lkml

Not yet tested.
---
Replace unlikely(x) || unlikely(y) by unlikely(x || y)

Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
---
diff --git a/kernel/sched.c b/kernel/sched.c
index f28f19e..816c299 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -137,7 +137,7 @@ static inline void sg_inc_cpu_power(struct sched_group *sg, u32 val)
 
 static inline int rt_policy(int policy)
 {
-	if (unlikely(policy == SCHED_FIFO) || unlikely(policy == SCHED_RR))
+	if (unlikely(policy == SCHED_FIFO || policy == SCHED_RR))
 		return 1;
 	return 0;
 }
@@ -3832,7 +3832,7 @@ static inline void schedule_debug(struct task_struct *prev)
 	 * schedule() atomically, we ignore that path for now.
 	 * Otherwise, whine if we are scheduling when we should not be.
 	 */
-	if (unlikely(in_atomic_preempt_off()) && unlikely(!prev->exit_state))
+	if (unlikely(in_atomic_preempt_off() && !prev->exit_state))
 		__schedule_bug(prev);
 
 	profile_hit(SCHED_PROFILING, __builtin_return_address(0));

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2008-02-16 17:10 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-16 17:09 [PATCH] kernel/sched.c unlikely(x) || unlikely(y) => unlikely(x || y) Roel Kluin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).