* [PATCH] thermal: armada: Fix possible overflow in the Armada 380 thermal sensor formula
@ 2015-08-06 16:03 Gregory CLEMENT
2015-09-09 16:44 ` Gregory CLEMENT
0 siblings, 1 reply; 2+ messages in thread
From: Gregory CLEMENT @ 2015-08-06 16:03 UTC (permalink / raw)
To: Zhang Rui, Eduardo Valentin, linux-pm
Cc: Thomas Petazzoni, Ezequiel Garcia, Maxime Ripard,
Boris BREZILLON, Lior Amsalem, Tawfik Bayouk, Nadav Haklai,
Gregory CLEMENT
From: Nadav Haklai <nadavh@marvell.com>
Update the coefficients so the calculation will not overrun the
unsigned long 32bits boundary
Signed-off-by: Nadav Haklai <nadavh@marvell.com>
Reviewed-by: Victor Axelrod <victora@marvell.com>
Reviewed-by: Neta Zur Hershkovits <neta@marvell.com>
Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
---
drivers/thermal/armada_thermal.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/thermal/armada_thermal.c b/drivers/thermal/armada_thermal.c
index 01255fd65135..363bf91c32a3 100644
--- a/drivers/thermal/armada_thermal.c
+++ b/drivers/thermal/armada_thermal.c
@@ -224,9 +224,9 @@ static const struct armada_thermal_data armada380_data = {
.is_valid_shift = 10,
.temp_shift = 0,
.temp_mask = 0x3ff,
- .coef_b = 2931108200UL,
- .coef_m = 5000000UL,
- .coef_div = 10502,
+ .coef_b = 1172499100UL,
+ .coef_m = 2000096UL,
+ .coef_div = 4201,
.inverted = true,
};
--
2.1.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] thermal: armada: Fix possible overflow in the Armada 380 thermal sensor formula
2015-08-06 16:03 [PATCH] thermal: armada: Fix possible overflow in the Armada 380 thermal sensor formula Gregory CLEMENT
@ 2015-09-09 16:44 ` Gregory CLEMENT
0 siblings, 0 replies; 2+ messages in thread
From: Gregory CLEMENT @ 2015-09-09 16:44 UTC (permalink / raw)
To: Zhang Rui
Cc: Eduardo Valentin, linux-pm, Thomas Petazzoni, Ezequiel Garcia,
Maxime Ripard, Boris BREZILLON, Lior Amsalem, Tawfik Bayouk,
Nadav Haklai
Hi Zhang,
On jeu., août 06 2015, Gregory CLEMENT <gregory.clement@free-electrons.com> wrote:
> From: Nadav Haklai <nadavh@marvell.com>
>
> Update the coefficients so the calculation will not overrun the
> unsigned long 32bits boundary
What is the status of this patch?
I still do not see it in your git tree. If you need any modification to
take it, don't hesitate to tell me.
Thanks,
Gregory
>
> Signed-off-by: Nadav Haklai <nadavh@marvell.com>
> Reviewed-by: Victor Axelrod <victora@marvell.com>
> Reviewed-by: Neta Zur Hershkovits <neta@marvell.com>
> Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
> ---
> drivers/thermal/armada_thermal.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/thermal/armada_thermal.c b/drivers/thermal/armada_thermal.c
> index 01255fd65135..363bf91c32a3 100644
> --- a/drivers/thermal/armada_thermal.c
> +++ b/drivers/thermal/armada_thermal.c
> @@ -224,9 +224,9 @@ static const struct armada_thermal_data armada380_data = {
> .is_valid_shift = 10,
> .temp_shift = 0,
> .temp_mask = 0x3ff,
> - .coef_b = 2931108200UL,
> - .coef_m = 5000000UL,
> - .coef_div = 10502,
> + .coef_b = 1172499100UL,
> + .coef_m = 2000096UL,
> + .coef_div = 4201,
> .inverted = true,
> };
--
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-09-09 16:44 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-06 16:03 [PATCH] thermal: armada: Fix possible overflow in the Armada 380 thermal sensor formula Gregory CLEMENT
2015-09-09 16:44 ` Gregory CLEMENT
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.