LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: tip-bot for Viresh Kumar <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: preeti@linux.vnet.ibm.com, khilman@linaro.org,
	a.p.zijlstra@chello.nl, peterz@infradead.org, hpa@zytor.com,
	tglx@linutronix.de, linux-kernel@vger.kernel.org,
	mingo@kernel.org, viresh.kumar@linaro.org,
	daniel.lezcano@linaro.org, fweisbec@gmail.com
Subject: [tip:timers/core] clockevents: Don't validate dev-> mode against CLOCK_EVT_MODE_UNUSED for new interface
Date: Fri, 27 Mar 2015 04:49:02 -0700	[thread overview]
Message-ID: <tip-de81e64b250d3865a75d221a80b4311e3273670a@git.kernel.org> (raw)
In-Reply-To: <c6604fa1a77fe1fc8dcab87769857228fb1dadd5.1425037853.git.viresh.kumar@linaro.org>

Commit-ID:  de81e64b250d3865a75d221a80b4311e3273670a
Gitweb:     http://git.kernel.org/tip/de81e64b250d3865a75d221a80b4311e3273670a
Author:     Viresh Kumar <viresh.kumar@linaro.org>
AuthorDate: Fri, 27 Feb 2015 17:21:34 +0530
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Fri, 27 Mar 2015 10:26:20 +0100

clockevents: Don't validate dev->mode against CLOCK_EVT_MODE_UNUSED for new interface

It was a requirement in the legacy interface that drivers must
initialize ->mode field to 'CLOCK_EVT_MODE_UNUSED'. This field
isn't used anymore by the new interface and so should be only
checked for the legacy interface.

Probably it can be dropped as well as core doesn't rely on it
anymore, but lets keep it to support legacy interface.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Kevin Hilman <khilman@linaro.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Preeti U Murthy <preeti@linux.vnet.ibm.com>
Cc: linaro-kernel@lists.linaro.org
Cc: linaro-networking@linaro.org
Cc: linux-arm-kernel@lists.infradead.org
Link: http://lkml.kernel.org/r/c6604fa1a77fe1fc8dcab87769857228fb1dadd5.1425037853.git.viresh.kumar@linaro.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 kernel/time/clockevents.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/kernel/time/clockevents.c b/kernel/time/clockevents.c
index 6e53e9a..73689df 100644
--- a/kernel/time/clockevents.c
+++ b/kernel/time/clockevents.c
@@ -450,6 +450,8 @@ static int clockevents_sanity_check(struct clock_event_device *dev)
 		/* We shouldn't be supporting new modes now */
 		WARN_ON(dev->set_state_periodic || dev->set_state_oneshot ||
 			dev->set_state_shutdown || dev->tick_resume);
+
+		BUG_ON(dev->mode != CLOCK_EVT_MODE_UNUSED);
 		return 0;
 	}
 
@@ -479,7 +481,6 @@ void clockevents_register_device(struct clock_event_device *dev)
 {
 	unsigned long flags;
 
-	BUG_ON(dev->mode != CLOCK_EVT_MODE_UNUSED);
 	BUG_ON(clockevents_sanity_check(dev));
 
 	/* Initialize state to DETACHED */

  reply	other threads:[~2015-03-27 11:49 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-27 11:51 [PATCH 0/3] clockevents: Manage device's state separately for core Viresh Kumar
2015-02-27 11:51 ` [PATCH 1/3] clockevents: Handle tick device's resume separately Viresh Kumar
2015-03-27 11:48   ` [tip:timers/core] clockevents: Handle tick device' s " tip-bot for Viresh Kumar
2015-02-27 11:51 ` [PATCH 2/3] clockevents: Manage device's state separately for the core Viresh Kumar
2015-03-27 11:48   ` [tip:timers/core] clockevents: Manage device' s " tip-bot for Viresh Kumar
2015-02-27 11:51 ` [PATCH 3/3] clockevents: Don't validate dev->mode against CLOCK_EVT_MODE_UNUSED for new interface Viresh Kumar
2015-03-27 11:49   ` tip-bot for Viresh Kumar [this message]
2015-03-10 10:34 ` [PATCH 0/3] clockevents: Manage device's state separately for core Viresh Kumar
2015-03-10 13:05   ` Ingo Molnar
2015-03-10 17:12     ` Peter Zijlstra
2015-03-16  9:14     ` Viresh Kumar
2015-03-26 11:59       ` 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-de81e64b250d3865a75d221a80b4311e3273670a@git.kernel.org \
    --to=tipbot@zytor.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=daniel.lezcano@linaro.org \
    --cc=fweisbec@gmail.com \
    --cc=hpa@zytor.com \
    --cc=khilman@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=preeti@linux.vnet.ibm.com \
    --cc=tglx@linutronix.de \
    --cc=viresh.kumar@linaro.org \
    --subject='Re: [tip:timers/core] clockevents: Don'\''t validate dev-> mode against CLOCK_EVT_MODE_UNUSED for new interface' \
    /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

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).