Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/isa Cast the sum of iobase and iosize to long, not j...



details:   https://anonhg.NetBSD.org/src/rev/fad7fa87097f
branches:  trunk
changeset: 755145:fad7fa87097f
user:      jym <jym%NetBSD.org@localhost>
date:      Sun May 23 23:50:37 2010 +0000

description:
Cast the sum of iobase and iosize to long, not just iobase. Avoids size
warnings during build when bus_addr_t is 64 bits.

diffstat:

 sys/dev/isa/i82365_isasubr.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (36 lines):

diff -r c3ecfaa39fd6 -r fad7fa87097f sys/dev/isa/i82365_isasubr.c
--- a/sys/dev/isa/i82365_isasubr.c      Sun May 23 23:21:30 2010 +0000
+++ b/sys/dev/isa/i82365_isasubr.c      Sun May 23 23:50:37 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: i82365_isasubr.c,v 1.46 2010/03/22 22:25:26 dyoung Exp $       */
+/*     $NetBSD: i82365_isasubr.c,v 1.47 2010/05/23 23:50:37 jym Exp $  */
 
 /*
  * Copyright (c) 2000 Christian E. Hopps.  All rights reserved.
@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: i82365_isasubr.c,v 1.46 2010/03/22 22:25:26 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: i82365_isasubr.c,v 1.47 2010/05/23 23:50:37 jym Exp $");
 
 #define        PCICISADEBUG
 
@@ -430,7 +430,7 @@
 
        DPRINTF(("%s: bus_space_alloc range 0x%04lx-0x%04lx (probed)\n",
            device_xname(&sc->dev), (long) sc->iobase,
-           (long) sc->iobase + sc->iosize));
+           (long)(sc->iobase + sc->iosize)));
 
        if (pcic_isa_alloc_iobase && pcic_isa_alloc_iosize) {
                sc->iobase = pcic_isa_alloc_iobase;
@@ -438,7 +438,7 @@
 
                DPRINTF(("%s: bus_space_alloc range 0x%04lx-0x%04lx "
                    "(config override)\n", device_xname(&sc->dev),
-                   (long) sc->iobase, (long) sc->iobase + sc->iosize));
+                   (long) sc->iobase, (long)(sc->iobase + sc->iosize)));
        }
 }
 



Home | Main Index | Thread Index | Old Index