All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ARM: imx: using unsigned variable for do_div
  2015-05-07 16:16 [PATCH] ARM: imx: using unsigned variable for do_div Anson Huang
@ 2015-05-07  8:58 ` Uwe Kleine-König
  2015-05-07 11:39 ` Shawn Guo
  1 sibling, 0 replies; 3+ messages in thread
From: Uwe Kleine-König @ 2015-05-07  8:58 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, May 08, 2015 at 12:16:51AM +0800, Anson Huang wrote:
> The definition of do_div uses unsigned long long
> variable as its first parameter, better to pass
> a u64 variable as first parameter when calling
> do_div function.
> 
> Signed-off-by: Anson Huang <b20788@freescale.com>
Acked-by: Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de>

Thanks
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-K?nig            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH] ARM: imx: using unsigned variable for do_div
  2015-05-07 16:16 [PATCH] ARM: imx: using unsigned variable for do_div Anson Huang
  2015-05-07  8:58 ` Uwe Kleine-König
@ 2015-05-07 11:39 ` Shawn Guo
  1 sibling, 0 replies; 3+ messages in thread
From: Shawn Guo @ 2015-05-07 11:39 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, May 08, 2015 at 12:16:51AM +0800, Anson Huang wrote:
> The definition of do_div uses unsigned long long
> variable as its first parameter, better to pass
> a u64 variable as first parameter when calling
> do_div function.
> 
> Signed-off-by: Anson Huang <b20788@freescale.com>

Applied, thanks. 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH] ARM: imx: using unsigned variable for do_div
@ 2015-05-07 16:16 Anson Huang
  2015-05-07  8:58 ` Uwe Kleine-König
  2015-05-07 11:39 ` Shawn Guo
  0 siblings, 2 replies; 3+ messages in thread
From: Anson Huang @ 2015-05-07 16:16 UTC (permalink / raw)
  To: linux-arm-kernel

The definition of do_div uses unsigned long long
variable as its first parameter, better to pass
a u64 variable as first parameter when calling
do_div function.

Signed-off-by: Anson Huang <b20788@freescale.com>
---
 drivers/clk/imx/clk-pllv3.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/clk/imx/clk-pllv3.c b/drivers/clk/imx/clk-pllv3.c
index e34a925..8a94fa6 100644
--- a/drivers/clk/imx/clk-pllv3.c
+++ b/drivers/clk/imx/clk-pllv3.c
@@ -220,7 +220,7 @@ static long clk_pllv3_av_round_rate(struct clk_hw *hw, unsigned long rate,
 	unsigned long max_rate = parent_rate * 54;
 	u32 div;
 	u32 mfn, mfd = 1000000;
-	s64 temp64;
+	u64 temp64;
 
 	if (rate > max_rate)
 		rate = max_rate;
@@ -244,7 +244,7 @@ static int clk_pllv3_av_set_rate(struct clk_hw *hw, unsigned long rate,
 	unsigned long max_rate = parent_rate * 54;
 	u32 val, div;
 	u32 mfn, mfd = 1000000;
-	s64 temp64;
+	u64 temp64;
 
 	if (rate < min_rate || rate > max_rate)
 		return -EINVAL;
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-05-07 16:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-07 16:16 [PATCH] ARM: imx: using unsigned variable for do_div Anson Huang
2015-05-07  8:58 ` Uwe Kleine-König
2015-05-07 11:39 ` Shawn Guo

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.