diff mbox

base/power/domain: fix wrong do_div() usage

Message ID alpine.LFD.2.20.1511041325170.630@knanqh.ubzr
State New
Headers show

Commit Message

Nicolas Pitre Nov. 4, 2015, 6:29 p.m. UTC
do_div() is meant to be used with an unsigned dividend.

Signed-off-by: Nicolas Pitre <nico@linaro.org>


--
To unsubscribe from this list: send the line "unsubscribe linux-pm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Ulf Hansson Nov. 5, 2015, 8:34 a.m. UTC | #1
On 4 November 2015 at 19:29, Nicolas Pitre <nicolas.pitre@linaro.org> wrote:
> do_div() is meant to be used with an unsigned dividend.

>

> Signed-off-by: Nicolas Pitre <nico@linaro.org>

>

> diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c

> index 16550c63d6..5722ad73ad 100644

> --- a/drivers/base/power/domain.c

> +++ b/drivers/base/power/domain.c

> @@ -142,7 +142,7 @@ static void genpd_sd_counter_inc(struct generic_pm_domain *genpd)

>

>  static void genpd_recalc_cpu_exit_latency(struct generic_pm_domain *genpd)

>  {

> -       s64 usecs64;

> +       u64 usecs64;

>

>         if (!genpd->cpuidle_data)

>                 return;


Hi Nico,

The entire funtion genpd_recalc_cpu_exit_latency() has been removed in
the below commit. Anyway, thanks for pointing out the issue.

commit cea3ad93d9a5e054d916f1ad71da02cb306e4828
Author: Daniel Lezcano <daniel.lezcano@linaro.org>
Date:   Tue Sep 1 20:37:49 2015 +0200
PM / Domains: Remove cpuidle attach

The patch should show up in 4.4 rc1, via Rafael's linux-pm tree.

Kind regards
Uffe
--
To unsubscribe from this list: send the line "unsubscribe linux-pm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c
index 16550c63d6..5722ad73ad 100644
--- a/drivers/base/power/domain.c
+++ b/drivers/base/power/domain.c
@@ -142,7 +142,7 @@  static void genpd_sd_counter_inc(struct generic_pm_domain *genpd)
 
 static void genpd_recalc_cpu_exit_latency(struct generic_pm_domain *genpd)
 {
-	s64 usecs64;
+	u64 usecs64;
 
 	if (!genpd->cpuidle_data)
 		return;