From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Linus Torvalds <torvalds@osdl.org>, Andrew Morton <akpm@osdl.org>,
James Simmons <jsimmons@infradead.org>
Cc: Linux Kernel Development <linux-kernel@vger.kernel.org>,
Linux Fbdev <linux-fbdev-devel@lists.sourceforge.net>,
Geert Uytterhoeven <geert@linux-m68k.org>
Subject: [PATCH 468] m68k sparse floating point
Date: Tue, 20 Jul 2004 20:38:04 +0200 [thread overview]
Message-ID: <200407201838.i6KIc4er015409@anakin.of.borg> (raw)
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>
--- linux-2.6.8-rc2/drivers/video/amifb.c 2004-04-28 15:49:02.000000000 +0200
+++ linux-m68k-2.6.8-rc2/drivers/video/amifb.c 2004-07-10 21:07:38.000000000 +0200
@@ -2351,7 +2351,7 @@
*/
{
- 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 */
--- linux-2.6.8-rc2/drivers/video/aty/mach64_gx.c 2004-04-27 20:30:51.000000000 +0200
+++ linux-m68k-2.6.8-rc2/drivers/video/aty/mach64_gx.c 2004-07-10 21:06:54.000000000 +0200
@@ -653,7 +653,7 @@
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 */
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click
reply other threads:[~2004-07-20 18:38 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200407201838.i6KIc4er015409@anakin.of.borg \
--to=geert@linux-m68k.org \
--cc=akpm@osdl.org \
--cc=jsimmons@infradead.org \
--cc=linux-fbdev-devel@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@osdl.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).