[lkml]   [2014]   [Apr]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[PATCH 11/38] tick-common: fix wrong check in tick_check_replacement()
tick_check_replacement() returns if a replacement of clock_event_device is
possible or not. It does this as the first check:

if (tick_check_percpu(curdev, newdev, smp_processor_id()))
return false;

This looks wrong as we are returning false when tick_check_percpu() cpu returned
true. Probably Thomas forgot '!' here in his commit: 03e13cf5e ?

Fix it by placing a '!' before tick_check_percpu().

Signed-off-by: Viresh Kumar <>
kernel/time/tick-common.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/time/tick-common.c b/kernel/time/tick-common.c
index 395cbbd..8650026 100644
--- a/kernel/time/tick-common.c
+++ b/kernel/time/tick-common.c
@@ -257,7 +257,7 @@ static bool tick_check_preferred(struct clock_event_device *curdev,
bool tick_check_replacement(struct clock_event_device *curdev,
struct clock_event_device *newdev)
- if (tick_check_percpu(curdev, newdev, smp_processor_id()))
+ if (!tick_check_percpu(curdev, newdev, smp_processor_id()))
return false;

return tick_check_preferred(curdev, newdev);

 \ /
  Last update: 2014-04-18 19:41    [W:0.187 / U:9.144 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site