Message ID | 20150817144856.GD23820@mwanda (mailing list archive) |
---|---|
State | Not Applicable, archived |
Headers | show |
diff --git a/drivers/devfreq/event/exynos-ppmu.c b/drivers/devfreq/event/exynos-ppmu.c index f9901f5..daf2cdb 100644 --- a/drivers/devfreq/event/exynos-ppmu.c +++ b/drivers/devfreq/event/exynos-ppmu.c @@ -319,7 +319,7 @@ 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) + pmcnt_low; break; } edata->load_count = load_count;
"pmcnt_high & 0xff" is a u32 so we shifting it 32 spaces is zero. GCC catches this bug: drivers/devfreq/event/exynos-ppmu.c: In function ‘exynos_ppmu_v2_get_event’: drivers/devfreq/event/exynos-ppmu.c:322:3: warning: left shift count >= width of type load_count = (u64)((pmcnt_high & 0xff) << 32) + (u64)pmcnt_low; Fixes: 3d87b02281a2 ('PM / devfreq: exynos-ppmu: Add the support of PPMUv2 for Exynos5433') Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> -- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html