Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/sbus Clean up warnings in 32bit compile (bus_space_h...



details:   https://anonhg.NetBSD.org/src/rev/ab71ded541bd
branches:  trunk
changeset: 500072:ab71ded541bd
user:      fvdl <fvdl%NetBSD.org@localhost>
date:      Mon Dec 04 20:17:10 2000 +0000

description:
Clean up warnings in 32bit compile (bus_space_handle_t is 64bit wide
but will only contain 32bit values; casting via u_long is safe)

diffstat:

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

diffs (63 lines):

diff -r f089efc67325 -r ab71ded541bd sys/dev/sbus/cgsix_sbus.c
--- a/sys/dev/sbus/cgsix_sbus.c Mon Dec 04 20:14:05 2000 +0000
+++ b/sys/dev/sbus/cgsix_sbus.c Mon Dec 04 20:17:10 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cgsix_sbus.c,v 1.2 2000/09/12 19:13:30 pk Exp $ */
+/*     $NetBSD: cgsix_sbus.c,v 1.3 2000/12/04 20:17:10 fvdl Exp $ */
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -140,7 +140,7 @@
                printf("%s: cannot map brooktree registers\n", self->dv_xname);
                return;
        }
-       sc->sc_bt = (struct bt_regs *)bh;
+       sc->sc_bt = (struct bt_regs *)(u_long)bh;
 
        if (sbus_bus_map(sa->sa_bustag, sa->sa_slot,
                         sa->sa_offset + CGSIX_FHC_OFFSET,
@@ -150,7 +150,7 @@
                printf("%s: cannot map FHC registers\n", self->dv_xname);
                return;
        }
-       sc->sc_fhc = (int *)bh;
+       sc->sc_fhc = (int *)(u_long)bh;
 
        if (sbus_bus_map(sa->sa_bustag, sa->sa_slot,
                         sa->sa_offset + CGSIX_THC_OFFSET,
@@ -160,7 +160,7 @@
                printf("%s: cannot map THC registers\n", self->dv_xname);
                return;
        }
-       sc->sc_thc = (struct cg6_thc *)bh;
+       sc->sc_thc = (struct cg6_thc *)(u_long)bh;
 
        if (sbus_bus_map(sa->sa_bustag, sa->sa_slot,
                         sa->sa_offset + CGSIX_TEC_OFFSET,
@@ -170,7 +170,7 @@
                printf("%s: cannot map TEC registers\n", self->dv_xname);
                return;
        }
-       sc->sc_tec = (struct cg6_tec_xxx *)bh;
+       sc->sc_tec = (struct cg6_tec_xxx *)(u_long)bh;
 
        if (sbus_bus_map(sa->sa_bustag, sa->sa_slot,
                         sa->sa_offset + CGSIX_FBC_OFFSET,
@@ -180,7 +180,7 @@
                printf("%s: cannot map FBC registers\n", self->dv_xname);
                return;
        }
-       sc->sc_fbc = (struct cg6_fbc *)bh;
+       sc->sc_fbc = (struct cg6_fbc *)(u_long)bh;
 
        sbus_establish(sd, &sc->sc_dev);
        name = getpropstring(node, "model");
@@ -196,7 +196,7 @@
                        printf("%s: cannot map pixels\n", self->dv_xname);
                        return;
                }
-               sc->sc_fb.fb_pixels = (caddr_t)bh;
+               sc->sc_fb.fb_pixels = (caddr_t)(u_long)bh;
        }
 
        cg6attach(sc, name, isconsole);



Home | Main Index | Thread Index | Old Index