public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] clocksource: exynos4: Fix wrong bit operation in exynos4_mct_write()
@ 2014-02-04 10:48 Jonghwa Lee
       [not found] ` <CAH9JG2Ut4J=fQJ26RBafpB1WNe2Sd4Wv04L7xHns1=UxrhYoOQ@mail.gmail.com>
  0 siblings, 1 reply; 2+ messages in thread
From: Jonghwa Lee @ 2014-02-04 10:48 UTC (permalink / raw)
  To: linux-kernel
  Cc: thomas.abraham, daniel.lezcano, tglx, Jonghwa Lee, MyungJoo Ham

There was a faulty bit operation during checking offset in exynos4_mct_write().
This patch fixes it correctly.

Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
---
 drivers/clocksource/exynos_mct.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/clocksource/exynos_mct.c b/drivers/clocksource/exynos_mct.c
index 62b0de6..e60b019 100644
--- a/drivers/clocksource/exynos_mct.c
+++ b/drivers/clocksource/exynos_mct.c
@@ -94,8 +94,8 @@ static void exynos4_mct_write(unsigned int value, unsigned long offset)
 	__raw_writel(value, reg_base + offset);
 
 	if (likely(offset >= EXYNOS4_MCT_L_BASE(0))) {
-		stat_addr = (offset & ~EXYNOS4_MCT_L_MASK) + MCT_L_WSTAT_OFFSET;
-		switch (offset & EXYNOS4_MCT_L_MASK) {
+		stat_addr = (offset & EXYNOS4_MCT_L_MASK) + MCT_L_WSTAT_OFFSET;
+		switch (offset & ~EXYNOS4_MCT_L_MASK) {
 		case MCT_L_TCON_OFFSET:
 			mask = 1 << 3;		/* L_TCON write status */
 			break;
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-02-05  0:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-04 10:48 [PATCH] clocksource: exynos4: Fix wrong bit operation in exynos4_mct_write() Jonghwa Lee
     [not found] ` <CAH9JG2Ut4J=fQJ26RBafpB1WNe2Sd4Wv04L7xHns1=UxrhYoOQ@mail.gmail.com>
2014-02-05  0:59   ` jonghwa3.lee

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox