linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] fbdev: radeon: Avoid 64 bit divide
@ 2015-06-05 18:05 Guenter Roeck
  2015-06-05 20:08 ` Benjamin Herrenschmidt
  0 siblings, 1 reply; 4+ messages in thread
From: Guenter Roeck @ 2015-06-05 18:05 UTC (permalink / raw)
  To: Benjamin Herrenschmidt
  Cc: Jean-Christophe Plagniol-Villard, Tomi Valkeinen, linux-fbdev,
	linux-kernel, Guenter Roeck, Tina Ruchandani

A 64 bit divide causes build failures with 32 bit builds, such as

ERROR: "__divdi3" [drivers/video/fbdev/aty/radeonfb.ko] undefined!

or

drivers/built-in.o: In function `radeon_probe_pll_params':
radeon_base.c:(.text+0x16608b): undefined reference to `__divdi3'

Fixes: ce8f4069dce8 ("fbdev: radeon: Remove 'struct timeval' usage")
Cc: Tina Ruchandani <ruchandani.tina@gmail.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
---
 drivers/video/fbdev/aty/radeon_base.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/video/fbdev/aty/radeon_base.c b/drivers/video/fbdev/aty/radeon_base.c
index b3612e30d74f..374e47532035 100644
--- a/drivers/video/fbdev/aty/radeon_base.c
+++ b/drivers/video/fbdev/aty/radeon_base.c
@@ -492,7 +492,7 @@ static int radeon_probe_pll_params(struct radeonfb_info *rinfo)
 	/* Return -1 if more than 10 seconds have elapsed */
 	if (delta > (10*1000000))
 		return -1;
-	hz = 1000000/delta;
+	hz = 1000000 / (int)delta;
 
 	hTotal = ((INREG(CRTC_H_TOTAL_DISP) & 0x1ff) + 1) * 8;
 	vTotal = ((INREG(CRTC_V_TOTAL_DISP) & 0x3ff) + 1);
-- 
2.1.0


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

end of thread, other threads:[~2015-06-08 21:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-05 18:05 [PATCH -next] fbdev: radeon: Avoid 64 bit divide Guenter Roeck
2015-06-05 20:08 ` Benjamin Herrenschmidt
2015-06-05 20:23   ` Guenter Roeck
2015-06-08 21:21     ` Benjamin Herrenschmidt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).