kernel/sched.c unlikely(x) || unlikely(y) => unlikely(x || y)
PATCH 1/1 kernel/sched.c unlikely(x) || unlikely(y) => unlikely(x || y)
Not yet tested.
---
Replace unlikely(x) || unlikely(y) by unlikely(x || y)
Signed-off-by Roel Kluin <[email protected]>
---
kernel/sched.c +2 -2
@@ -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 ));