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 bus_addr_t to void * via uintptr_t to avoid



details:   https://anonhg.NetBSD.org/src/rev/46a5160b20e5
branches:  trunk
changeset: 756807:46a5160b20e5
user:      jakllsch <jakllsch%NetBSD.org@localhost>
date:      Tue Aug 03 14:06:10 2010 +0000

description:
Cast bus_addr_t to void * via uintptr_t to avoid
'cast to pointer from integer of different size' warnings.
Unbreaks i386 ALL kernel.

Oh, I'm sure I mentioned this before:
THIS DRIVER SHOULD NOT BE DOING THIS!

diffstat:

 sys/dev/isa/if_ntwoc_isa.c |  14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diffs (45 lines):

diff -r e2916d3c16e3 -r 46a5160b20e5 sys/dev/isa/if_ntwoc_isa.c
--- a/sys/dev/isa/if_ntwoc_isa.c        Tue Aug 03 10:24:39 2010 +0000
+++ b/sys/dev/isa/if_ntwoc_isa.c        Tue Aug 03 14:06:10 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_ntwoc_isa.c,v 1.22 2009/11/27 20:56:28 dsl Exp $    */
+/*     $NetBSD: if_ntwoc_isa.c,v 1.23 2010/08/03 14:06:10 jakllsch Exp $       */
 /*
  * Copyright (c) 1999 Christian E. Hopps
  * Copyright (c) 1996 John Hay.
@@ -29,11 +29,11 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $Id: if_ntwoc_isa.c,v 1.22 2009/11/27 20:56:28 dsl Exp $
+ * $Id: if_ntwoc_isa.c,v 1.23 2010/08/03 14:06:10 jakllsch Exp $
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_ntwoc_isa.c,v 1.22 2009/11/27 20:56:28 dsl Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ntwoc_isa.c,v 1.23 2010/08/03 14:06:10 jakllsch Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -785,17 +785,17 @@
        for (i = 0; i < sc->sc_numports; i++) {
                scp = &sc->sc_ports[i];
                scp->sp_txdesc_p = (bus_addr_t)(j * sc->scu_pagesize);
-               scp->sp_txdesc = (void *)scp->sp_txdesc_p;
+               scp->sp_txdesc = (void *)(uintptr_t)scp->sp_txdesc_p;
                scp->sp_txbuf_p = scp->sp_txdesc_p;
                scp->sp_txbuf_p += SCA_BSIZE;
-               scp->sp_txbuf = (void *)scp->sp_txbuf_p;
+               scp->sp_txbuf = (void *)(uintptr_t)scp->sp_txbuf_p;
                j++;
 
                scp->sp_rxdesc_p = (bus_addr_t)(j * sc->scu_pagesize);
-               scp->sp_rxdesc = (void *)scp->sp_txdesc_p;
+               scp->sp_rxdesc = (void *)(uintptr_t)scp->sp_txdesc_p;
                scp->sp_rxbuf_p = scp->sp_rxdesc_p;
                scp->sp_rxbuf_p += SCA_BSIZE;
-               scp->sp_rxbuf = (void *)scp->sp_rxbuf_p;
+               scp->sp_rxbuf = (void *)(uintptr_t)scp->sp_rxbuf_p;
                j++;
        }
 }



Home | Main Index | Thread Index | Old Index