PM / devfreq: exynos-ppmu: bit-wise operation bugfix.
authorMyungJoo Ham <myungjoo.ham@samsung.com>
Wed, 5 Aug 2015 01:55:10 +0000 (10:55 +0900)
committerMyungJoo Ham <myungjoo.ham@samsung.com>
Fri, 11 Sep 2015 05:22:26 +0000 (14:22 +0900)
Make it u64 before left-shifting 32bits.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
drivers/devfreq/event/exynos-ppmu.c

index f9901f52a225ca40e8d87056c1021c134838efe3..f312485f145110ab31537f9df3225e8ac1021cf8 100644 (file)
@@ -319,7 +319,8 @@ static int exynos_ppmu_v2_get_event(struct devfreq_event_dev *edev,
        case PPMU_PMNCNT3:
                pmcnt_high = __raw_readl(info->ppmu.base + PPMU_V2_PMCNT3_HIGH);
                pmcnt_low = __raw_readl(info->ppmu.base + PPMU_V2_PMCNT3_LOW);
-               load_count = (u64)((pmcnt_high & 0xff) << 32) + (u64)pmcnt_low;
+               load_count = ((u64)((pmcnt_high & 0xff)) << 32)
+                          + (u64)pmcnt_low;
                break;
        }
        edata->load_count = load_count;