Skip to content

Commit

Permalink
PM / devfreq: exynos-ppmu: bit-wise operation bugfix.
Browse files Browse the repository at this point in the history
Make it u64 before left-shifting 32bits.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
  • Loading branch information
MyungJoo Ham committed Sep 11, 2015
1 parent d80f022 commit 86fa4cd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/devfreq/event/exynos-ppmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 86fa4cd

Please sign in to comment.