* [PATCH] PM / devfreq: exynos-ppmu: bit-wise operation bugfix.
@ 2015-08-05 2:15 MyungJoo Ham
2015-08-05 2:19 ` Chanwoo Choi
0 siblings, 1 reply; 2+ messages in thread
From: MyungJoo Ham @ 2015-08-05 2:15 UTC (permalink / raw)
To: linux-pm@vger.kernel.org; +Cc: 최찬우
Make it u64 before left-shifting 32bits.
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
---
drivers/devfreq/event/exynos-ppmu.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/devfreq/event/exynos-ppmu.c b/drivers/devfreq/event/exynos-ppmu.c
index f9901f5..f312485 100644
--- a/drivers/devfreq/event/exynos-ppmu.c
+++ b/drivers/devfreq/event/exynos-ppmu.c
@@ -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;
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] PM / devfreq: exynos-ppmu: bit-wise operation bugfix.
2015-08-05 2:15 [PATCH] PM / devfreq: exynos-ppmu: bit-wise operation bugfix MyungJoo Ham
@ 2015-08-05 2:19 ` Chanwoo Choi
0 siblings, 0 replies; 2+ messages in thread
From: Chanwoo Choi @ 2015-08-05 2:19 UTC (permalink / raw)
To: myungjoo.ham; +Cc: linux-pm@vger.kernel.org
On 08/05/2015 11:15 AM, MyungJoo Ham wrote:
>
> Make it u64 before left-shifting 32bits.
>
> Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
> ---
> drivers/devfreq/event/exynos-ppmu.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/devfreq/event/exynos-ppmu.c b/drivers/devfreq/event/exynos-ppmu.c
> index f9901f5..f312485 100644
> --- a/drivers/devfreq/event/exynos-ppmu.c
> +++ b/drivers/devfreq/event/exynos-ppmu.c
> @@ -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;
>
Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com>
Thanks,
Chanwoo Choi
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-08-05 2:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-05 2:15 [PATCH] PM / devfreq: exynos-ppmu: bit-wise operation bugfix MyungJoo Ham
2015-08-05 2:19 ` Chanwoo Choi
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.