login
Header Space

 
 

[2.6.25 patch] drivers/crypto/hifn_795x.c: fix 64bit division

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Martin Michlmayr <tbm@...>
Cc: <linux-kernel@...>, Evgeniy Polyakov <johnpol@...>, Herbert Xu <herbert@...>, Ralf Baechle <ralf@...>, <linux-crypto@...>
Date: Tuesday, February 26, 2008 - 11:34 am

On Tue, Feb 26, 2008 at 01:21:00PM +0100, Martin Michlmayr wrote:

Fix below.


cu
Adrian


<--  snip  -->


Using ndelay() with a 64bit variable as parameter can result in build 
errors like the following on some 32bit systems when it results in a 
64bit division:

<--  snip  -->

 ...
  MODPOST 759 modules
ERROR: "__divdi3" [drivers/crypto/hifn_795x.ko] undefined!

<--  snip  -->

Reported by Martin Michlmayr.

Signed-off-by: Adrian Bunk <bunk@kernel.org>

---

40b45041ddc587c20b872a86a6a36952c28b02c7 diff --git a/drivers/crypto/hifn_795x.c b/drivers/crypto/hifn_795x.c
index 3110bf7..b1541c6 100644
--- a/drivers/crypto/hifn_795x.c
+++ b/drivers/crypto/hifn_795x.c
@@ -807,7 +807,7 @@ static int hifn_rng_data_present(struct hwrng *rng, int wait)
 		return 1;
 	if (!wait)
 		return 0;
-	ndelay(nsec);
+	ndelay((u32)nsec);
 	return 1;
 }
 

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[2.6.25 patch] drivers/crypto/hifn_795x.c: fix 64bit division, Adrian Bunk, (Tue Feb 26, 11:34 am)
Re: [2.6.25 patch] drivers/crypto/hifn_795x.c: fix 64bit div..., Evgeniy Polyakov, (Wed Feb 27, 11:59 am)
speck-geostationary