]> git.neil.brown.name Git - history.git/commitdiff
[PATCH] m68k sparse floating point
authorGeert Uytterhoeven <geert@linux-m68k.org>
Wed, 28 Jul 2004 16:05:26 +0000 (09:05 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Wed, 28 Jul 2004 16:05:26 +0000 (09:05 -0700)
M68k: Replace floating point by integer constants (found by sparse)
Affected drivers:
  - Amiga frame buffer
  - ATI Mach64 frame buffer

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/video/amifb.c
drivers/video/aty/mach64_gx.c

index f61cd6e436ba3db0a205183c4ce1e8a84ea570bc..cc8b43206b93a031cdb18a52f1f86d14729f604e 100644 (file)
@@ -2351,7 +2351,7 @@ default_chipset:
         */
 
        {
-       u_long tmp = DIVUL(200E9, amiga_eclock);
+       u_long tmp = DIVUL(200000000000ULL, amiga_eclock);
 
        pixclock[TAG_SHRES] = (tmp + 4) / 8;    /* SHRES:  35 ns / 28 MHz */
        pixclock[TAG_HIRES] = (tmp + 2) / 4;    /* HIRES:  70 ns / 14 MHz */
index f85f0a052784a471a7973407186dbd682e0900d6..28540cf1e9aa03bc2c0459a8f589f4cdba701bed 100644 (file)
@@ -653,7 +653,7 @@ static int aty_var_to_pll_8398(const struct fb_info *info,
 
                for (m = MIN_M; m <= MAX_M; m++) {
                        for (n = MIN_N; n <= MAX_N; n++) {
-                               tempA = (14.31818 * 65536);
+                               tempA = 938356;         /* 14.31818 * 65536 */
                                tempA *= (n + 8);       /* 43..256 */
                                tempB = twoToKth * 256;
                                tempB *= (m + 2);       /* 4..32 */