mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: tip-bot for Viresh Kumar <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@kernel.org,
	viresh.kumar@linaro.org, tglx@linutronix.de
Subject: [tip:timers/urgent] tick-common: Fix wrong check in tick_check_replacement()
Date: Tue, 15 Apr 2014 11:45:32 -0700	[thread overview]
Message-ID: <tip-521c42990e9d561ed5ed9f501f07639d0512b3c9@git.kernel.org> (raw)
In-Reply-To: <486a02efe0246635aaba786e24b42d316438bf3b.1397537987.git.viresh.kumar@linaro.org>

Commit-ID:  521c42990e9d561ed5ed9f501f07639d0512b3c9
Gitweb:     http://git.kernel.org/tip/521c42990e9d561ed5ed9f501f07639d0512b3c9
Author:     Viresh Kumar <viresh.kumar@linaro.org>
AuthorDate: Tue, 15 Apr 2014 10:54:37 +0530
Committer:  Thomas Gleixner <tglx@linutronix.de>
CommitDate: Tue, 15 Apr 2014 20:26:44 +0200

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;

Thats wrong. tick_check_percpu() returns true when the device is
useable. Check for false instead.

[ tglx: Massaged changelog ]

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Cc: <stable@vger.kernel.org> # v3.11+
Cc: linaro-kernel@lists.linaro.org
Cc: fweisbec@gmail.com
Cc: Arvind.Chauhan@arm.com
Cc: linaro-networking@linaro.org
Link: http://lkml.kernel.org/r/486a02efe0246635aaba786e24b42d316438bf3b.1397537987.git.viresh.kumar@linaro.org
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
 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 0156612..0a0608e 100644
--- a/kernel/time/tick-common.c
+++ b/kernel/time/tick-common.c
@@ -276,7 +276,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);

  parent reply	other threads:[~2014-04-15 18:45 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-15  5:24 [PATCH V1 Resend 0/5] tick: bugfixes Viresh Kumar
2014-04-15  5:24 ` [PATCH V1 Resend 2/5] tick-common: don't check tick_oneshot_mode_active() from tick_check_preferred() Viresh Kumar
2014-04-15 18:30   ` Thomas Gleixner
2014-04-16  4:07     ` Viresh Kumar
2014-04-15  5:24 ` [PATCH V1 Resend 3/5] tick-common: do additional checks in tick_check_preferred() Viresh Kumar
     [not found] ` <486a02efe0246635aaba786e24b42d316438bf3b.1397537987.git.viresh.kumar@linaro.org>
2014-04-15 18:42   ` [PATCH V1 Resend 1/5] tick-common: fix wrong check in tick_check_replacement() Thomas Gleixner
2014-04-16  4:11     ` Viresh Kumar
2014-04-15 18:45   ` tip-bot for Viresh Kumar [this message]
     [not found] ` <80afb18a494b0bd9710975bcc4de134ae323c74f.1397537987.git.viresh.kumar@linaro.org>
2014-04-15 18:44   ` [PATCH V1 Resend 4/5] tick-sched: don't call update_wall_time() when delta is lesser than tick_period Thomas Gleixner
2014-04-16  4:20     ` Viresh Kumar
2014-04-15 18:45   ` [tip:timers/urgent] tick-sched: Don't " tip-bot for Viresh Kumar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=tip-521c42990e9d561ed5ed9f501f07639d0512b3c9@git.kernel.org \
    --to=tipbot@zytor.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=tglx@linutronix.de \
    --cc=viresh.kumar@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®