diff options
| author | christos <christos@NetBSD.org> | 2007-03-04 05:59:00 +0000 |
|---|---|---|
| committer | christos <christos@NetBSD.org> | 2007-03-04 05:59:00 +0000 |
| commit | 53524e44efd7c7176da8dc8190a698b2fe184db1 (patch) | |
| tree | 68b6fb4aee85c3eb0a522cc199c3a3427938828e /sys/dev | |
| parent | 1b20cebad5f8d3582a41d5599641a95247721732 (diff) | |
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
Diffstat (limited to 'sys/dev')
567 files changed, 3194 insertions, 3180 deletions
diff --git a/sys/dev/acpi/atppc_acpi.c b/sys/dev/acpi/atppc_acpi.c index 7c5370bc1de..cbb649e2bcd 100644 --- a/sys/dev/acpi/atppc_acpi.c +++ b/sys/dev/acpi/atppc_acpi.c @@ -1,4 +1,4 @@ -/* $NetBSD: atppc_acpi.c,v 1.8 2007/01/10 18:55:22 cube Exp $ */ +/* $NetBSD: atppc_acpi.c,v 1.9 2007/03/04 06:01:43 christos Exp $ */ /*- * Copyright (c) 2004 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: atppc_acpi.c,v 1.8 2007/01/10 18:55:22 cube Exp $"); +__KERNEL_RCSID(0, "$NetBSD: atppc_acpi.c,v 1.9 2007/03/04 06:01:43 christos Exp $"); #include "opt_atppc.h" @@ -88,9 +88,9 @@ static int atppc_acpi_dma_start(struct atppc_softc *, void *, u_int, u_int8_t); static int atppc_acpi_dma_finish(struct atppc_softc *); static int atppc_acpi_dma_abort(struct atppc_softc *); -static int atppc_acpi_dma_malloc(struct device *, caddr_t *, bus_addr_t *, +static int atppc_acpi_dma_malloc(struct device *, void **, bus_addr_t *, bus_size_t); -static void atppc_acpi_dma_free(struct device *, caddr_t *, bus_addr_t *, +static void atppc_acpi_dma_free(struct device *, void **, bus_addr_t *, bus_size_t); /* * atppc_acpi_match: autoconf(9) match routine @@ -222,7 +222,7 @@ atppc_acpi_dma_abort(struct atppc_softc * lsc) /* Allocate memory for DMA over ISA bus */ static int -atppc_acpi_dma_malloc(struct device * dev, caddr_t * buf, bus_addr_t * bus_addr, +atppc_acpi_dma_malloc(struct device * dev, void ** buf, bus_addr_t * bus_addr, bus_size_t size) { struct atppc_acpi_softc * sc = (struct atppc_acpi_softc *) dev; @@ -232,7 +232,7 @@ atppc_acpi_dma_malloc(struct device * dev, caddr_t * buf, bus_addr_t * bus_addr, /* Free memory allocated by atppc_isa_dma_malloc() */ static void -atppc_acpi_dma_free(struct device * dev, caddr_t * buf, bus_addr_t * bus_addr, +atppc_acpi_dma_free(struct device * dev, void ** buf, bus_addr_t * bus_addr, bus_size_t size) { struct atppc_acpi_softc * sc = (struct atppc_acpi_softc *) dev; diff --git a/sys/dev/adb/adb_kbd.c b/sys/dev/adb/adb_kbd.c index a755620be79..ba7504ed28f 100644 --- a/sys/dev/adb/adb_kbd.c +++ b/sys/dev/adb/adb_kbd.c @@ -1,4 +1,4 @@ -/* $NetBSD: adb_kbd.c,v 1.4 2007/02/20 01:32:33 macallan Exp $ */ +/* $NetBSD: adb_kbd.c,v 1.5 2007/03/04 06:01:44 christos Exp $ */ /* * Copyright (C) 1998 Colin Wood @@ -32,7 +32,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: adb_kbd.c,v 1.4 2007/02/20 01:32:33 macallan Exp $"); +__KERNEL_RCSID(0, "$NetBSD: adb_kbd.c,v 1.5 2007/03/04 06:01:44 christos Exp $"); #include <sys/param.h> #include <sys/device.h> @@ -103,7 +103,7 @@ CFATTACH_DECL(adbkbd, sizeof(struct adbkbd_softc), extern struct cfdriver akbd_cd; static int adbkbd_enable(void *, int); -static int adbkbd_ioctl(void *, u_long, caddr_t, int, struct lwp *); +static int adbkbd_ioctl(void *, u_long, void *, int, struct lwp *); static void adbkbd_set_leds(void *, int); static void adbkbd_handler(void *, int, uint8_t *); @@ -131,7 +131,7 @@ struct wskbd_mapdata adbkbd_keymapdata = { }; static int adbkms_enable(void *); -static int adbkms_ioctl(void *, u_long, caddr_t, int, struct lwp *); +static int adbkms_ioctl(void *, u_long, void *, int, struct lwp *); static void adbkms_disable(void *); const struct wsmouse_accessops adbkms_accessops = { @@ -507,7 +507,7 @@ adbkbd_enable(void *v, int on) } static int -adbkbd_ioctl(void *v, u_long cmd, caddr_t data, int flag, struct lwp *l) +adbkbd_ioctl(void *v, u_long cmd, void *data, int flag, struct lwp *l) { struct adbkbd_softc *sc = (struct adbkbd_softc *) v; @@ -595,7 +595,7 @@ adbkms_enable(void *v) } static int -adbkms_ioctl(void *v, u_long cmd, caddr_t data, int flag, struct lwp *l) +adbkms_ioctl(void *v, u_long cmd, void *data, int flag, struct lwp *l) { switch (cmd) { diff --git a/sys/dev/adb/adb_ms.c b/sys/dev/adb/adb_ms.c index 347cb344234..660248266de 100644 --- a/sys/dev/adb/adb_ms.c +++ b/sys/dev/adb/adb_ms.c @@ -1,4 +1,4 @@ -/* $NetBSD: adb_ms.c,v 1.5 2007/02/20 01:32:33 macallan Exp $ */ +/* $NetBSD: adb_ms.c,v 1.6 2007/03/04 06:01:44 christos Exp $ */ /* * Copyright (C) 1998 Colin Wood @@ -32,7 +32,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: adb_ms.c,v 1.5 2007/02/20 01:32:33 macallan Exp $"); +__KERNEL_RCSID(0, "$NetBSD: adb_ms.c,v 1.6 2007/03/04 06:01:44 christos Exp $"); #include <sys/param.h> #include <sys/device.h> @@ -120,7 +120,7 @@ CFATTACH_DECL(adbms, sizeof(struct adbms_softc), adbms_match, adbms_attach, NULL, NULL); static int adbms_enable(void *); -static int adbms_ioctl(void *, u_long, caddr_t, int, struct lwp *); +static int adbms_ioctl(void *, u_long, void *, int, struct lwp *); static void adbms_disable(void *); /* @@ -668,7 +668,7 @@ adbms_enable(void *v) } static int -adbms_ioctl(void *v, u_long cmd, caddr_t data, int flag, struct lwp *l) +adbms_ioctl(void *v, u_long cmd, void *data, int flag, struct lwp *l) { switch (cmd) { diff --git a/sys/dev/apm/apm.c b/sys/dev/apm/apm.c index 00ec46e783b..a222f945b03 100644 --- a/sys/dev/apm/apm.c +++ b/sys/dev/apm/apm.c @@ -1,4 +1,4 @@ -/* $NetBSD: apm.c,v 1.9 2006/12/10 04:52:13 uwe Exp $ */ +/* $NetBSD: apm.c,v 1.10 2007/03/04 06:01:44 christos Exp $ */ /*- * Copyright (c) 1996, 1997 The NetBSD Foundation, Inc. @@ -40,7 +40,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: apm.c,v 1.9 2006/12/10 04:52:13 uwe Exp $"); +__KERNEL_RCSID(0, "$NetBSD: apm.c,v 1.10 2007/03/04 06:01:44 christos Exp $"); #include "opt_apm.h" @@ -809,7 +809,7 @@ apmclose(dev_t dev, int flag, int mode, } int -apmioctl(dev_t dev, u_long cmd, caddr_t data, int flag, +apmioctl(dev_t dev, u_long cmd, void *data, int flag, struct lwp *l) { struct apm_softc *sc = apm_cd.cd_devs[APMUNIT(dev)]; diff --git a/sys/dev/arcbios/arcbios_tty.c b/sys/dev/arcbios/arcbios_tty.c index cb5def8d0e7..3c5e37f0ac3 100644 --- a/sys/dev/arcbios/arcbios_tty.c +++ b/sys/dev/arcbios/arcbios_tty.c @@ -1,4 +1,4 @@ -/* $NetBSD: arcbios_tty.c,v 1.15 2006/10/01 19:28:43 elad Exp $ */ +/* $NetBSD: arcbios_tty.c,v 1.16 2007/03/04 06:01:44 christos Exp $ */ /* * Copyright (c) 1994, 1995, 1996 Carnegie-Mellon University. @@ -28,7 +28,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: arcbios_tty.c,v 1.15 2006/10/01 19:28:43 elad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: arcbios_tty.c,v 1.16 2007/03/04 06:01:44 christos Exp $"); #include <sys/param.h> #include <sys/user.h> @@ -156,7 +156,7 @@ arcbios_ttypoll(dev_t dev, int events, struct lwp *l) } int -arcbios_ttyioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct lwp *l) +arcbios_ttyioctl(dev_t dev, u_long cmd, void *data, int flag, struct lwp *l) { int unit = minor(dev); struct tty *tp = arcbios_tty[unit]; @@ -187,7 +187,7 @@ arcbios_tty_start(struct tty *tp) if (tp->t_outq.c_cc <= tp->t_lowat) { if (tp->t_state & TS_ASLEEP) { tp->t_state &= ~TS_ASLEEP; - wakeup((caddr_t)&tp->t_outq); + wakeup((void *)&tp->t_outq); } selwakeup(&tp->t_wsel); } diff --git a/sys/dev/ata/ata.c b/sys/dev/ata/ata.c index ade1dab8040..766f004585f 100644 --- a/sys/dev/ata/ata.c +++ b/sys/dev/ata/ata.c @@ -1,4 +1,4 @@ -/* $NetBSD: ata.c,v 1.85 2007/02/09 21:55:27 ad Exp $ */ +/* $NetBSD: ata.c,v 1.86 2007/03/04 06:01:44 christos Exp $ */ /* * Copyright (c) 1998, 2001 Manuel Bouyer. All rights reserved. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ata.c,v 1.85 2007/02/09 21:55:27 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ata.c,v 1.86 2007/03/04 06:01:44 christos Exp $"); #ifndef ATADEBUG #define ATADEBUG @@ -1412,7 +1412,7 @@ atabusclose(dev_t dev, int flag, int fmt, } int -atabusioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, +atabusioctl(dev_t dev, u_long cmd, void *addr, int flag, struct lwp *l) { struct atabus_softc *sc = atabus_cd.cd_devs[minor(dev)]; diff --git a/sys/dev/ata/ld_ataraid.c b/sys/dev/ata/ld_ataraid.c index 89dc017c717..e303358a0df 100644 --- a/sys/dev/ata/ld_ataraid.c +++ b/sys/dev/ata/ld_ataraid.c @@ -1,4 +1,4 @@ -/* $NetBSD: ld_ataraid.c,v 1.18 2006/11/16 01:32:47 christos Exp $ */ +/* $NetBSD: ld_ataraid.c,v 1.19 2007/03/04 06:01:44 christos Exp $ */ /* * Copyright (c) 2003 Wasabi Systems, Inc. @@ -45,7 +45,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ld_ataraid.c,v 1.18 2006/11/16 01:32:47 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ld_ataraid.c,v 1.19 2007/03/04 06:01:44 christos Exp $"); #include "rnd.h" @@ -239,7 +239,7 @@ ld_ataraid_attach(struct device *parent, struct device *self, static struct cbuf * ld_ataraid_make_cbuf(struct ld_ataraid_softc *sc, struct buf *bp, - u_int comp, daddr_t bn, caddr_t addr, long bcount) + u_int comp, daddr_t bn, void *addr, long bcount) { struct cbuf *cbp; @@ -273,7 +273,7 @@ ld_ataraid_start_span(struct ld_softc *ld, struct buf *bp) struct ataraid_disk_info *adi; SIMPLEQ_HEAD(, cbuf) cbufq; struct cbuf *cbp; - caddr_t addr; + char *addr; daddr_t bn; long bcount, rcount; u_int comp; @@ -338,7 +338,7 @@ ld_ataraid_start_raid0(struct ld_softc *ld, struct buf *bp) struct ataraid_disk_info *adi; SIMPLEQ_HEAD(, cbuf) cbufq; struct cbuf *cbp, *other_cbp; - caddr_t addr; + char *addr; daddr_t bn, cbn, tbn, off; long bcount, rcount; u_int comp; diff --git a/sys/dev/ata/wd.c b/sys/dev/ata/wd.c index 8aecf8bdee1..4fc6b722665 100644 --- a/sys/dev/ata/wd.c +++ b/sys/dev/ata/wd.c @@ -1,4 +1,4 @@ -/* $NetBSD: wd.c,v 1.336 2007/02/09 21:55:27 ad Exp $ */ +/* $NetBSD: wd.c,v 1.337 2007/03/04 06:01:44 christos Exp $ */ /* * Copyright (c) 1998, 2001 Manuel Bouyer. All rights reserved. @@ -66,7 +66,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: wd.c,v 1.336 2007/02/09 21:55:27 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: wd.c,v 1.337 2007/03/04 06:01:44 christos Exp $"); #ifndef ATADEBUG #define ATADEBUG @@ -656,7 +656,7 @@ wd_split_mod15_write(struct buf *bp) * using the same opening. */ bp->b_flags = obp->b_flags | B_CALL; - bp->b_data += bp->b_bcount; + bp->b_data = (char *)bp->b_data + bp->b_bcount; bp->b_blkno += (bp->b_bcount / 512); bp->b_rawblkno += (bp->b_bcount / 512); __wdstart(sc, bp); @@ -1152,7 +1152,7 @@ wdperror(const struct wd_softc *wd) } int -wdioctl(dev_t dev, u_long xfer, caddr_t addr, int flag, struct lwp *l) +wdioctl(dev_t dev, u_long xfer, void *addr, int flag, struct lwp *l) { struct wd_softc *wd = device_lookup(&wd_cd, WDUNIT(dev)); int error = 0, s; @@ -1186,7 +1186,7 @@ wdioctl(dev_t dev, u_long xfer, caddr_t addr, int flag, struct lwp *l) struct disk_badsecinfo dbsi; struct disk_badsectors *dbs; size_t available; - caddr_t laddr; + void *laddr; dbsi = *(struct disk_badsecinfo *)addr; missing = wd->sc_bscount; @@ -1556,7 +1556,7 @@ static int wddumprecalibrated = 0; * Dump core after a system crash. */ int -wddump(dev_t dev, daddr_t blkno, caddr_t va, size_t size) +wddump(dev_t dev, daddr_t blkno, void *va, size_t size) { struct wd_softc *wd; /* disk unit to do the I/O */ struct disklabel *lp; /* disk's disklabel */ diff --git a/sys/dev/audio.c b/sys/dev/audio.c index 1f7f96c739c..2e00a32fa2d 100644 --- a/sys/dev/audio.c +++ b/sys/dev/audio.c @@ -1,4 +1,4 @@ -/* $NetBSD: audio.c,v 1.219 2007/03/01 17:31:35 thorpej Exp $ */ +/* $NetBSD: audio.c,v 1.220 2007/03/04 06:01:40 christos Exp $ */ /* * Copyright (c) 1991-1993 Regents of the University of California. @@ -61,7 +61,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.219 2007/03/01 17:31:35 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.220 2007/03/04 06:01:40 christos Exp $"); #include "audio.h" #if NAUDIO > 0 @@ -110,14 +110,14 @@ int audio_open(dev_t, struct audio_softc *, int, int, struct lwp *); int audio_close(struct audio_softc *, int, int, struct lwp *); int audio_read(struct audio_softc *, struct uio *, int); int audio_write(struct audio_softc *, struct uio *, int); -int audio_ioctl(struct audio_softc *, u_long, caddr_t, int, struct lwp *); +int audio_ioctl(struct audio_softc *, u_long, void *, int, struct lwp *); int audio_poll(struct audio_softc *, int, struct lwp *); int audio_kqfilter(struct audio_softc *, struct knote *); paddr_t audio_mmap(struct audio_softc *, off_t, int); int mixer_open(dev_t, struct audio_softc *, int, int, struct lwp *); int mixer_close(struct audio_softc *, int, int, struct lwp *); -int mixer_ioctl(struct audio_softc *, u_long, caddr_t, int, struct lwp *); +int mixer_ioctl(struct audio_softc *, u_long, void *, int, struct lwp *); static void mixer_remove(struct audio_softc *, struct lwp *); static void mixer_signal(struct audio_softc *); @@ -1066,7 +1066,7 @@ audiowrite(dev_t dev, struct uio *uio, int ioflag) } int -audioioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct lwp *l) +audioioctl(dev_t dev, u_long cmd, void *addr, int flag, struct lwp *l) { struct audio_softc *sc; int error; @@ -2015,7 +2015,7 @@ audio_write(struct audio_softc *sc, struct uio *uio, int ioflag) } int -audio_ioctl(struct audio_softc *sc, u_long cmd, caddr_t addr, int flag, +audio_ioctl(struct audio_softc *sc, u_long cmd, void *addr, int flag, struct lwp *l) { const struct audio_hw_if *hw; @@ -3685,7 +3685,7 @@ mixer_close(struct audio_softc *sc, int flags, int ifmt, } int -mixer_ioctl(struct audio_softc *sc, u_long cmd, caddr_t addr, int flag, +mixer_ioctl(struct audio_softc *sc, u_long cmd, void *addr, int flag, struct lwp *l) { const struct audio_hw_if *hw; diff --git a/sys/dev/audio_if.h b/sys/dev/audio_if.h index 909c69a6001..032b4ca9648 100644 --- a/sys/dev/audio_if.h +++ b/sys/dev/audio_if.h @@ -1,4 +1,4 @@ -/* $NetBSD: audio_if.h,v 1.62 2007/02/21 22:59:58 thorpej Exp $ */ +/* $NetBSD: audio_if.h,v 1.63 2007/03/04 06:01:41 christos Exp $ */ /* * Copyright (c) 1994 Havard Eidnes. @@ -235,7 +235,7 @@ struct audio_hw_if { void (*)(void *), void *, const audio_params_t *); int (*trigger_input)(void *, void *, void *, int, void (*)(void *), void *, const audio_params_t *); - int (*dev_ioctl)(void *, u_long, caddr_t, int, struct lwp *); + int (*dev_ioctl)(void *, u_long, void *, int, struct lwp *); int (*powerstate)(void *, int); #define AUDIOPOWER_ON 1 #define AUDIOPOWER_OFF 0 diff --git a/sys/dev/audiobell.c b/sys/dev/audiobell.c index d589e83ad77..f5915aafa64 100644 --- a/sys/dev/audiobell.c +++ b/sys/dev/audiobell.c @@ -1,4 +1,4 @@ -/* $NetBSD: audiobell.c,v 1.4 2006/03/28 17:38:29 thorpej Exp $ */ +/* $NetBSD: audiobell.c,v 1.5 2007/03/04 06:01:41 christos Exp $ */ /* * Copyright (c) 1999 Richard Earnshaw @@ -31,7 +31,7 @@ */ #include <sys/types.h> -__KERNEL_RCSID(0, "$NetBSD: audiobell.c,v 1.4 2006/03/28 17:38:29 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: audiobell.c,v 1.5 2007/03/04 06:01:41 christos Exp $"); #include <sys/audioio.h> #include <sys/conf.h> @@ -152,7 +152,7 @@ audiobell(void *arg, u_int pitch, u_int period, u_int volume, int poll) if (buf == NULL) goto out; if (audiobell_synthesize(buf, pitch, period, volume) != 0) goto out; - aiov.iov_base = (caddr_t)buf; + aiov.iov_base = (void *)buf; aiov.iov_len = period * 8; auio.uio_iov = &aiov; auio.uio_iovcnt = 1; diff --git a/sys/dev/bi/bi.c b/sys/dev/bi/bi.c index 864e542f689..c8fa7b23663 100644 --- a/sys/dev/bi/bi.c +++ b/sys/dev/bi/bi.c @@ -1,4 +1,4 @@ -/* $NetBSD: bi.c,v 1.21 2005/12/11 12:21:15 christos Exp $ */ +/* $NetBSD: bi.c,v 1.22 2007/03/04 06:01:44 christos Exp $ */ /* * Copyright (c) 1996 Ludd, University of Lule}, Sweden. * All rights reserved. @@ -41,7 +41,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: bi.c,v 1.21 2005/12/11 12:21:15 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: bi.c,v 1.22 2007/03/04 06:01:44 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -137,7 +137,7 @@ bi_attach(sc) nodenr); return; } - if (badaddr((caddr_t)ba.ba_ioh, 4) || + if (badaddr((void *)ba.ba_ioh, 4) || (bus_space_read_2(ba.ba_iot, ba.ba_ioh, 0) == 0)) { bus_space_unmap(ba.ba_iot, ba.ba_ioh, BI_NODESIZE); continue; diff --git a/sys/dev/bi/if_ni.c b/sys/dev/bi/if_ni.c index 43b683c897b..a06faab6cb6 100644 --- a/sys/dev/bi/if_ni.c +++ b/sys/dev/bi/if_ni.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_ni.c,v 1.28 2007/02/16 13:41:45 ad Exp $ */ +/* $NetBSD: if_ni.c,v 1.29 2007/03/04 06:01:45 christos Exp $ */ /* * Copyright (c) 2000 Ludd, University of Lule}, Sweden. All rights reserved. * @@ -36,7 +36,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_ni.c,v 1.28 2007/02/16 13:41:45 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_ni.c,v 1.29 2007/03/04 06:01:45 christos Exp $"); #include "opt_inet.h" #include "bpfilter.h" @@ -145,12 +145,12 @@ static void niattach(struct device *, struct device *, void *); static void niinit(struct ni_softc *); static void nistart(struct ifnet *); static void niintr(void *); -static int niioctl(struct ifnet *, u_long, caddr_t); +static int niioctl(struct ifnet *, u_long, void *); static int ni_add_rxbuf(struct ni_softc *, struct ni_dg *, int); static void ni_setup(struct ni_softc *); static void nitimeout(struct ifnet *); static void ni_shutdown(void *); -static void ni_getpgs(struct ni_softc *sc, int size, caddr_t *v, paddr_t *p); +static void ni_getpgs(struct ni_softc *sc, int size, void **v, paddr_t *p); static int failtest(struct ni_softc *, int, int, int, const char *); volatile int endwait, retry; /* Used during autoconfig */ @@ -192,7 +192,7 @@ nimatch(parent, cf, aux) * We need to get the structures from the beginning of its own pages. */ static void -ni_getpgs(struct ni_softc *sc, int size, caddr_t *v, paddr_t *p) +ni_getpgs(struct ni_softc *sc, int size, void **v, paddr_t *p) { bus_dma_segment_t seg; int nsegs, error; @@ -242,7 +242,7 @@ niattach(parent, self, aux) struct ifnet *ifp = (struct ifnet *)&sc->sc_if; struct ni_msg *msg; struct ni_ptdb *ptdb; - caddr_t va; + void *va; int i, j, s, res; u_short type; @@ -258,11 +258,11 @@ niattach(parent, self, aux) evcnt_attach_dynamic(&sc->sc_intrcnt, EVCNT_TYPE_INTR, NULL, sc->sc_dev.dv_xname, "intr"); - ni_getpgs(sc, sizeof(struct ni_gvppqb), (caddr_t *)&sc->sc_gvppqb, + ni_getpgs(sc, sizeof(struct ni_gvppqb), (void **)&sc->sc_gvppqb, (paddr_t *)&sc->sc_pgvppqb); - ni_getpgs(sc, sizeof(struct ni_fqb), (caddr_t *)&sc->sc_fqb, 0); + ni_getpgs(sc, sizeof(struct ni_fqb), (void **)&sc->sc_fqb, 0); ni_getpgs(sc, NBDESCS * sizeof(struct ni_bbd), - (caddr_t *)&sc->sc_bbd, 0); + (void **)&sc->sc_bbd, 0); /* * Zero the newly allocated memory. */ @@ -698,7 +698,7 @@ int niioctl(ifp, cmd, data) register struct ifnet *ifp; u_long cmd; - caddr_t data; + void *data; { struct ni_softc *sc = ifp->if_softc; struct ifreq *ifr = (struct ifreq *)data; diff --git a/sys/dev/bi/kdb.c b/sys/dev/bi/kdb.c index 85dc3e0440d..9f3e16a0dd9 100644 --- a/sys/dev/bi/kdb.c +++ b/sys/dev/bi/kdb.c @@ -1,4 +1,4 @@ -/* $NetBSD: kdb.c,v 1.39 2007/02/16 13:41:45 ad Exp $ */ +/* $NetBSD: kdb.c,v 1.40 2007/03/04 06:01:45 christos Exp $ */ /* * Copyright (c) 1996 Ludd, University of Lule}, Sweden. * All rights reserved. @@ -40,7 +40,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: kdb.c,v 1.39 2007/02/16 13:41:45 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kdb.c,v 1.40 2007/03/04 06:01:45 christos Exp $"); #include <sys/param.h> #include <sys/kernel.h> @@ -82,7 +82,7 @@ __KERNEL_RCSID(0, "$NetBSD: kdb.c,v 1.39 2007/02/16 13:41:45 ad Exp $"); struct kdb_softc { struct device sc_dev; /* Autoconfig info */ struct evcnt sc_intrcnt; /* Interrupt counting */ - caddr_t sc_kdb; /* Struct for kdb communication */ + void * sc_kdb; /* Struct for kdb communication */ struct mscp_softc *sc_softc; /* MSCP info (per mscpvar.h) */ bus_dma_tag_t sc_dmat; bus_dmamap_t sc_cmap; /* Control structures */ diff --git a/sys/dev/bluetooth/bthub.c b/sys/dev/bluetooth/bthub.c index 909fad5024f..7e597cc5a5a 100644 --- a/sys/dev/bluetooth/bthub.c +++ b/sys/dev/bluetooth/bthub.c @@ -1,4 +1,4 @@ -/* $NetBSD: bthub.c,v 1.8 2006/11/16 01:32:48 christos Exp $ */ +/* $NetBSD: bthub.c,v 1.9 2007/03/04 06:01:45 christos Exp $ */ /*- * Copyright (c) 2006 Itronix Inc. @@ -32,7 +32,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: bthub.c,v 1.8 2006/11/16 01:32:48 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: bthub.c,v 1.9 2007/03/04 06:01:45 christos Exp $"); #include <sys/param.h> #include <sys/conf.h> @@ -149,7 +149,7 @@ bthub_detach(struct device *self, int flags) */ int -bthubioctl(dev_t devno, unsigned long cmd, caddr_t data, int flag, struct lwp *l) +bthubioctl(dev_t devno, unsigned long cmd, void *data, int flag, struct lwp *l) { prop_dictionary_t dict; int err; diff --git a/sys/dev/bluetooth/btkbd.c b/sys/dev/bluetooth/btkbd.c index 40f4491cd68..6bdc8d35625 100644 --- a/sys/dev/bluetooth/btkbd.c +++ b/sys/dev/bluetooth/btkbd.c @@ -1,4 +1,4 @@ -/* $NetBSD: btkbd.c,v 1.5 2006/11/16 01:32:48 christos Exp $ */ +/* $NetBSD: btkbd.c,v 1.6 2007/03/04 06:01:45 christos Exp $ */ /*- * Copyright (c) 2006 Itronix Inc. @@ -36,7 +36,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: btkbd.c,v 1.5 2006/11/16 01:32:48 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: btkbd.c,v 1.6 2007/03/04 06:01:45 christos Exp $"); #include <sys/param.h> #include <sys/callout.h> @@ -124,7 +124,7 @@ CFATTACH_DECL(btkbd, sizeof(struct btkbd_softc), /* wskbd(4) accessops */ static int btkbd_enable(void *, int); static void btkbd_set_leds(void *, int); -static int btkbd_ioctl(void *, unsigned long, caddr_t, int, struct lwp *); +static int btkbd_ioctl(void *, unsigned long, void *, int, struct lwp *); static const struct wskbd_accessops btkbd_accessops = { btkbd_enable, @@ -337,7 +337,7 @@ btkbd_set_leds(void *self, int leds) } static int -btkbd_ioctl(void *self, unsigned long cmd, caddr_t data, int flag, +btkbd_ioctl(void *self, unsigned long cmd, void *data, int flag, struct lwp *l) { struct btkbd_softc *sc = (struct btkbd_softc *)self; diff --git a/sys/dev/bluetooth/btms.c b/sys/dev/bluetooth/btms.c index 8c72c971482..d7c8923ecd8 100644 --- a/sys/dev/bluetooth/btms.c +++ b/sys/dev/bluetooth/btms.c @@ -1,4 +1,4 @@ -/* $NetBSD: btms.c,v 1.5 2006/11/16 01:32:48 christos Exp $ */ +/* $NetBSD: btms.c,v 1.6 2007/03/04 06:01:45 christos Exp $ */ /*- * Copyright (c) 2006 Itronix Inc. @@ -36,7 +36,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: btms.c,v 1.5 2006/11/16 01:32:48 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: btms.c,v 1.6 2007/03/04 06:01:45 christos Exp $"); #include <sys/param.h> #include <sys/conf.h> @@ -93,7 +93,7 @@ CFATTACH_DECL(btms, sizeof(struct btms_softc), /* wsmouse(4) accessops */ static int btms_wsmouse_enable(void *); -static int btms_wsmouse_ioctl(void *, unsigned long, caddr_t, int, struct lwp *); +static int btms_wsmouse_ioctl(void *, unsigned long, void *, int, struct lwp *); static void btms_wsmouse_disable(void *); static const struct wsmouse_accessops btms_wsmouse_accessops = { @@ -286,7 +286,7 @@ btms_wsmouse_enable(void *self) } static int -btms_wsmouse_ioctl(void *self, unsigned long cmd, caddr_t data, +btms_wsmouse_ioctl(void *self, unsigned long cmd, void *data, int flag, struct lwp *l) { /* struct btms_softc *sc = (struct btms_softc *)self; */ diff --git a/sys/dev/bluetooth/btsco.c b/sys/dev/bluetooth/btsco.c index ce7e5194103..ac5a93b8758 100644 --- a/sys/dev/bluetooth/btsco.c +++ b/sys/dev/bluetooth/btsco.c @@ -1,4 +1,4 @@ -/* $NetBSD: btsco.c,v 1.11 2006/11/16 01:32:48 christos Exp $ */ +/* $NetBSD: btsco.c,v 1.12 2007/03/04 06:01:45 christos Exp $ */ /*- * Copyright (c) 2006 Itronix Inc. @@ -32,7 +32,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: btsco.c,v 1.11 2006/11/16 01:32:48 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: btsco.c,v 1.12 2007/03/04 06:01:45 christos Exp $"); #include <sys/param.h> #include <sys/audioio.h> @@ -157,7 +157,7 @@ static int btsco_query_devinfo(void *, mixer_devinfo_t *); static void *btsco_allocm(void *, int, size_t, struct malloc_type *, int); static void btsco_freem(void *, void *, struct malloc_type *); static int btsco_get_props(void *); -static int btsco_dev_ioctl(void *, u_long, caddr_t, int, struct lwp *); +static int btsco_dev_ioctl(void *, u_long, void *, int, struct lwp *); static const struct audio_hw_if btsco_if = { btsco_open, /* open */ @@ -244,7 +244,7 @@ static const struct btproto btsco_sco_proto = { #define BTSCO_TIMEOUT (30 * hz) /* misc btsco functions */ -static void btsco_extfree(struct mbuf *, caddr_t, size_t, void *); +static void btsco_extfree(struct mbuf *, void *, size_t, void *); static void btsco_intr(void *); @@ -1065,7 +1065,7 @@ btsco_get_props(void *hdl) * to the device and mixer. */ static int -btsco_dev_ioctl(void *hdl, u_long cmd, caddr_t addr, int flag, +btsco_dev_ioctl(void *hdl, u_long cmd, void *addr, int flag, struct lwp *l) { struct btsco_softc *sc = hdl; @@ -1157,7 +1157,7 @@ btsco_intr(void *arg) * that we dont release it before its free. */ static void -btsco_extfree(struct mbuf *m, caddr_t addr, size_t size, +btsco_extfree(struct mbuf *m, void *addr, size_t size, void *arg) { struct btsco_softc *sc = arg; diff --git a/sys/dev/bluetooth/btuart.c b/sys/dev/bluetooth/btuart.c index bdb1a863709..2a1c5ec5aae 100644 --- a/sys/dev/bluetooth/btuart.c +++ b/sys/dev/bluetooth/btuart.c @@ -1,4 +1,4 @@ -/* $NetBSD: btuart.c,v 1.1 2007/02/20 16:53:20 kiyohara Exp $ */ +/* $NetBSD: btuart.c,v 1.2 2007/03/04 06:01:45 christos Exp $ */ /* * Copyright (c) 2006, 2007 KIYOHARA Takashi * All rights reserved. @@ -26,7 +26,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: btuart.c,v 1.1 2007/02/20 16:53:20 kiyohara Exp $"); +__KERNEL_RCSID(0, "$NetBSD: btuart.c,v 1.2 2007/03/04 06:01:45 christos Exp $"); #include <sys/types.h> #include <sys/param.h> @@ -117,7 +117,7 @@ static void bth4init_input(struct hci_unit *, struct mbuf *); static int bth4open(dev_t, struct tty *); static int bth4close(struct tty *, int); -static int bth4ioctl(struct tty *, u_long, caddr_t, int, struct lwp *); +static int bth4ioctl(struct tty *, u_long, void *, int, struct lwp *); static int bth4input(int, struct tty *); static int bth4start(struct tty *); @@ -1150,7 +1150,7 @@ bth4close(struct tty *tp, int flag __unused) /* ARGSUSED */ static int -bth4ioctl(struct tty *tp, u_long cmd, caddr_t data, +bth4ioctl(struct tty *tp, u_long cmd, void *data, int flag __unused, struct lwp *l __unused) { struct btuart_softc *sc = (struct btuart_softc *)tp->t_sc; diff --git a/sys/dev/ccd.c b/sys/dev/ccd.c index 8be71c1548d..0ccd7aa493e 100644 --- a/sys/dev/ccd.c +++ b/sys/dev/ccd.c @@ -1,4 +1,4 @@ -/* $NetBSD: ccd.c,v 1.117 2007/02/15 15:40:51 ad Exp $ */ +/* $NetBSD: ccd.c,v 1.118 2007/03/04 06:01:41 christos Exp $ */ /*- * Copyright (c) 1996, 1997, 1998, 1999, 2007 The NetBSD Foundation, Inc. @@ -125,7 +125,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ccd.c,v 1.117 2007/02/15 15:40:51 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ccd.c,v 1.118 2007/03/04 06:01:41 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -196,7 +196,7 @@ static void ccdintr(struct ccd_softc *, struct buf *); static int ccdinit(struct ccd_softc *, char **, struct vnode **, struct lwp *); static struct ccdbuf *ccdbuffer(struct ccd_softc *, struct buf *, - daddr_t, caddr_t, long); + daddr_t, void *, long); static void ccdgetdefaultlabel(struct ccd_softc *, struct disklabel *); static void ccdgetdisklabel(dev_t); static void ccdmakedisklabel(struct ccd_softc *); @@ -713,7 +713,7 @@ ccdstart(struct ccd_softc *cs) long bcount, rcount; struct buf *bp; struct ccdbuf *cbp; - caddr_t addr; + char *addr; daddr_t bn; SIMPLEQ_HEAD(, ccdbuf) cbufq; @@ -775,7 +775,7 @@ ccdstart(struct ccd_softc *cs) * Build a component buffer header. */ static struct ccdbuf * -ccdbuffer(struct ccd_softc *cs, struct buf *bp, daddr_t bn, caddr_t addr, +ccdbuffer(struct ccd_softc *cs, struct buf *bp, daddr_t bn, void *addr, long bcount) { struct ccdcinfo *ci; @@ -985,7 +985,7 @@ ccdwrite(dev_t dev, struct uio *uio, int flags) } static int -ccdioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct lwp *l) +ccdioctl(dev_t dev, u_long cmd, void *data, int flag, struct lwp *l) { int unit = ccdunit(dev); int s, i, j, lookedup = 0, error = 0; @@ -1345,7 +1345,7 @@ ccdsize(dev_t dev) } static int -ccddump(dev_t dev, daddr_t blkno, caddr_t va, +ccddump(dev_t dev, daddr_t blkno, void *va, size_t size) { diff --git a/sys/dev/cgd.c b/sys/dev/cgd.c index d78e0fbe4a8..c9211d8c303 100644 --- a/sys/dev/cgd.c +++ b/sys/dev/cgd.c @@ -1,4 +1,4 @@ -/* $NetBSD: cgd.c,v 1.43 2007/01/19 18:59:59 cbiere Exp $ */ +/* $NetBSD: cgd.c,v 1.44 2007/03/04 06:01:41 christos Exp $ */ /*- * Copyright (c) 2002 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: cgd.c,v 1.43 2007/01/19 18:59:59 cbiere Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cgd.c,v 1.44 2007/03/04 06:01:41 christos Exp $"); #include <sys/types.h> #include <sys/param.h> @@ -92,7 +92,7 @@ static int cgd_ioctl_set(struct cgd_softc *, void *, struct lwp *); static int cgd_ioctl_clr(struct cgd_softc *, void *, struct lwp *); static int cgdinit(struct cgd_softc *, const char *, struct vnode *, struct lwp *); -static void cgd_cipher(struct cgd_softc *, caddr_t, caddr_t, +static void cgd_cipher(struct cgd_softc *, void *, void *, size_t, daddr_t, size_t, int); /* Pseudo-disk Interface */ @@ -259,7 +259,7 @@ static void * cgd_getdata(struct dk_softc *dksc, unsigned long size) { struct cgd_softc *cs =dksc->sc_osc; - caddr_t data = NULL; + void * data = NULL; simple_lock(&cs->sc_slock); if (cs->sc_data_used == 0) { @@ -275,7 +275,7 @@ cgd_getdata(struct dk_softc *dksc, unsigned long size) } static void -cgd_putdata(struct dk_softc *dksc, caddr_t data) +cgd_putdata(struct dk_softc *dksc, void *data) { struct cgd_softc *cs =dksc->sc_osc; @@ -293,8 +293,8 @@ cgdstart(struct dk_softc *dksc, struct buf *bp) { struct cgd_softc *cs = dksc->sc_osc; struct buf *nbp; - caddr_t addr; - caddr_t newaddr; + void * addr; + void * newaddr; daddr_t bn; DPRINTF_FOLLOW(("cgdstart(%p, %p)\n", dksc, bp)); @@ -428,7 +428,7 @@ cgdwrite(dev_t dev, struct uio *uio, int flags) } static int -cgdioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct lwp *l) +cgdioctl(dev_t dev, u_long cmd, void *data, int flag, struct lwp *l) { struct cgd_softc *cs; struct dk_softc *dksc; @@ -476,7 +476,7 @@ cgdioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct lwp *l) } static int -cgddump(dev_t dev, daddr_t blkno, caddr_t va, size_t size) +cgddump(dev_t dev, daddr_t blkno, void *va, size_t size) { struct cgd_softc *cs; @@ -718,9 +718,11 @@ blkno2blkno_buf(char *sbuf, daddr_t blkno) } static void -cgd_cipher(struct cgd_softc *cs, caddr_t dst, caddr_t src, - size_t len, daddr_t blkno, size_t secsize, int dir) +cgd_cipher(struct cgd_softc *cs, void *dstv, void *srcv, + size_t len, daddr_t blkno, size_t secsize, int dir) { + char *dst = dstv; + char *src = srcv; cfunc_cipher *cipher = cs->sc_cfuncs->cf_cipher; struct uio dstuio; struct uio srcuio; diff --git a/sys/dev/cgdvar.h b/sys/dev/cgdvar.h index 04527a903ff..15fd51cdb50 100644 --- a/sys/dev/cgdvar.h +++ b/sys/dev/cgdvar.h @@ -1,4 +1,4 @@ -/* $NetBSD: cgdvar.h,v 1.8 2006/12/02 06:22:09 christos Exp $ */ +/* $NetBSD: cgdvar.h,v 1.9 2007/03/04 06:01:41 christos Exp $ */ /*- * Copyright (c) 2002 The NetBSD Foundation, Inc. @@ -74,7 +74,7 @@ struct cgd_softc { struct vnode *sc_tvn; /* target device's vnode */ dev_t sc_tdev; /* target device */ char *sc_tpath; /* target device's path */ - caddr_t sc_data; /* emergency buffer */ + void * sc_data; /* emergency buffer */ int sc_data_used; /* Really lame, we'll change */ size_t sc_tpathlen; /* length of prior string */ struct cryptdata sc_cdata; /* crypto data */ diff --git a/sys/dev/clockctl.c b/sys/dev/clockctl.c index 3f220c944a6..123333eb0ca 100644 --- a/sys/dev/clockctl.c +++ b/sys/dev/clockctl.c @@ -1,4 +1,4 @@ -/* $NetBSD: clockctl.c,v 1.20 2006/11/16 01:32:44 christos Exp $ */ +/* $NetBSD: clockctl.c,v 1.21 2007/03/04 06:01:41 christos Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: clockctl.c,v 1.20 2006/11/16 01:32:44 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: clockctl.c,v 1.21 2007/03/04 06:01:41 christos Exp $"); #include "opt_ntp.h" @@ -72,7 +72,7 @@ int clockctlioctl( dev_t dev, u_long cmd, - caddr_t data, + void *data, int flags, struct lwp *l) { diff --git a/sys/dev/cons.c b/sys/dev/cons.c index 4026c8f0d40..f75272d1f59 100644 --- a/sys/dev/cons.c +++ b/sys/dev/cons.c @@ -1,4 +1,4 @@ -/* $NetBSD: cons.c,v 1.62 2007/02/09 21:55:26 ad Exp $ */ +/* $NetBSD: cons.c,v 1.63 2007/03/04 06:01:41 christos Exp $ */ /* * Copyright (c) 1990, 1993 @@ -78,7 +78,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: cons.c,v 1.62 2007/02/09 21:55:26 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cons.c,v 1.63 2007/03/04 06:01:41 christos Exp $"); #include <sys/param.h> #include <sys/proc.h> @@ -228,7 +228,7 @@ cnwrite(dev_t dev, struct uio *uio, int flag) } int -cnioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct lwp *l) +cnioctl(dev_t dev, u_long cmd, void *data, int flag, struct lwp *l) { const struct cdevsw *cdev; int error; diff --git a/sys/dev/dec/dz.c b/sys/dev/dec/dz.c index 488129dff88..2f687e9e5fb 100644 --- a/sys/dev/dec/dz.c +++ b/sys/dev/dec/dz.c @@ -1,4 +1,4 @@ -/* $NetBSD: dz.c,v 1.24 2006/10/03 12:50:12 he Exp $ */ +/* $NetBSD: dz.c,v 1.25 2007/03/04 06:01:45 christos Exp $ */ /* * Copyright (c) 1992, 1993 * The Regents of the University of California. All rights reserved. @@ -67,7 +67,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: dz.c,v 1.24 2006/10/03 12:50:12 he Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dz.c,v 1.25 2007/03/04 06:01:45 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -235,7 +235,7 @@ dzrint(void *arg) cn_check_magic(tp->t_dev, mcc, dz_cnm_state); if (!(tp->t_state & TS_ISOPEN)) { - wakeup((caddr_t)&tp->t_rawq); + wakeup((void *)&tp->t_rawq); continue; } @@ -370,7 +370,7 @@ dzopen(dev_t dev, int flag, int mode, struct lwp *l) while (!(flag & O_NONBLOCK) && !(tp->t_cflag & CLOCAL) && !(tp->t_state & TS_CARR_ON)) { tp->t_wopen++; - error = ttysleep(tp, (caddr_t)&tp->t_rawq, + error = ttysleep(tp, (void *)&tp->t_rawq, TTIPRI | PCATCH, ttopen, 0); tp->t_wopen--; if (error) @@ -450,7 +450,7 @@ dzpoll(dev, events, l) /*ARGSUSED*/ int -dzioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct lwp *l) +dzioctl(dev_t dev, u_long cmd, void *data, int flag, struct lwp *l) { struct dz_softc *sc; struct tty *tp; @@ -549,7 +549,7 @@ dzstart(struct tty *tp) if (cl->c_cc <= tp->t_lowat) { if (tp->t_state & TS_ASLEEP) { tp->t_state &= ~TS_ASLEEP; - wakeup((caddr_t)cl); + wakeup((void *)cl); } selwakeup(&tp->t_wsel); } diff --git a/sys/dev/dec/dzkbd.c b/sys/dev/dec/dzkbd.c index 8c6e0bd5b48..aa546bd936c 100644 --- a/sys/dev/dec/dzkbd.c +++ b/sys/dev/dec/dzkbd.c @@ -1,4 +1,4 @@ -/* $NetBSD: dzkbd.c,v 1.16 2006/03/29 06:28:38 thorpej Exp $ */ +/* $NetBSD: dzkbd.c,v 1.17 2007/03/04 06:01:45 christos Exp $ */ /* * Copyright (c) 1992, 1993 @@ -45,7 +45,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: dzkbd.c,v 1.16 2006/03/29 06:28:38 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dzkbd.c,v 1.17 2007/03/04 06:01:45 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -98,7 +98,7 @@ CFATTACH_DECL(dzkbd, sizeof(struct dzkbd_softc), static int dzkbd_enable(void *, int); static void dzkbd_set_leds(void *, int); -static int dzkbd_ioctl(void *, u_long, caddr_t, int, struct lwp *); +static int dzkbd_ioctl(void *, u_long, void *, int, struct lwp *); const struct wskbd_accessops dzkbd_accessops = { dzkbd_enable, @@ -272,7 +272,7 @@ static int dzkbd_ioctl(v, cmd, data, flag, l) void *v; u_long cmd; - caddr_t data; + void *data; int flag; struct lwp *l; { diff --git a/sys/dev/dec/dzms.c b/sys/dev/dec/dzms.c index 347405a4d36..7fff7869b5e 100644 --- a/sys/dev/dec/dzms.c +++ b/sys/dev/dec/dzms.c @@ -1,4 +1,4 @@ -/* $NetBSD: dzms.c,v 1.15 2006/11/12 19:00:43 plunky Exp $ */ +/* $NetBSD: dzms.c,v 1.16 2007/03/04 06:01:45 christos Exp $ */ /* * Copyright (c) 1992, 1993 @@ -45,7 +45,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: dzms.c,v 1.15 2006/11/12 19:00:43 plunky Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dzms.c,v 1.16 2007/03/04 06:01:45 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -90,7 +90,7 @@ CFATTACH_DECL(dzms, sizeof(struct dzms_softc), dzms_match, dzms_attach, NULL, NULL); static int dzms_enable(void *); -static int dzms_ioctl(void *, u_long, caddr_t, int, struct lwp *); +static int dzms_ioctl(void *, u_long, void *, int, struct lwp *); static void dzms_disable(void *); const struct wsmouse_accessops dzms_accessops = { @@ -180,7 +180,7 @@ static int dzms_ioctl(v, cmd, data, flag, l) void *v; u_long cmd; - caddr_t data; + void *data; int flag; struct lwp *l; { diff --git a/sys/dev/dec/dzvar.h b/sys/dev/dec/dzvar.h index b0b49c7e214..edc217fa549 100644 --- a/sys/dev/dec/dzvar.h +++ b/sys/dev/dec/dzvar.h @@ -1,4 +1,4 @@ -/* $NetBSD: dzvar.h,v 1.8 2005/12/11 12:21:20 christos Exp $ */ +/* $NetBSD: dzvar.h,v 1.9 2007/03/04 06:01:45 christos Exp $ */ /* * Copyright (c) 1992, 1993 * The Regents of the University of California. All rights reserved. @@ -100,8 +100,8 @@ struct dz_softc { int (*dz_catch)(void *, int); /* Fast catch recv */ struct tty * dz_tty; /* what we work on */ #ifdef notyet - caddr_t dz_mem; /* pointers to clist output */ - caddr_t dz_end; /* allowing pdma action */ + void * dz_mem; /* pointers to clist output */ + void * dz_end; /* allowing pdma action */ #endif } sc_dz[NDZLINE]; }; diff --git a/sys/dev/dec/vsxxx.c b/sys/dev/dec/vsxxx.c index cf802bbee59..b6f7f59b974 100644 --- a/sys/dev/dec/vsxxx.c +++ b/sys/dev/dec/vsxxx.c @@ -1,4 +1,4 @@ -/* $NetBSD: vsxxx.c,v 1.7 2006/11/12 19:00:43 plunky Exp $ */ +/* $NetBSD: vsxxx.c,v 1.8 2007/03/04 06:01:45 christos Exp $ */ /* * Copyright (c) 1999 Tohru Nishimura. All rights reserved. @@ -31,7 +31,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: vsxxx.c,v 1.7 2006/11/12 19:00:43 plunky Exp $"); +__KERNEL_RCSID(0, "$NetBSD: vsxxx.c,v 1.8 2007/03/04 06:01:45 christos Exp $"); /* * Common machinary for VSXXX mice and tablet @@ -77,7 +77,7 @@ __KERNEL_RCSID(0, "$NetBSD: vsxxx.c,v 1.7 2006/11/12 19:00:43 plunky Exp $"); extern struct cfdriver vsms_cd; static int vsxxx_enable(void *); -static int vsxxx_ioctl(void *, u_long, caddr_t, int, struct proc *); +static int vsxxx_ioctl(void *, u_long, void *, int, struct proc *); static void vsxxx_disable(void *); struct wsmouse_accessops vsxxx_accessops = { /* EXPORT */ @@ -107,7 +107,7 @@ static int vsxxx_ioctl(v, cmd, data, flag, p) void *v; u_long cmd; - caddr_t data; + void *data; int flag; struct proc *p; { diff --git a/sys/dev/dksubr.c b/sys/dev/dksubr.c index dc2e8d4a778..df96190ba56 100644 --- a/sys/dev/dksubr.c +++ b/sys/dev/dksubr.c @@ -1,4 +1,4 @@ -/* $NetBSD: dksubr.c,v 1.27 2006/11/16 01:32:45 christos Exp $ */ +/* $NetBSD: dksubr.c,v 1.28 2007/03/04 06:01:41 christos Exp $ */ /*- * Copyright (c) 1996, 1997, 1998, 1999, 2002 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: dksubr.c,v 1.27 2006/11/16 01:32:45 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dksubr.c,v 1.28 2007/03/04 06:01:41 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -297,7 +297,7 @@ dk_size(struct dk_intf *di, struct dk_softc *dksc, dev_t dev) int dk_ioctl(struct dk_intf *di, struct dk_softc *dksc, dev_t dev, - u_long cmd, caddr_t data, int flag, struct lwp *l) + u_long cmd, void *data, int flag, struct lwp *l) { struct disklabel *lp; struct disk *dk; @@ -516,7 +516,7 @@ static volatile int dk_dumping = 0; /* ARGSUSED */ int dk_dump(struct dk_intf *di, struct dk_softc *dksc, dev_t dev, - daddr_t blkno, caddr_t va, size_t size) + daddr_t blkno, void *va, size_t size) { /* diff --git a/sys/dev/dkvar.h b/sys/dev/dkvar.h index 2f31a2c857a..345ec30eab4 100644 --- a/sys/dev/dkvar.h +++ b/sys/dev/dkvar.h @@ -1,4 +1,4 @@ -/* $NetBSD: dkvar.h,v 1.9 2005/12/11 12:20:53 christos Exp $ */ +/* $NetBSD: dkvar.h,v 1.10 2007/03/04 06:01:41 christos Exp $ */ /*- * Copyright (c) 2002 The NetBSD Foundation, Inc. @@ -111,9 +111,9 @@ void dk_start(struct dk_intf *, struct dk_softc *); void dk_iodone(struct dk_intf *, struct dk_softc *); int dk_size(struct dk_intf *, struct dk_softc *, dev_t); int dk_ioctl(struct dk_intf *, struct dk_softc *, dev_t, - u_long, caddr_t, int, struct lwp *); + u_long, void *, int, struct lwp *); int dk_dump(struct dk_intf *, struct dk_softc *, dev_t, - daddr_t, caddr_t, size_t); + daddr_t, void *, size_t); void dk_getdisklabel(struct dk_intf *, struct dk_softc *, dev_t); void dk_getdefaultlabel(struct dk_intf *, struct dk_softc *, struct disklabel *); diff --git a/sys/dev/dkwedge/dk.c b/sys/dev/dkwedge/dk.c index 776dea54901..739e614252f 100644 --- a/sys/dev/dkwedge/dk.c +++ b/sys/dev/dkwedge/dk.c @@ -1,4 +1,4 @@ -/* $NetBSD: dk.c,v 1.21 2007/02/15 16:04:12 yamt Exp $ */ +/* $NetBSD: dk.c,v 1.22 2007/03/04 06:01:45 christos Exp $ */ /*- * Copyright (c) 2004 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: dk.c,v 1.21 2007/02/15 16:04:12 yamt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dk.c,v 1.22 2007/03/04 06:01:45 christos Exp $"); #include "opt_dkwedge.h" @@ -1165,7 +1165,7 @@ dkwrite(dev_t dev, struct uio *uio, int flags) * Perform an ioctl request on a wedge. */ static int -dkioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct lwp *l) +dkioctl(dev_t dev, u_long cmd, void *data, int flag, struct lwp *l) { struct dkwedge_softc *sc = dkwedge_lookup(dev); int error = 0; @@ -1251,7 +1251,7 @@ dksize(dev_t dev) * Perform a crash dump to a wedge. */ static int -dkdump(dev_t dev, daddr_t blkno, caddr_t va, +dkdump(dev_t dev, daddr_t blkno, void *va, size_t size) { diff --git a/sys/dev/dkwedge/dkwedge_bsdlabel.c b/sys/dev/dkwedge/dkwedge_bsdlabel.c index 38ae5eea99c..154a05aaaf6 100644 --- a/sys/dev/dkwedge/dkwedge_bsdlabel.c +++ b/sys/dev/dkwedge/dkwedge_bsdlabel.c @@ -1,4 +1,4 @@ -/* $NetBSD: dkwedge_bsdlabel.c,v 1.11 2007/03/01 21:38:17 martin Exp $ */ +/* $NetBSD: dkwedge_bsdlabel.c,v 1.12 2007/03/04 06:01:45 christos Exp $ */ /*- * Copyright (c) 2004 The NetBSD Foundation, Inc. @@ -86,7 +86,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: dkwedge_bsdlabel.c,v 1.11 2007/03/01 21:38:17 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dkwedge_bsdlabel.c,v 1.12 2007/03/04 06:01:45 christos Exp $"); #include <sys/param.h> #ifdef _KERNEL @@ -226,7 +226,7 @@ static int validate_label(mbr_args_t *a, daddr_t label_sector, size_t label_offset) { struct disklabel *lp; - caddr_t lp_lim; + void *lp_lim; int i, error; u_int checksum; @@ -244,11 +244,11 @@ validate_label(mbr_args_t *a, daddr_t label_sector, size_t label_offset) * in the sector. */ lp = a->buf; - lp_lim = (caddr_t)a->buf + DEV_BSIZE - DISKLABEL_MINSIZE; - for (;; lp = (void *)((caddr_t)lp + sizeof(uint32_t))) { - if ((caddr_t)lp > lp_lim) + lp_lim = (char *)a->buf + DEV_BSIZE - DISKLABEL_MINSIZE; + for (;; lp = (void *)((char *)lp + sizeof(uint32_t))) { + if ((char *)lp > (char *)lp_lim) return (SCAN_CONTINUE); - label_offset = (size_t)((caddr_t)lp - (caddr_t)a->buf); + label_offset = (size_t)((char *)lp - (char *)a->buf); if (lp->d_magic != DISKMAGIC || lp->d_magic2 != DISKMAGIC) { if (lp->d_magic == bswap32(DISKMAGIC) && lp->d_magic2 == bswap32(DISKMAGIC)) { @@ -256,9 +256,9 @@ validate_label(mbr_args_t *a, daddr_t label_sector, size_t label_offset) * Label is in the other byte order; validate * its length, then byte-swap it. */ - if ((caddr_t)lp + + if ((char *)lp + DISKLABEL_SIZE(bswap16(lp->d_npartitions)) > - (caddr_t)a->buf + DEV_BSIZE) { + (char *)a->buf + DEV_BSIZE) { aprint_error("%s: BSD disklabel @ " "%" PRId64 "+%zd has bogus partition " @@ -276,8 +276,8 @@ validate_label(mbr_args_t *a, daddr_t label_sector, size_t label_offset) /* * Validate the disklabel length. */ - if ((caddr_t)lp + DISKLABEL_SIZE(lp->d_npartitions) > - (caddr_t)a->buf + DEV_BSIZE) { + if ((char *)lp + DISKLABEL_SIZE(lp->d_npartitions) > + (char *)a->buf + DEV_BSIZE) { aprint_error("%s: BSD disklabel @ %" PRId64 "+%zd has bogus partition count (%u)\n", a->pdk->dk_name, label_sector, diff --git a/sys/dev/dkwedge/dkwedge_gpt.c b/sys/dev/dkwedge/dkwedge_gpt.c index d00cf0e5508..b4b3f8cede5 100644 --- a/sys/dev/dkwedge/dkwedge_gpt.c +++ b/sys/dev/dkwedge/dkwedge_gpt.c @@ -1,4 +1,4 @@ -/* $NetBSD: dkwedge_gpt.c,v 1.5 2006/09/13 00:48:03 christos Exp $ */ +/* $NetBSD: dkwedge_gpt.c,v 1.6 2007/03/04 06:01:45 christos Exp $ */ /*- * Copyright (c) 2004 The NetBSD Foundation, Inc. @@ -41,7 +41,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: dkwedge_gpt.c,v 1.5 2006/09/13 00:48:03 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dkwedge_gpt.c,v 1.6 2007/03/04 06:01:45 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -237,7 +237,7 @@ dkwedge_discover_gpt(struct disk *pdk, struct vnode *vp) int j; char ptype_guid_str[UUID_STR_LEN], ent_guid_str[UUID_STR_LEN]; - ent = (struct gpt_ent *)((caddr_t)buf + (i * entsz)); + ent = (struct gpt_ent *)((char *)buf + (i * entsz)); uuid_dec_le(ent->ent_type, &ptype_guid); if (memcmp(&ptype_guid, &ent_type_unused, diff --git a/sys/dev/eisa/ahb.c b/sys/dev/eisa/ahb.c index 56138a97722..61f95b7281f 100644 --- a/sys/dev/eisa/ahb.c +++ b/sys/dev/eisa/ahb.c @@ -1,4 +1,4 @@ -/* $NetBSD: ahb.c,v 1.47 2006/11/16 01:32:50 christos Exp $ */ +/* $NetBSD: ahb.c,v 1.48 2007/03/04 06:01:46 christos Exp $ */ /*- * Copyright (c) 1997, 1998 The NetBSD Foundation, Inc. @@ -53,7 +53,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ahb.c,v 1.47 2006/11/16 01:32:50 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ahb.c,v 1.48 2007/03/04 06:01:46 christos Exp $"); #include "opt_ddb.h" @@ -720,7 +720,7 @@ ahb_init(struct ahb_softc *sc) return (error); } if ((error = bus_dmamem_map(sc->sc_dmat, &seg, rseg, - ECBSIZE, (caddr_t *)&sc->sc_ecbs, + ECBSIZE, (void **)&sc->sc_ecbs, BUS_DMA_NOWAIT|BUS_DMA_COHERENT)) != 0) { printf("%s: unable to map ecbs, error = %d\n", sc->sc_dev.dv_xname, error); diff --git a/sys/dev/eisa/cac_eisa.c b/sys/dev/eisa/cac_eisa.c index 26a392a6382..e9630c0193a 100644 --- a/sys/dev/eisa/cac_eisa.c +++ b/sys/dev/eisa/cac_eisa.c @@ -1,4 +1,4 @@ -/* $NetBSD: cac_eisa.c,v 1.16 2006/11/28 20:29:14 ad Exp $ */ +/* $NetBSD: cac_eisa.c,v 1.17 2007/03/04 06:01:46 christos Exp $ */ /*- * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -68,7 +68,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: cac_eisa.c,v 1.16 2006/11/28 20:29:14 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cac_eisa.c,v 1.17 2007/03/04 06:01:46 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -234,7 +234,8 @@ cac_eisa_l0_submit(struct cac_softc *sc, struct cac_ccb *ccb) size = le16toh(ccb->ccb_hdr.size) << 2; ccb->ccb_hdr.size = 0; - bus_dmamap_sync(sc->sc_dmat, sc->sc_dmamap, (caddr_t)ccb - sc->sc_ccbs, + bus_dmamap_sync(sc->sc_dmat, sc->sc_dmamap, + (char *)ccb - (char *)sc->sc_ccbs, sizeof(struct cac_ccb), BUS_DMASYNC_PREWRITE | BUS_DMASYNC_PREREAD); cac_outb(sc, CAC_EISAREG_SYSTEM_DOORBELL, CAC_EISA_CHANNEL_CLEAR); @@ -263,7 +264,7 @@ cac_eisa_l0_completed(struct cac_softc *sc) return (NULL); off = (off & ~3) - sc->sc_ccbs_paddr; - ccb = (struct cac_ccb *)(sc->sc_ccbs + off); + ccb = (struct cac_ccb *)((char *)sc->sc_ccbs + off); bus_dmamap_sync(sc->sc_dmat, sc->sc_dmamap, off, sizeof(struct cac_ccb), BUS_DMASYNC_POSTWRITE | BUS_DMASYNC_POSTREAD); diff --git a/sys/dev/eisa/if_fea.c b/sys/dev/eisa/if_fea.c index 9139c11f587..aa95cc8d0b9 100644 --- a/sys/dev/eisa/if_fea.c +++ b/sys/dev/eisa/if_fea.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_fea.c,v 1.33 2006/11/16 01:32:50 christos Exp $ */ +/* $NetBSD: if_fea.c,v 1.34 2007/03/04 06:01:46 christos Exp $ */ /*- * Copyright (c) 1995, 1996 Matt Thomas <matt@3am-software.com> @@ -33,7 +33,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_fea.c,v 1.33 2006/11/16 01:32:50 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_fea.c,v 1.34 2007/03/04 06:01:46 christos Exp $"); #include "opt_inet.h" @@ -310,7 +310,7 @@ pdq_eisa_attach( return -1; } - bcopy((caddr_t) sc->sc_pdq->pdq_hwaddr.lanaddr_bytes, sc->sc_ac.ac_enaddr, 6); + bcopy((void *) sc->sc_pdq->pdq_hwaddr.lanaddr_bytes, sc->sc_ac.ac_enaddr, 6); pdq_ifattach(sc, pdq_eisa_ifwatchdog); ed->kdc->kdc_state = DC_BUSY; /* host adapters always busy */ @@ -382,7 +382,7 @@ pdq_eisa_probe( /* EISA bus masters don't use host DMA channels */ ia->ia_drq = DRQNONE; - ia->ia_maddr = (caddr_t) maddr; + ia->ia_maddr = (void *) maddr; ia->ia_msize = msiz; return 1; } @@ -413,7 +413,7 @@ pdq_eisa_attach( return; } - bcopy((caddr_t) sc->sc_pdq->pdq_hwaddr.lanaddr_bytes, sc->sc_ac.ac_enaddr, 6); + bcopy((void *) sc->sc_pdq->pdq_hwaddr.lanaddr_bytes, sc->sc_ac.ac_enaddr, 6); pdq_ifattach(sc, pdq_eisa_ifwatchdog); diff --git a/sys/dev/fss.c b/sys/dev/fss.c index 9b054c2180f..120184c5d3d 100644 --- a/sys/dev/fss.c +++ b/sys/dev/fss.c @@ -1,4 +1,4 @@ -/* $NetBSD: fss.c,v 1.31 2007/02/15 15:40:51 ad Exp $ */ +/* $NetBSD: fss.c,v 1.32 2007/03/04 06:01:42 christos Exp $ */ /*- * Copyright (c) 2003 The NetBSD Foundation, Inc. @@ -43,7 +43,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: fss.c,v 1.31 2007/02/15 15:40:51 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: fss.c,v 1.32 2007/03/04 06:01:42 christos Exp $"); #include "fss.h" @@ -139,7 +139,7 @@ static void fss_cluster_iodone(struct buf *); static void fss_read_cluster(struct fss_softc *, u_int32_t); static void fss_bs_thread(void *); static int fss_bs_io(struct fss_softc *, fss_io_type, - u_int32_t, off_t, int, caddr_t); + u_int32_t, off_t, int, void *); static u_int32_t *fss_bs_indir(struct fss_softc *, u_int32_t); const struct bdevsw fss_bdevsw = { @@ -262,7 +262,7 @@ fss_write(dev_t dev, struct uio *uio, int flags) } int -fss_ioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct lwp *l) +fss_ioctl(dev_t dev, u_long cmd, void *data, int flag, struct lwp *l) { int error; struct fss_softc *sc; @@ -346,7 +346,7 @@ fss_size(dev_t dev) } int -fss_dump(dev_t dev, daddr_t blkno, caddr_t va, +fss_dump(dev_t dev, daddr_t blkno, void *va, size_t size) { return EROFS; @@ -841,7 +841,7 @@ static void fss_read_cluster(struct fss_softc *sc, u_int32_t cl) { int s, todo, len; - caddr_t addr; + char *addr; daddr_t dblk; struct buf *bp; struct fss_cache *scp, *scl; @@ -890,7 +890,7 @@ restart: addr = scp->fc_data; if (cl == sc->sc_clcount-1) { todo = sc->sc_clresid; - memset(addr+todo, 0, FSS_CLSIZE(sc)-todo); + memset((char *)addr + todo, 0, FSS_CLSIZE(sc) - todo); } else todo = FSS_CLSIZE(sc); while (todo > 0) { @@ -943,7 +943,7 @@ restart: */ static int fss_bs_io(struct fss_softc *sc, fss_io_type rw, - u_int32_t cl, off_t off, int len, caddr_t data) + u_int32_t cl, off_t off, int len, void *data) { int error; @@ -983,7 +983,7 @@ fss_bs_indir(struct fss_softc *sc, u_int32_t cl) if (sc->sc_indir_dirty) { FSS_STAT_INC(sc, indir_write); if (fss_bs_io(sc, FSS_WRITE, sc->sc_indir_cur, 0, - FSS_CLSIZE(sc), (caddr_t)sc->sc_indir_data) != 0) + FSS_CLSIZE(sc), (void *)sc->sc_indir_data) != 0) return NULL; setbit(sc->sc_indir_valid, sc->sc_indir_cur); } @@ -994,7 +994,7 @@ fss_bs_indir(struct fss_softc *sc, u_int32_t cl) if (isset(sc->sc_indir_valid, sc->sc_indir_cur)) { FSS_STAT_INC(sc, indir_read); if (fss_bs_io(sc, FSS_READ, sc->sc_indir_cur, 0, - FSS_CLSIZE(sc), (caddr_t)sc->sc_indir_data) != 0) + FSS_CLSIZE(sc), (void *)sc->sc_indir_data) != 0) return NULL; } else memset(sc->sc_indir_data, 0, FSS_CLSIZE(sc)); @@ -1012,7 +1012,7 @@ fss_bs_thread(void *arg) { int error, len, nfreed, nio, s; long off; - caddr_t addr; + char *addr; u_int32_t c, cl, ch, *indirp; struct buf *bp, *nbp; struct fss_softc *sc; @@ -1212,7 +1212,7 @@ fss_bs_thread(void *arg) scp->fc_cluster == c) break; if (scp < scl) - memcpy(addr, scp->fc_data+off, len); + memcpy(addr, (char *)scp->fc_data+off, len); else memset(addr, 0, len); continue; diff --git a/sys/dev/fssvar.h b/sys/dev/fssvar.h index d4d90f01af5..434e466ddb6 100644 --- a/sys/dev/fssvar.h +++ b/sys/dev/fssvar.h @@ -1,4 +1,4 @@ -/* $NetBSD: fssvar.h,v 1.14 2007/02/15 15:40:51 ad Exp $ */ +/* $NetBSD: fssvar.h,v 1.15 2007/03/04 06:01:42 christos Exp $ */ /*- * Copyright (c) 2003, 2007 The NetBSD Foundation, Inc. @@ -138,7 +138,7 @@ struct fss_cache { struct fss_softc *fc_softc; /* Backlink to our softc */ volatile int fc_xfercount; /* Number of outstanding transfers */ u_int32_t fc_cluster; /* Cluster number of this entry */ - caddr_t fc_data; /* Data */ + void * fc_data; /* Data */ }; struct fss_softc { diff --git a/sys/dev/gpib/cs80bus.c b/sys/dev/gpib/cs80bus.c index 633569dfad5..71be4c94e2e 100644 --- a/sys/dev/gpib/cs80bus.c +++ b/sys/dev/gpib/cs80bus.c @@ -1,4 +1,4 @@ -/* $NetBSD: cs80bus.c,v 1.8 2007/01/10 21:18:44 cube Exp $ */ +/* $NetBSD: cs80bus.c,v 1.9 2007/03/04 06:01:46 christos Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: cs80bus.c,v 1.8 2007/01/10 21:18:44 cube Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cs80bus.c,v 1.9 2007/03/04 06:01:46 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -342,7 +342,7 @@ cs80status(v, slave, punit, css) rs.c_sram = CS80CMD_SRAM; rs.c_param = 0; /* single vector (i.e. sector number) */ rs.c_cmd = CS80CMD_STATUS; - memset((caddr_t)css, 0, sizeof(*css)); + memset((void *)css, 0, sizeof(*css)); (void) gpibsend(sc->sc_ic, slave, CS80CMD_SCMD, &rs, sizeof(rs)); (void) gpibrecv(sc->sc_ic, slave, CS80CMD_EXEC, css, sizeof(*css)); (void) gpibrecv(sc->sc_ic, slave, CS80CMD_QSTAT, &stat, 1); diff --git a/sys/dev/gpib/ct.c b/sys/dev/gpib/ct.c index 4ca29fc425e..0d12077fe1a 100644 --- a/sys/dev/gpib/ct.c +++ b/sys/dev/gpib/ct.c @@ -1,4 +1,4 @@ -/* $NetBSD: ct.c,v 1.9 2007/01/13 18:46:37 cube Exp $ */ +/* $NetBSD: ct.c,v 1.10 2007/03/04 06:01:46 christos Exp $ */ /*- * Copyright (c) 1996-2003 The NetBSD Foundation, Inc. @@ -128,7 +128,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ct.c,v 1.9 2007/01/13 18:46:37 cube Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ct.c,v 1.10 2007/03/04 06:01:46 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -914,7 +914,7 @@ ctioctl(dev, cmd, data, flag, l) dev_t dev; u_long cmd; int flag; - caddr_t data; + void *data; struct lwp *l; { struct mtop *op; diff --git a/sys/dev/gpib/gpib.c b/sys/dev/gpib/gpib.c index 9fe5bbcb559..52efb041dfc 100644 --- a/sys/dev/gpib/gpib.c +++ b/sys/dev/gpib/gpib.c @@ -1,4 +1,4 @@ -/* $NetBSD: gpib.c,v 1.9 2007/01/13 18:46:37 cube Exp $ */ +/* $NetBSD: gpib.c,v 1.10 2007/03/04 06:01:46 christos Exp $ */ /*- * Copyright (c) 2003 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: gpib.c,v 1.9 2007/01/13 18:46:37 cube Exp $"); +__KERNEL_RCSID(0, "$NetBSD: gpib.c,v 1.10 2007/03/04 06:01:46 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -602,7 +602,7 @@ int gpibioctl(dev, cmd, data, flag, l) dev_t dev; u_long cmd; - caddr_t data; + void *data; int flag; struct lwp *l; { diff --git a/sys/dev/gpib/mt.c b/sys/dev/gpib/mt.c index fa76c4e3805..0133a034235 100644 --- a/sys/dev/gpib/mt.c +++ b/sys/dev/gpib/mt.c @@ -1,4 +1,4 @@ -/* $NetBSD: mt.c,v 1.8 2007/02/15 18:33:26 reinoud Exp $ */ +/* $NetBSD: mt.c,v 1.9 2007/03/04 06:01:46 christos Exp $ */ /*- * Copyright (c) 1996-2003 The NetBSD Foundation, Inc. @@ -121,7 +121,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: mt.c,v 1.8 2007/02/15 18:33:26 reinoud Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mt.c,v 1.9 2007/03/04 06:01:46 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -407,7 +407,7 @@ mtopen(dev, flag, mode, l) goto errout; if (!(sc->sc_flags & MTF_REW)) break; - if (tsleep((caddr_t) &lbolt, PCATCH | (PZERO + 1), + if (tsleep((void *) &lbolt, PCATCH | (PZERO + 1), "mt", 0) != 0) { error = EINTR; goto errout; @@ -1051,7 +1051,7 @@ int mtioctl(dev, cmd, data, flag, l) dev_t dev; u_long cmd; - caddr_t data; + void *data; int flag; struct lwp *l; { diff --git a/sys/dev/gpib/ppi.c b/sys/dev/gpib/ppi.c index 91ba05fe249..5966ffd6f90 100644 --- a/sys/dev/gpib/ppi.c +++ b/sys/dev/gpib/ppi.c @@ -1,4 +1,4 @@ -/* $NetBSD: ppi.c,v 1.8 2007/02/16 13:42:29 ad Exp $ */ +/* $NetBSD: ppi.c,v 1.9 2007/03/04 06:01:46 christos Exp $ */ /*- * Copyright (c) 1996-2003 The NetBSD Foundation, Inc. @@ -72,7 +72,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ppi.c,v 1.8 2007/02/16 13:42:29 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ppi.c,v 1.9 2007/03/04 06:01:46 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -452,7 +452,7 @@ int ppiioctl(dev, cmd, data, flag, l) dev_t dev; u_long cmd; - caddr_t data; + void *data; int flag; struct lwp *l; { diff --git a/sys/dev/gpib/rd.c b/sys/dev/gpib/rd.c index 9bd22164c8b..98199dc13cf 100644 --- a/sys/dev/gpib/rd.c +++ b/sys/dev/gpib/rd.c @@ -1,4 +1,4 @@ -/* $NetBSD: rd.c,v 1.14 2007/01/13 18:46:37 cube Exp $ */ +/* $NetBSD: rd.c,v 1.15 2007/03/04 06:01:46 christos Exp $ */ /*- * Copyright (c) 1996-2003 The NetBSD Foundation, Inc. @@ -118,7 +118,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: rd.c,v 1.14 2007/01/13 18:46:37 cube Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rd.c,v 1.15 2007/03/04 06:01:46 christos Exp $"); #include "rnd.h" @@ -535,7 +535,7 @@ rdopen(dev, flags, mode, l) sc->sc_flags |= RDF_OPENING; error = rdgetinfo(sc); sc->sc_flags &= ~RDF_OPENING; - wakeup((caddr_t)sc); + wakeup((void *)sc); if (error) return (error); } @@ -601,7 +601,7 @@ rdclose(dev, flag, mode, l) } splx(s); sc->sc_flags &= ~(RDF_CLOSING | RDF_WLABEL); - wakeup((caddr_t)sc); + wakeup((void *)sc); } return (0); } @@ -721,7 +721,7 @@ rdfinish(sc, bp) sc->sc_active = 0; if (sc->sc_flags & RDF_WANTED) { sc->sc_flags &= ~RDF_WANTED; - wakeup((caddr_t)&sc->sc_tab); + wakeup((void *)&sc->sc_tab); } return (NULL); } @@ -1035,7 +1035,7 @@ int rdioctl(dev, cmd, data, flag, l) dev_t dev; u_long cmd; - caddr_t data; + void *data; int flag; struct lwp *l; { @@ -1106,7 +1106,7 @@ rdgetdefaultlabel(sc, lp) { int type = sc->sc_type; - memset((caddr_t)lp, 0, sizeof(struct disklabel)); + memset((void *)lp, 0, sizeof(struct disklabel)); lp->d_type = DTYPE_GPIB; lp->d_secsize = DEV_BSIZE; @@ -1171,7 +1171,7 @@ int rddump(dev, blkno, va, size) dev_t dev; daddr_t blkno; - caddr_t va; + void *va; size_t size; { struct rd_softc *sc; diff --git a/sys/dev/gpio/gpio.c b/sys/dev/gpio/gpio.c index be04e4788b0..d82e49ea5f2 100644 --- a/sys/dev/gpio/gpio.c +++ b/sys/dev/gpio/gpio.c @@ -1,4 +1,4 @@ -/* $NetBSD: gpio.c,v 1.11 2006/11/16 01:32:50 christos Exp $ */ +/* $NetBSD: gpio.c,v 1.12 2007/03/04 06:01:46 christos Exp $ */ /* $OpenBSD: gpio.c,v 1.6 2006/01/14 12:33:49 grange Exp $ */ /* @@ -18,7 +18,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: gpio.c,v 1.11 2006/11/16 01:32:50 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: gpio.c,v 1.12 2007/03/04 06:01:46 christos Exp $"); /* * General Purpose Input/Output framework. @@ -283,7 +283,7 @@ gpioclose(dev_t dev, int flag, int mode, } int -gpioioctl(dev_t dev, u_long cmd, caddr_t data, int flag, +gpioioctl(dev_t dev, u_long cmd, void *data, int flag, struct lwp *l) { struct gpio_softc *sc; diff --git a/sys/dev/hpc/apm/apmdev.c b/sys/dev/hpc/apm/apmdev.c index dea3f214a2b..0ab7e3c936c 100644 --- a/sys/dev/hpc/apm/apmdev.c +++ b/sys/dev/hpc/apm/apmdev.c @@ -1,4 +1,4 @@ -/* $NetBSD: apmdev.c,v 1.9 2006/11/16 01:32:50 christos Exp $ */ +/* $NetBSD: apmdev.c,v 1.10 2007/03/04 06:01:47 christos Exp $ */ /*- * Copyright (c) 1996, 1997 The NetBSD Foundation, Inc. @@ -40,7 +40,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: apmdev.c,v 1.9 2006/11/16 01:32:50 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: apmdev.c,v 1.10 2007/03/04 06:01:47 christos Exp $"); #ifdef _KERNEL_OPT #include "opt_apmdev.h" @@ -841,7 +841,7 @@ apmdevclose(dev_t dev, int flag, int mode, } int -apmdevioctl(dev_t dev, u_long cmd, caddr_t data, int flag, +apmdevioctl(dev_t dev, u_long cmd, void *data, int flag, struct lwp *l) { struct apm_softc *sc = apmdev_cd.cd_devs[APMUNIT(dev)]; diff --git a/sys/dev/hpc/biconsdev.c b/sys/dev/hpc/biconsdev.c index 42f10053725..abec866f64b 100644 --- a/sys/dev/hpc/biconsdev.c +++ b/sys/dev/hpc/biconsdev.c @@ -1,4 +1,4 @@ -/* $NetBSD: biconsdev.c,v 1.17 2006/10/01 19:28:43 elad Exp $ */ +/* $NetBSD: biconsdev.c,v 1.18 2007/03/04 06:01:46 christos Exp $ */ /*- * Copyright (c) 1999-2001 @@ -67,7 +67,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: biconsdev.c,v 1.17 2006/10/01 19:28:43 elad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: biconsdev.c,v 1.18 2007/03/04 06:01:46 christos Exp $"); #include "biconsdev.h" #include <sys/param.h> @@ -156,7 +156,7 @@ biconsdev_output(struct tty *tp) if (tp->t_outq.c_cc <= tp->t_lowat) { if (tp->t_state&TS_ASLEEP) { tp->t_state &= ~TS_ASLEEP; - wakeup((caddr_t)&tp->t_outq); + wakeup((void *)&tp->t_outq); } selwakeup(&tp->t_wsel); } @@ -240,7 +240,7 @@ biconsdevtty(dev_t dev) } int -biconsdevioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct lwp *l) +biconsdevioctl(dev_t dev, u_long cmd, void *data, int flag, struct lwp *l) { struct tty *tp = &biconsdev_tty[0]; int error; diff --git a/sys/dev/hpc/bivideo.c b/sys/dev/hpc/bivideo.c index 7c7be1a1bcd..91aeb04b002 100644 --- a/sys/dev/hpc/bivideo.c +++ b/sys/dev/hpc/bivideo.c @@ -1,4 +1,4 @@ -/* $NetBSD: bivideo.c,v 1.25 2006/10/10 23:09:21 he Exp $ */ +/* $NetBSD: bivideo.c,v 1.26 2007/03/04 06:01:46 christos Exp $ */ /*- * Copyright (c) 1999-2001 @@ -35,7 +35,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: bivideo.c,v 1.25 2006/10/10 23:09:21 he Exp $"); +__KERNEL_RCSID(0, "$NetBSD: bivideo.c,v 1.26 2007/03/04 06:01:46 christos Exp $"); #ifdef _KERNEL_OPT #include "opt_hpcfb.h" @@ -81,7 +81,7 @@ int bivideo_dont_attach = 0; */ int bivideomatch(struct device *, struct cfdata *, void *); void bivideoattach(struct device *, struct device *, void *); -int bivideo_ioctl(void *, u_long, caddr_t, int, struct lwp *); +int bivideo_ioctl(void *, u_long, void *, int, struct lwp *); paddr_t bivideo_mmap(void *, off_t, int); struct bivideo_softc { @@ -374,7 +374,7 @@ bivideo_update_powerstate(struct bivideo_softc *sc, int updates) } int -bivideo_ioctl(void *v, u_long cmd, caddr_t data, int flag, struct lwp *l) +bivideo_ioctl(void *v, u_long cmd, void *data, int flag, struct lwp *l) { struct bivideo_softc *sc = (struct bivideo_softc *)v; struct hpcfb_fbconf *fbconf; diff --git a/sys/dev/hpc/btnmgr.c b/sys/dev/hpc/btnmgr.c index 31cc8083563..b5791cf27be 100644 --- a/sys/dev/hpc/btnmgr.c +++ b/sys/dev/hpc/btnmgr.c @@ -1,4 +1,4 @@ -/* $NetBSD: btnmgr.c,v 1.20 2006/11/16 01:32:50 christos Exp $ */ +/* $NetBSD: btnmgr.c,v 1.21 2007/03/04 06:01:46 christos Exp $ */ /*- * Copyright (c) 1999 @@ -35,7 +35,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: btnmgr.c,v 1.20 2006/11/16 01:32:50 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: btnmgr.c,v 1.21 2007/03/04 06:01:46 christos Exp $"); #ifdef _KERNEL_OPT #include "opt_btnmgr.h" @@ -110,7 +110,7 @@ const struct cdevsw btnmgr_cdevsw = { /* wskbd accessopts */ int btnmgr_wskbd_enable(void *, int); void btnmgr_wskbd_set_leds(void *, int); -int btnmgr_wskbd_ioctl(void *, u_long, caddr_t, int, struct lwp *); +int btnmgr_wskbd_ioctl(void *, u_long, void *, int, struct lwp *); const struct wskbd_accessops btnmgr_wskbd_accessops = { btnmgr_wskbd_enable, @@ -279,7 +279,7 @@ btnmgr_wskbd_set_leds(void *scx, int leds) } int -btnmgr_wskbd_ioctl(void *scx, u_long cmd, caddr_t data, int flag, +btnmgr_wskbd_ioctl(void *scx, u_long cmd, void *data, int flag, struct lwp *l) { #ifdef WSDISPLAY_COMPAT_RAWKBD @@ -333,7 +333,7 @@ btnmgrwrite(dev_t dev, struct uio *uio, int flag) } int -btnmgrioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct lwp *l) +btnmgrioctl(dev_t dev, u_long cmd, void *data, int flag, struct lwp *l) { return (EINVAL); } diff --git a/sys/dev/hpc/hpcfb.c b/sys/dev/hpc/hpcfb.c index c2cdb9f42c7..c8cc20750ff 100644 --- a/sys/dev/hpc/hpcfb.c +++ b/sys/dev/hpc/hpcfb.c @@ -1,4 +1,4 @@ -/* $NetBSD: hpcfb.c,v 1.40 2006/11/16 01:32:50 christos Exp $ */ +/* $NetBSD: hpcfb.c,v 1.41 2007/03/04 06:01:46 christos Exp $ */ /*- * Copyright (c) 1999 @@ -43,7 +43,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: hpcfb.c,v 1.40 2006/11/16 01:32:50 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: hpcfb.c,v 1.41 2007/03/04 06:01:46 christos Exp $"); #ifdef _KERNEL_OPT #include "opt_hpcfb.h" @@ -180,7 +180,7 @@ int hpcfbmatch(struct device *, struct cfdata *, void *); void hpcfbattach(struct device *, struct device *, void *); int hpcfbprint(void *, const char *); -int hpcfb_ioctl(void *, void *, u_long, caddr_t, int, struct lwp *); +int hpcfb_ioctl(void *, void *, u_long, void *, int, struct lwp *); paddr_t hpcfb_mmap(void *, void *, off_t, int); void hpcfb_refresh_screen(struct hpcfb_softc *); @@ -443,7 +443,7 @@ hpcfb_init(struct hpcfb_fbconf *fbconf, struct hpcfb_devconfig *dc) ri = &dc->dc_rinfo; memset(ri, 0, sizeof(struct rasops_info)); ri->ri_depth = fbconf->hf_pixel_width; - ri->ri_bits = (caddr_t)fbaddr; + ri->ri_bits = (void *)fbaddr; ri->ri_width = fbconf->hf_width; ri->ri_height = fbconf->hf_height; ri->ri_stride = fbconf->hf_bytes_per_line; @@ -554,7 +554,7 @@ hpcfb_cmap_reorder(struct hpcfb_fbconf *fbconf, struct hpcfb_devconfig *dc) } int -hpcfb_ioctl(void *v, void *vs, u_long cmd, caddr_t data, int flag, +hpcfb_ioctl(void *v, void *vs, u_long cmd, void *data, int flag, struct lwp *l) { struct hpcfb_softc *sc = v; diff --git a/sys/dev/hpc/hpcfbvar.h b/sys/dev/hpc/hpcfbvar.h index f8d567e765b..76381984667 100644 --- a/sys/dev/hpc/hpcfbvar.h +++ b/sys/dev/hpc/hpcfbvar.h @@ -1,4 +1,4 @@ -/* $NetBSD: hpcfbvar.h,v 1.3 2005/12/11 12:21:22 christos Exp $ */ +/* $NetBSD: hpcfbvar.h,v 1.4 2007/03/04 06:01:47 christos Exp $ */ /*- * Copyright (c) 1999 @@ -40,7 +40,7 @@ * video access functions (must be provided by all video). */ struct hpcfb_accessops { - int (*ioctl)(void *, u_long, caddr_t, int, struct lwp *); + int (*ioctl)(void *, u_long, void *, int, struct lwp *); paddr_t (*mmap)(void *, off_t, int); void (*cursor)(void *, int, int, int, int, int); void (*bitblit)(void *, int, int, int, int, int, int); diff --git a/sys/dev/hpc/hpckbd.c b/sys/dev/hpc/hpckbd.c index 43b6c76a4a6..3414a9508c5 100644 --- a/sys/dev/hpc/hpckbd.c +++ b/sys/dev/hpc/hpckbd.c @@ -1,4 +1,4 @@ -/* $NetBSD: hpckbd.c,v 1.21 2007/01/29 01:52:44 hubertf Exp $ */ +/* $NetBSD: hpckbd.c,v 1.22 2007/03/04 06:01:47 christos Exp $ */ /*- * Copyright (c) 1999-2001 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: hpckbd.c,v 1.21 2007/01/29 01:52:44 hubertf Exp $"); +__KERNEL_RCSID(0, "$NetBSD: hpckbd.c,v 1.22 2007/03/04 06:01:47 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -117,7 +117,7 @@ CFATTACH_DECL(hpckbd, sizeof(struct hpckbd_softc), /* wskbd accessopts */ int hpckbd_enable(void *, int); void hpckbd_set_leds(void *, int); -int hpckbd_ioctl(void *, u_long, caddr_t, int, struct lwp *); +int hpckbd_ioctl(void *, u_long, void *, int, struct lwp *); /* consopts */ struct hpckbd_core hpckbd_consdata; @@ -467,7 +467,7 @@ hpckbd_set_leds(void *arg, int leds) } int -hpckbd_ioctl(void *arg, u_long cmd, caddr_t data, int flag, +hpckbd_ioctl(void *arg, u_long cmd, void *data, int flag, struct lwp *l) { #ifdef WSDISPLAY_COMPAT_RAWKBD diff --git a/sys/dev/hpc/hpctpanel.c b/sys/dev/hpc/hpctpanel.c index 0b757fd608b..07cd03dd9ba 100644 --- a/sys/dev/hpc/hpctpanel.c +++ b/sys/dev/hpc/hpctpanel.c @@ -1,4 +1,4 @@ -/* $NetBSD: hpctpanel.c,v 1.4 2005/12/11 12:21:22 christos Exp $ */ +/* $NetBSD: hpctpanel.c,v 1.5 2007/03/04 06:01:47 christos Exp $ */ /* * Copyright (c) 1999-2003 TAKEMURA Shin All rights reserved. @@ -28,7 +28,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: hpctpanel.c,v 1.4 2005/12/11 12:21:22 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: hpctpanel.c,v 1.5 2007/03/04 06:01:47 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -41,7 +41,7 @@ __KERNEL_RCSID(0, "$NetBSD: hpctpanel.c,v 1.4 2005/12/11 12:21:22 christos Exp $ #include <machine/platid_mask.h> int -hpc_tpanel_ioctl(struct tpcalib_softc *sc, u_long cmd, caddr_t data, int flag, +hpc_tpanel_ioctl(struct tpcalib_softc *sc, u_long cmd, void *data, int flag, struct lwp *l) { struct wsmouse_id *id; diff --git a/sys/dev/hpc/hpctpanelvar.h b/sys/dev/hpc/hpctpanelvar.h index e0f9407f353..84c84bfbd4f 100644 --- a/sys/dev/hpc/hpctpanelvar.h +++ b/sys/dev/hpc/hpctpanelvar.h @@ -1,4 +1,4 @@ -/* $NetBSD: hpctpanelvar.h,v 1.2 2005/12/11 12:21:22 christos Exp $ */ +/* $NetBSD: hpctpanelvar.h,v 1.3 2007/03/04 06:01:47 christos Exp $ */ /*- * Copyright (c) 2004 The NetBSD Foundation, Inc. @@ -38,5 +38,5 @@ #include <dev/wscons/tpcalibvar.h> -int hpc_tpanel_ioctl(struct tpcalib_softc *, u_long, caddr_t, int, +int hpc_tpanel_ioctl(struct tpcalib_softc *, u_long, void *, int, struct lwp *); diff --git a/sys/dev/hpc/hpf1275a_tty.c b/sys/dev/hpc/hpf1275a_tty.c index c4db8077732..d1d4bc1a0a5 100644 --- a/sys/dev/hpc/hpf1275a_tty.c +++ b/sys/dev/hpc/hpf1275a_tty.c @@ -1,4 +1,4 @@ -/* $NetBSD: hpf1275a_tty.c,v 1.19 2006/11/16 01:32:50 christos Exp $ */ +/* $NetBSD: hpf1275a_tty.c,v 1.20 2007/03/04 06:01:47 christos Exp $ */ /* * Copyright (c) 2004 Valeriy E. Ushakov @@ -28,7 +28,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: hpf1275a_tty.c,v 1.19 2006/11/16 01:32:50 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: hpf1275a_tty.c,v 1.20 2007/03/04 06:01:47 christos Exp $"); #include "opt_wsdisplay_compat.h" @@ -83,7 +83,7 @@ static int hpf1275a_detach(struct device *, int); /* wskbd(4) accessops */ static int hpf1275a_wskbd_enable(void *, int); static void hpf1275a_wskbd_set_leds(void *, int); -static int hpf1275a_wskbd_ioctl(void *, u_long, caddr_t, int, +static int hpf1275a_wskbd_ioctl(void *, u_long, void *, int, struct lwp *); @@ -427,7 +427,7 @@ hpf1275a_wskbd_set_leds(void *self, int leds) static int -hpf1275a_wskbd_ioctl(void *self, u_long cmd, caddr_t data, int flag, +hpf1275a_wskbd_ioctl(void *self, u_long cmd, void *data, int flag, struct lwp *l) { #ifdef WSDISPLAY_COMPAT_RAWKBD diff --git a/sys/dev/i2o/dpti.c b/sys/dev/i2o/dpti.c index ba812809ec0..78399e907c6 100644 --- a/sys/dev/i2o/dpti.c +++ b/sys/dev/i2o/dpti.c @@ -1,4 +1,4 @@ -/* $NetBSD: dpti.c,v 1.32 2007/02/15 15:40:51 ad Exp $ */ +/* $NetBSD: dpti.c,v 1.33 2007/03/04 06:01:47 christos Exp $ */ /*- * Copyright (c) 2001, 2007 The NetBSD Foundation, Inc. @@ -64,7 +64,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: dpti.c,v 1.32 2007/02/15 15:40:51 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dpti.c,v 1.33 2007/03/04 06:01:47 christos Exp $"); #include "opt_i2o.h" @@ -138,10 +138,10 @@ static struct dpt_sig dpti_sig = { void dpti_attach(struct device *, struct device *, void *); int dpti_blinkled(struct dpti_softc *); -int dpti_ctlrinfo(struct dpti_softc *, int, caddr_t); +int dpti_ctlrinfo(struct dpti_softc *, int, void *); int dpti_match(struct device *, struct cfdata *, void *); -int dpti_passthrough(struct dpti_softc *, caddr_t, struct proc *); -int dpti_sysinfo(struct dpti_softc *, int, caddr_t); +int dpti_passthrough(struct dpti_softc *, void *, struct proc *); +int dpti_sysinfo(struct dpti_softc *, int, void *); dev_type_open(dptiopen); dev_type_ioctl(dptiioctl); @@ -218,7 +218,7 @@ dptiopen(dev_t dev, int flag, int mode, } int -dptiioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct lwp *l) +dptiioctl(dev_t dev, u_long cmd, void *data, int flag, struct lwp *l) { struct iop_softc *iop; struct dpti_softc *sc; @@ -261,7 +261,7 @@ dptiioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct lwp *l) i = 0; if (size == 0) { - rv = copyout(&i, *(caddr_t *)data, sizeof(i)); + rv = copyout(&i, *(void **)data, sizeof(i)); break; } @@ -288,7 +288,7 @@ dptiioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct lwp *l) if (linux) rv = dpti_passthrough(sc, data, l->l_proc); else - rv = dpti_passthrough(sc, *(caddr_t *)data, l->l_proc); + rv = dpti_passthrough(sc, *(void **)data, l->l_proc); sc->sc_nactive--; wakeup_one(&sc->sc_nactive); @@ -333,7 +333,7 @@ dpti_blinkled(struct dpti_softc *sc) } int -dpti_ctlrinfo(struct dpti_softc *sc, int size, caddr_t data) +dpti_ctlrinfo(struct dpti_softc *sc, int size, void *data) { struct dpt_ctlrinfo info; struct iop_softc *iop; @@ -354,17 +354,17 @@ dpti_ctlrinfo(struct dpti_softc *sc, int size, caddr_t data) info.hbaFlags = FLG_OSD_PCI_VALID | FLG_OSD_DMA | FLG_OSD_I2O; info.Interrupt = 10; /* XXX */ - if (size > sizeof(*data)) { + if (size > sizeof(char)) { memcpy(data, &info, min(sizeof(info), size)); rv = 0; } else - rv = copyout(&info, *(caddr_t *)data, sizeof(info)); + rv = copyout(&info, *(void **)data, sizeof(info)); return (rv); } int -dpti_sysinfo(struct dpti_softc *sc, int size, caddr_t data) +dpti_sysinfo(struct dpti_softc *sc, int size, void *data) { struct dpt_sysinfo info; int rv; @@ -439,17 +439,17 @@ dpti_sysinfo(struct dpti_softc *sc, int size, caddr_t data) /* * Copy out the info structure to the user. */ - if (size > sizeof(*data)) { + if (size > sizeof(char)) { memcpy(data, &info, min(sizeof(info), size)); rv = 0; } else - rv = copyout(&info, *(caddr_t *)data, sizeof(info)); + rv = copyout(&info, *(void **)data, sizeof(info)); return (rv); } int -dpti_passthrough(struct dpti_softc *sc, caddr_t data, struct proc *proc) +dpti_passthrough(struct dpti_softc *sc, void *data, struct proc *proc) { struct iop_softc *iop; struct i2o_msg mh, *mf; @@ -510,7 +510,7 @@ dpti_passthrough(struct dpti_softc *sc, caddr_t data, struct proc *proc) case I2O_EXEC_STATUS_GET: if ((rv = iop_status_get(iop, 0)) == 0) - rv = copyout(&iop->sc_status, data + msgsize, + rv = copyout(&iop->sc_status, (char *)data + msgsize, sizeof(iop->sc_status)); return (rv); } @@ -527,7 +527,7 @@ dpti_passthrough(struct dpti_softc *sc, caddr_t data, struct proc *proc) /* * Determine the size of the reply frame, and copy it in. */ - if ((rv = copyin(data + msgsize, &rh, sizeof(rh))) != 0) { + if ((rv = copyin((char *)data + msgsize, &rh, sizeof(rh))) != 0) { DPRINTF(("%s: reply copyin failed\n", sc->sc_dv.dv_xname)); return (rv); @@ -540,7 +540,7 @@ dpti_passthrough(struct dpti_softc *sc, caddr_t data, struct proc *proc) return (EINVAL); } - if ((rv = copyin(data + msgsize, rbtmp, repsize)) != 0) { + if ((rv = copyin((char *)data + msgsize, rbtmp, repsize)) != 0) { DPRINTF(("%s: reply too large\n", sc->sc_dv.dv_xname)); return (rv); } @@ -587,7 +587,7 @@ dpti_passthrough(struct dpti_softc *sc, caddr_t data, struct proc *proc) goto bad; } - bufs[nbuf].db_ptr = (caddr_t)p[1]; + bufs[nbuf].db_ptr = (void *)p[1]; bufs[nbuf].db_proc = proc; bufs[nbuf].db_size = p[0] & 0x00ffffff; @@ -655,7 +655,7 @@ dpti_passthrough(struct dpti_softc *sc, caddr_t data, struct proc *proc) for (i = 0, sz = 0; i < bufs[nbuf].db_nfrag; i++) { rv = copyin(bufs[nbuf].db_frags[i].iov_base, - bufs[nbuf].db_ptr + sz, + (char *)bufs[nbuf].db_ptr + sz, bufs[nbuf].db_frags[i].iov_len); if (rv != 0) { DPRINTF(("%s: frag copyin\n", @@ -714,7 +714,7 @@ dpti_passthrough(struct dpti_softc *sc, caddr_t data, struct proc *proc) /* * Copy out the reply frame. */ - if ((rv = copyout(rbtmp, data + msgsize, repsize)) != 0) { + if ((rv = copyout(rbtmp, (char *)data + msgsize, repsize)) != 0) { DPRINTF(("%s: reply copyout() failed\n", sc->sc_dv.dv_xname)); } @@ -735,7 +735,7 @@ dpti_passthrough(struct dpti_softc *sc, caddr_t data, struct proc *proc) if (!bufs[i].db_out && rv == 0) { for (j = 0, sz = 0; j < bufs[i].db_nfrag; j++) { - rv = copyout(bufs[i].db_ptr + sz, + rv = copyout((char *)bufs[i].db_ptr + sz, bufs[i].db_frags[j].iov_base, bufs[i].db_frags[j].iov_len); if (rv != 0) diff --git a/sys/dev/i2o/dptivar.h b/sys/dev/i2o/dptivar.h index c5e5ae64648..363a064f8c2 100644 --- a/sys/dev/i2o/dptivar.h +++ b/sys/dev/i2o/dptivar.h @@ -1,4 +1,4 @@ -/* $NetBSD: dptivar.h,v 1.5 2005/12/11 12:21:23 christos Exp $ */ +/* $NetBSD: dptivar.h,v 1.6 2007/03/04 06:01:47 christos Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -74,7 +74,7 @@ struct dpti_softc { }; struct dpti_ptbuf { - caddr_t db_ptr; + void * db_ptr; struct proc *db_proc; int db_size; int db_out; diff --git a/sys/dev/i2o/iop.c b/sys/dev/i2o/iop.c index 7dab521e966..fdfc3e73581 100644 --- a/sys/dev/i2o/iop.c +++ b/sys/dev/i2o/iop.c @@ -1,4 +1,4 @@ -/* $NetBSD: iop.c,v 1.63 2007/02/15 15:40:51 ad Exp $ */ +/* $NetBSD: iop.c,v 1.64 2007/03/04 06:01:47 christos Exp $ */ /*- * Copyright (c) 2000, 2001, 2002, 2007 The NetBSD Foundation, Inc. @@ -41,7 +41,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: iop.c,v 1.63 2007/02/15 15:40:51 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: iop.c,v 1.64 2007/03/04 06:01:47 christos Exp $"); #include "opt_i2o.h" #include "iop.h" @@ -1670,7 +1670,7 @@ iop_handle_reply(struct iop_softc *sc, u_int32_t rmfa) u_int off, ictx, tctx, status, size; off = (int)(rmfa - sc->sc_rep_phys); - rb = (struct i2o_reply *)(sc->sc_rep + off); + rb = (struct i2o_reply *)((char *)sc->sc_rep + off); /* Perform reply queue DMA synchronisation. */ bus_dmamap_sync(sc->sc_dmat, sc->sc_rep_dmamap, off, @@ -2516,7 +2516,7 @@ iopclose(dev_t dev, int flag, int mode, } int -iopioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct lwp *l) +iopioctl(dev_t dev, u_long cmd, void *data, int flag, struct lwp *l) { struct iop_softc *sc; struct iovec *iov; diff --git a/sys/dev/i2o/iopl.c b/sys/dev/i2o/iopl.c index 387141179b3..f07959449f3 100644 --- a/sys/dev/i2o/iopl.c +++ b/sys/dev/i2o/iopl.c @@ -1,4 +1,4 @@ -/* $NetBSD: iopl.c,v 1.23 2007/01/13 19:43:20 cube Exp $ */ +/* $NetBSD: iopl.c,v 1.24 2007/03/04 06:01:47 christos Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -46,7 +46,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: iopl.c,v 1.23 2007/01/13 19:43:20 cube Exp $"); +__KERNEL_RCSID(0, "$NetBSD: iopl.c,v 1.24 2007/03/04 06:01:47 christos Exp $"); #include "opt_i2o.h" #include "opt_inet.h" @@ -121,7 +121,7 @@ static void iopl_munge_ether(struct mbuf *, u_int8_t *); static void iopl_munge_fddi(struct mbuf *, u_int8_t *); static int iopl_init(struct ifnet *); -static int iopl_ioctl(struct ifnet *, u_long, caddr_t); +static int iopl_ioctl(struct ifnet *, u_long, void *); static void iopl_start(struct ifnet *); static void iopl_stop(struct ifnet *, int); @@ -992,7 +992,7 @@ iopl_intr_rx(struct device *dv, struct iop_msg *im, void *reply) continue; } m0->m_data += sc->sc_rx_prepad; - m_copydata(m, 0, len, mtod(m0, caddr_t) + off); + m_copydata(m, 0, len, mtod(m0, void *) + off); off = 0; } else if (!first) { /* @@ -1870,7 +1870,7 @@ iopl_filter_generic(struct iopl_softc *sc, u_int64_t *tbl) * Handle control operations. */ static int -iopl_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) +iopl_ioctl(struct ifnet *ifp, u_long cmd, void *data) { struct iopl_softc *sc; struct ifaddr *ifa; diff --git a/sys/dev/i2o/iopsp.c b/sys/dev/i2o/iopsp.c index 47c00e95f9d..3f590d51bc0 100644 --- a/sys/dev/i2o/iopsp.c +++ b/sys/dev/i2o/iopsp.c @@ -1,4 +1,4 @@ -/* $NetBSD: iopsp.c,v 1.26 2007/02/15 15:40:51 ad Exp $ */ +/* $NetBSD: iopsp.c,v 1.27 2007/03/04 06:01:47 christos Exp $ */ /*- * Copyright (c) 2000, 2001 The NetBSD Foundation, Inc. @@ -42,7 +42,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: iopsp.c,v 1.26 2007/02/15 15:40:51 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: iopsp.c,v 1.27 2007/03/04 06:01:47 christos Exp $"); #include "opt_i2o.h" @@ -75,7 +75,7 @@ static void iopsp_adjqparam(struct device *, int); static void iopsp_attach(struct device *, struct device *, void *); static void iopsp_intr(struct device *, struct iop_msg *, void *); static int iopsp_ioctl(struct scsipi_channel *, u_long, - caddr_t, int, struct proc *); + void *, int, struct proc *); static int iopsp_match(struct device *, struct cfdata *, void *); static int iopsp_rescan(struct iopsp_softc *); static int iopsp_reconfig(struct device *); @@ -625,7 +625,7 @@ iopsp_intr(struct device *dv, struct iop_msg *im, void *reply) * ioctl hook; used here only to initiate low-level rescans. */ static int -iopsp_ioctl(struct scsipi_channel *chan, u_long cmd, caddr_t data, +iopsp_ioctl(struct scsipi_channel *chan, u_long cmd, void *data, int flag, struct proc *p) { int rv; diff --git a/sys/dev/i2o/iopvar.h b/sys/dev/i2o/iopvar.h index aab116290bf..e1ddec472d1 100644 --- a/sys/dev/i2o/iopvar.h +++ b/sys/dev/i2o/iopvar.h @@ -1,4 +1,4 @@ -/* $NetBSD: iopvar.h,v 1.17 2007/02/15 15:40:52 ad Exp $ */ +/* $NetBSD: iopvar.h,v 1.18 2007/03/04 06:01:48 christos Exp $ */ /*- * Copyright (c) 2000, 2001, 2002, 2007 The NetBSD Foundation, Inc. @@ -124,7 +124,7 @@ struct iop_softc { bus_dmamap_t sc_rep_dmamap; /* Reply frames DMA map */ int sc_rep_size; /* Reply frames size */ bus_addr_t sc_rep_phys; /* Reply frames PA */ - caddr_t sc_rep; /* Reply frames VA */ + void * sc_rep; /* Reply frames VA */ int sc_maxib; /* Max inbound (-> IOP) queue depth */ int sc_maxob; /* Max outbound (<- IOP) queue depth */ @@ -147,7 +147,7 @@ struct iop_softc { struct iop_initiator sc_eventii;/* IOP event handler */ bus_dmamap_t sc_scr_dmamap; /* Scratch DMA map */ bus_dma_segment_t sc_scr_seg[1];/* Scratch DMA segment */ - caddr_t sc_scr; /* Scratch memory VA */ + void * sc_scr; /* Scratch memory VA */ bus_space_tag_t sc_bus_memt; /* Parent bus memory tag */ bus_space_tag_t sc_bus_iot; /* Parent but I/O tag */ diff --git a/sys/dev/ic/aac.c b/sys/dev/ic/aac.c index eaaf0f502ec..e5e64c558a4 100644 --- a/sys/dev/ic/aac.c +++ b/sys/dev/ic/aac.c @@ -1,4 +1,4 @@ -/* $NetBSD: aac.c,v 1.29 2006/11/16 01:32:50 christos Exp $ */ +/* $NetBSD: aac.c,v 1.30 2007/03/04 06:01:48 christos Exp $ */ /*- * Copyright (c) 2002 The NetBSD Foundation, Inc. @@ -77,7 +77,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: aac.c,v 1.29 2006/11/16 01:32:50 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: aac.c,v 1.30 2007/03/04 06:01:48 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -206,7 +206,7 @@ aac_attach(struct aac_softc *sc) } state++; if ((rv = bus_dmamem_map(sc->sc_dmat, &sc->sc_fibs_seg, nsegs, size, - (caddr_t *)&sc->sc_fibs, 0)) != 0) { + (void **)&sc->sc_fibs, 0)) != 0) { aprint_error("%s: can't map fibs structure\n", sc->sc_dv.dv_xname); goto bail_out; @@ -268,7 +268,7 @@ aac_attach(struct aac_softc *sc) bail_out: bus_dmamap_unload(sc->sc_dmat, sc->sc_common_dmamap); - bus_dmamem_unmap(sc->sc_dmat, (caddr_t)sc->sc_common, + bus_dmamem_unmap(sc->sc_dmat, (void *)sc->sc_common, sizeof(*sc->sc_common)); bus_dmamem_free(sc->sc_dmat, &sc->sc_common_seg, 1); bus_dmamap_destroy(sc->sc_dmat, sc->sc_common_dmamap); @@ -276,7 +276,7 @@ aac_attach(struct aac_softc *sc) if (state > 3) bus_dmamap_unload(sc->sc_dmat, sc->sc_fibs_dmamap); if (state > 2) - bus_dmamem_unmap(sc->sc_dmat, (caddr_t)sc->sc_fibs, size); + bus_dmamem_unmap(sc->sc_dmat, (void *)sc->sc_fibs, size); if (state > 1) bus_dmamem_free(sc->sc_dmat, &sc->sc_fibs_seg, 1); if (state > 0) @@ -473,7 +473,7 @@ aac_init(struct aac_softc *sc) } state++; if ((rv = bus_dmamem_map(sc->sc_dmat, &sc->sc_common_seg, nsegs, - sizeof(*sc->sc_common), (caddr_t *)&sc->sc_common, 0)) != 0) { + sizeof(*sc->sc_common), (void **)&sc->sc_common, 0)) != 0) { aprint_error("%s: can't map common structure\n", sc->sc_dv.dv_xname); goto bail_out; @@ -530,7 +530,7 @@ aac_init(struct aac_softc *sc) qoff &= ~(AAC_QUEUE_ALIGN - 1); sc->sc_queues = (struct aac_queue_table *)((uintptr_t)sc->sc_common + qoff); ip->CommHeaderAddress = htole32(sc->sc_common_seg.ds_addr + - ((caddr_t)sc->sc_queues - (caddr_t)sc->sc_common)); + ((char *)sc->sc_queues - (char *)sc->sc_common)); memset(sc->sc_queues, 0, sizeof(struct aac_queue_table)); norm = htole32(AAC_HOST_NORM_CMD_ENTRIES); @@ -629,7 +629,7 @@ aac_init(struct aac_softc *sc) if (state > 2) bus_dmamap_unload(sc->sc_dmat, sc->sc_common_dmamap); if (state > 1) - bus_dmamem_unmap(sc->sc_dmat, (caddr_t)sc->sc_common, + bus_dmamem_unmap(sc->sc_dmat, (void *)sc->sc_common, sizeof(*sc->sc_common)); if (state > 0) bus_dmamem_free(sc->sc_dmat, &sc->sc_common_seg, 1); @@ -819,7 +819,7 @@ aac_host_command(struct aac_softc *sc) break; /* nothing to do */ bus_dmamap_sync(sc->sc_dmat, sc->sc_common_dmamap, - (caddr_t)fib - (caddr_t)sc->sc_common, sizeof(*fib), + (char *)fib - (char *)sc->sc_common, sizeof(*fib), BUS_DMASYNC_POSTREAD); switch (le16toh(fib->Header.Command)) { @@ -837,7 +837,7 @@ aac_host_command(struct aac_softc *sc) } bus_dmamap_sync(sc->sc_dmat, sc->sc_common_dmamap, - (caddr_t)fib - (caddr_t)sc->sc_common, sizeof(*fib), + (char *)fib - (char *)sc->sc_common, sizeof(*fib), BUS_DMASYNC_PREREAD); /* XXX reply to FIBs requesting responses ?? */ @@ -864,14 +864,14 @@ aac_host_response(struct aac_softc *sc) break; /* nothing to do */ bus_dmamap_sync(sc->sc_dmat, sc->sc_fibs_dmamap, - (caddr_t)fib - (caddr_t)sc->sc_fibs, sizeof(*fib), + (char *)fib - (char *)sc->sc_fibs, sizeof(*fib), BUS_DMASYNC_POSTWRITE | BUS_DMASYNC_POSTREAD); if ((fib->Header.SenderData & 0x80000000) == 0) { /* Not valid; not sent by us. */ AAC_PRINT_FIB(sc, fib); } else { - ac = (struct aac_ccb *)((caddr_t)sc->sc_ccbs + + ac = (struct aac_ccb *)((char *)sc->sc_ccbs + (fib->Header.SenderData & 0x7fffffff)); fib->Header.SenderData = 0; SIMPLEQ_INSERT_TAIL(&sc->sc_ccb_complete, ac, ac_chain); @@ -982,7 +982,7 @@ aac_sync_fib(struct aac_softc *sc, u_int32_t command, u_int32_t xferstate, } bus_dmamap_sync(sc->sc_dmat, sc->sc_common_dmamap, - (caddr_t)fib - (caddr_t)sc->sc_common, sizeof(*fib), + (char *)fib - (char *)sc->sc_common, sizeof(*fib), BUS_DMASYNC_PREWRITE | BUS_DMASYNC_PREREAD); /* @@ -996,7 +996,7 @@ aac_sync_fib(struct aac_softc *sc, u_int32_t command, u_int32_t xferstate, } bus_dmamap_sync(sc->sc_dmat, sc->sc_common_dmamap, - (caddr_t)fib - (caddr_t)sc->sc_common, sizeof(*fib), + (char *)fib - (char *)sc->sc_common, sizeof(*fib), BUS_DMASYNC_POSTWRITE | BUS_DMASYNC_POSTREAD); /* @@ -1148,10 +1148,10 @@ aac_ccb_submit(struct aac_softc *sc, struct aac_ccb *ac) /* Save a pointer to the command for speedy reverse-lookup. */ ac->ac_fib->Header.SenderData = - (u_int32_t)((caddr_t)ac - (caddr_t)sc->sc_ccbs) | 0x80000000; + (u_int32_t)((char *)ac - (char *)sc->sc_ccbs) | 0x80000000; bus_dmamap_sync(sc->sc_dmat, sc->sc_fibs_dmamap, - (caddr_t)ac->ac_fib - (caddr_t)sc->sc_fibs, sizeof(*ac->ac_fib), + (char *)ac->ac_fib - (char *)sc->sc_fibs, sizeof(*ac->ac_fib), BUS_DMASYNC_PREWRITE | BUS_DMASYNC_PREREAD); /* Put the FIB on the outbound queue. */ @@ -1200,7 +1200,7 @@ aac_enqueue_fib(struct aac_softc *sc, int queue, struct aac_fib *fib) fib_addr = le32toh(fib->Header.ReceiverFibAddress); bus_dmamap_sync(sc->sc_dmat, sc->sc_common_dmamap, - (caddr_t)sc->sc_common->ac_qbuf - (caddr_t)sc->sc_common, + (char *)sc->sc_common->ac_qbuf - (char *)sc->sc_common, sizeof(sc->sc_common->ac_qbuf), BUS_DMASYNC_POSTWRITE | BUS_DMASYNC_POSTREAD); @@ -1224,7 +1224,7 @@ aac_enqueue_fib(struct aac_softc *sc, int queue, struct aac_fib *fib) sc->sc_queues->qt_qindex[queue][AAC_PRODUCER_INDEX] = htole32(pi + 1); bus_dmamap_sync(sc->sc_dmat, sc->sc_common_dmamap, - (caddr_t)sc->sc_common->ac_qbuf - (caddr_t)sc->sc_common, + (char *)sc->sc_common->ac_qbuf - (char *)sc->sc_common, sizeof(sc->sc_common->ac_qbuf), BUS_DMASYNC_PREWRITE | BUS_DMASYNC_PREREAD); @@ -1247,7 +1247,7 @@ aac_dequeue_fib(struct aac_softc *sc, int queue, u_int32_t *fib_size, int notify; bus_dmamap_sync(sc->sc_dmat, sc->sc_common_dmamap, - (caddr_t)sc->sc_common->ac_qbuf - (caddr_t)sc->sc_common, + (char *)sc->sc_common->ac_qbuf - (char *)sc->sc_common, sizeof(sc->sc_common->ac_qbuf), BUS_DMASYNC_POSTWRITE | BUS_DMASYNC_POSTREAD); @@ -1276,7 +1276,7 @@ aac_dequeue_fib(struct aac_softc *sc, int queue, u_int32_t *fib_size, sc->sc_queues->qt_qindex[queue][AAC_CONSUMER_INDEX] = ci + 1; bus_dmamap_sync(sc->sc_dmat, sc->sc_common_dmamap, - (caddr_t)sc->sc_common->ac_qbuf - (caddr_t)sc->sc_common, + (char *)sc->sc_common->ac_qbuf - (char *)sc->sc_common, sizeof(sc->sc_common->ac_qbuf), BUS_DMASYNC_PREWRITE | BUS_DMASYNC_PREREAD); diff --git a/sys/dev/ic/adv.c b/sys/dev/ic/adv.c index 987617e5bff..a1c4df95215 100644 --- a/sys/dev/ic/adv.c +++ b/sys/dev/ic/adv.c @@ -1,4 +1,4 @@ -/* $NetBSD: adv.c,v 1.38 2006/08/17 17:11:27 christos Exp $ */ +/* $NetBSD: adv.c,v 1.39 2007/03/04 06:01:48 christos Exp $ */ /* * Generic driver for the Advanced Systems Inc. Narrow SCSI controllers @@ -38,7 +38,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: adv.c,v 1.38 2006/08/17 17:11:27 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: adv.c,v 1.39 2007/03/04 06:01:48 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -123,7 +123,7 @@ adv_alloc_control_data(sc) } if ((error = bus_dmamem_map(sc->sc_dmat, &sc->sc_control_seg, sc->sc_control_nsegs, sizeof(struct adv_control), - (caddr_t *) & sc->sc_control, + (void **) & sc->sc_control, BUS_DMA_NOWAIT | BUS_DMA_COHERENT)) != 0) { printf("%s: unable to map control structures, error = %d\n", sc->sc_dev.dv_xname, error); @@ -165,7 +165,7 @@ adv_free_control_data(sc) bus_dmamap_destroy(sc->sc_dmat, sc->sc_dmamap_control); sc->sc_dmamap_control = NULL; - bus_dmamem_unmap(sc->sc_dmat, (caddr_t) sc->sc_control, + bus_dmamem_unmap(sc->sc_dmat, (void *) sc->sc_control, sizeof(struct adv_control)); bus_dmamem_free(sc->sc_dmat, &sc->sc_control_seg, sc->sc_control_nsegs); diff --git a/sys/dev/ic/adw.c b/sys/dev/ic/adw.c index f7b996a7978..f306b4044fc 100644 --- a/sys/dev/ic/adw.c +++ b/sys/dev/ic/adw.c @@ -1,4 +1,4 @@ -/* $NetBSD: adw.c,v 1.46 2005/12/11 12:21:25 christos Exp $ */ +/* $NetBSD: adw.c,v 1.47 2007/03/04 06:01:48 christos Exp $ */ /* * Generic driver for the Advanced Systems Inc. SCSI controllers @@ -38,7 +38,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: adw.c,v 1.46 2005/12/11 12:21:25 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: adw.c,v 1.47 2007/03/04 06:01:48 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -118,7 +118,7 @@ adw_alloc_controls(ADW_SOFTC *sc) return (error); } if ((error = bus_dmamem_map(sc->sc_dmat, &seg, rseg, - sizeof(struct adw_control), (caddr_t *) & sc->sc_control, + sizeof(struct adw_control), (void **) & sc->sc_control, BUS_DMA_NOWAIT | BUS_DMA_COHERENT)) != 0) { printf("%s: unable to map control structures, error = %d\n", sc->sc_dev.dv_xname, error); @@ -174,7 +174,7 @@ adw_alloc_carriers(ADW_SOFTC *sc) } if ((error = bus_dmamem_map(sc->sc_dmat, &seg, rseg, sizeof(ADW_CARRIER) * ADW_MAX_CARRIER, - (caddr_t *) &sc->sc_control->carriers, + (void **) &sc->sc_control->carriers, BUS_DMA_NOWAIT | BUS_DMA_COHERENT)) != 0) { aprint_error("%s: unable to map carrier structures," " error = %d\n", sc->sc_dev.dv_xname, error); diff --git a/sys/dev/ic/aha.c b/sys/dev/ic/aha.c index fe07e93be33..1c34ca93996 100644 --- a/sys/dev/ic/aha.c +++ b/sys/dev/ic/aha.c @@ -1,4 +1,4 @@ -/* $NetBSD: aha.c,v 1.52 2006/11/16 01:32:50 christos Exp $ */ +/* $NetBSD: aha.c,v 1.53 2007/03/04 06:01:48 christos Exp $ */ /*- * Copyright (c) 1997, 1998 The NetBSD Foundation, Inc. @@ -53,7 +53,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: aha.c,v 1.52 2006/11/16 01:32:50 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: aha.c,v 1.53 2007/03/04 06:01:48 christos Exp $"); #include "opt_ddb.h" @@ -939,7 +939,7 @@ aha_init(struct aha_softc *sc) return (error); } if ((error = bus_dmamem_map(sc->sc_dmat, &seg, rseg, - sizeof(struct aha_control), (caddr_t *)&sc->sc_control, + sizeof(struct aha_control), (void **)&sc->sc_control, BUS_DMA_NOWAIT|BUS_DMA_COHERENT)) != 0) { printf("%s: unable to map control structures, error = %d\n", sc->sc_dev.dv_xname, error); diff --git a/sys/dev/ic/aic6915.c b/sys/dev/ic/aic6915.c index 8c3f0f3957f..5bca7720173 100644 --- a/sys/dev/ic/aic6915.c +++ b/sys/dev/ic/aic6915.c @@ -1,4 +1,4 @@ -/* $NetBSD: aic6915.c,v 1.15 2005/12/24 20:27:29 perry Exp $ */ +/* $NetBSD: aic6915.c,v 1.16 2007/03/04 06:01:48 christos Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -42,7 +42,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: aic6915.c,v 1.15 2005/12/24 20:27:29 perry Exp $"); +__KERNEL_RCSID(0, "$NetBSD: aic6915.c,v 1.16 2007/03/04 06:01:48 christos Exp $"); #include "bpfilter.h" @@ -78,7 +78,7 @@ __KERNEL_RCSID(0, "$NetBSD: aic6915.c,v 1.15 2005/12/24 20:27:29 perry Exp $"); static void sf_start(struct ifnet *); static void sf_watchdog(struct ifnet *); -static int sf_ioctl(struct ifnet *, u_long, caddr_t); +static int sf_ioctl(struct ifnet *, u_long, void *); static int sf_init(struct ifnet *); static void sf_stop(struct ifnet *, int); @@ -197,7 +197,7 @@ sf_attach(struct sf_softc *sc) } if ((error = bus_dmamem_map(sc->sc_dmat, &seg, rseg, - sizeof(struct sf_control_data), (caddr_t *)&sc->sc_control_data, + sizeof(struct sf_control_data), (void **)&sc->sc_control_data, BUS_DMA_NOWAIT|BUS_DMA_COHERENT)) != 0) { printf("%s: unable to map control data, error = %d\n", sc->sc_dev.dv_xname, error); @@ -326,7 +326,7 @@ sf_attach(struct sf_softc *sc) fail_3: bus_dmamap_destroy(sc->sc_dmat, sc->sc_cddmamap); fail_2: - bus_dmamem_unmap(sc->sc_dmat, (caddr_t) sc->sc_control_data, + bus_dmamem_unmap(sc->sc_dmat, (void *) sc->sc_control_data, sizeof(struct sf_control_data)); fail_1: bus_dmamem_free(sc->sc_dmat, &seg, rseg); @@ -418,7 +418,7 @@ sf_start(struct ifnet *ifp) break; } } - m_copydata(m0, 0, m0->m_pkthdr.len, mtod(m, caddr_t)); + m_copydata(m0, 0, m0->m_pkthdr.len, mtod(m, void *)); m->m_pkthdr.len = m->m_len = m0->m_pkthdr.len; error = bus_dmamap_load_mbuf(sc->sc_dmat, dmamap, m, BUS_DMA_WRITE|BUS_DMA_NOWAIT); @@ -524,7 +524,7 @@ sf_watchdog(struct ifnet *ifp) * Handle control requests from the operator. */ static int -sf_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) +sf_ioctl(struct ifnet *ifp, u_long cmd, void *data) { struct sf_softc *sc = ifp->if_softc; struct ifreq *ifr = (struct ifreq *) data; @@ -799,7 +799,7 @@ sf_rxintr(struct sf_softc *sc) * Note that we use cluster for incoming frames, so the * buffer is virtually contiguous. */ - memcpy(mtod(m, caddr_t), mtod(ds->ds_mbuf, caddr_t), len); + memcpy(mtod(m, void *), mtod(ds->ds_mbuf, void *), len); /* Allow the receive descriptor to continue using its mbuf. */ SF_INIT_RXDESC(sc, rxidx); diff --git a/sys/dev/ic/aic79xx.c b/sys/dev/ic/aic79xx.c index e8b46277b38..c2cedf9b132 100644 --- a/sys/dev/ic/aic79xx.c +++ b/sys/dev/ic/aic79xx.c @@ -1,4 +1,4 @@ -/* $NetBSD: aic79xx.c,v 1.36 2006/11/16 01:32:50 christos Exp $ */ +/* $NetBSD: aic79xx.c,v 1.37 2007/03/04 06:01:48 christos Exp $ */ /* * Core routines and tables shareable across OS platforms. @@ -49,7 +49,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: aic79xx.c,v 1.36 2006/11/16 01:32:50 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: aic79xx.c,v 1.37 2007/03/04 06:01:48 christos Exp $"); #include <dev/ic/aic79xx_osm.h> #include <dev/ic/aic79xx_inline.h> @@ -251,7 +251,7 @@ static int ahd_createdmamem(bus_dma_tag_t tag, int size, int flags, bus_dmamap_t *mapp, - caddr_t *vaddr, + void **vaddr, bus_addr_t *baddr, bus_dma_segment_t *seg, int *nseg, @@ -260,7 +260,7 @@ static int ahd_createdmamem(bus_dma_tag_t tag, static void ahd_freedmamem(bus_dma_tag_t tag, int size, bus_dmamap_t map, - caddr_t vaddr, + void *vaddr, bus_dma_segment_t *seg, int nseg); @@ -5171,7 +5171,7 @@ ahd_free(struct ahd_softc *ahd) case 1: bus_dmamap_unload(ahd->parent_dmat, ahd->shared_data_map.dmamap); bus_dmamap_destroy(ahd->parent_dmat, ahd->shared_data_map.dmamap); - bus_dmamem_unmap(ahd->parent_dmat, (caddr_t)ahd->qoutfifo, ahd->shared_data_size); + bus_dmamem_unmap(ahd->parent_dmat, (void *)ahd->qoutfifo, ahd->shared_data_size); bus_dmamem_free(ahd->parent_dmat, &ahd->shared_data_map.dmasegs, ahd->shared_data_map.nseg); break; case 0: @@ -5508,7 +5508,7 @@ ahd_fini_scbdata(struct ahd_softc *ahd) while ((sns_map = SLIST_FIRST(&scb_data->sense_maps)) != NULL) { SLIST_REMOVE_HEAD(&scb_data->sense_maps, links); ahd_freedmamem(ahd->parent_dmat, PAGE_SIZE, - sns_map->dmamap, (caddr_t)sns_map->vaddr, + sns_map->dmamap, (void *)sns_map->vaddr, &sns_map->dmasegs, sns_map->nseg); free(sns_map, M_DEVBUF); } @@ -5521,7 +5521,7 @@ ahd_fini_scbdata(struct ahd_softc *ahd) while ((sg_map = SLIST_FIRST(&scb_data->sg_maps)) != NULL) { SLIST_REMOVE_HEAD(&scb_data->sg_maps, links); ahd_freedmamem(ahd->parent_dmat, ahd_sglist_allocsize(ahd), - sg_map->dmamap, (caddr_t)sg_map->vaddr, + sg_map->dmamap, (void *)sg_map->vaddr, &sg_map->dmasegs, sg_map->nseg); free(sg_map, M_DEVBUF); } @@ -5534,7 +5534,7 @@ ahd_fini_scbdata(struct ahd_softc *ahd) while ((hscb_map = SLIST_FIRST(&scb_data->hscb_maps)) != NULL) { SLIST_REMOVE_HEAD(&scb_data->hscb_maps, links); ahd_freedmamem(ahd->parent_dmat, PAGE_SIZE, - hscb_map->dmamap, (caddr_t)hscb_map->vaddr, + hscb_map->dmamap, (void *)hscb_map->vaddr, &hscb_map->dmasegs, hscb_map->nseg); free(hscb_map, M_DEVBUF); } @@ -5772,7 +5772,7 @@ ahd_alloc_scbs(struct ahd_softc *ahd) /* Allocate the next batch of hardware SCBs */ if (ahd_createdmamem(ahd->parent_dmat, PAGE_SIZE, ahd->sc_dmaflags, - &hscb_map->dmamap, (caddr_t *)&hscb_map->vaddr, + &hscb_map->dmamap, (void **)&hscb_map->vaddr, &hscb_map->physaddr, &hscb_map->dmasegs, &hscb_map->nseg, ahd_name(ahd), "hardware SCB structures") < 0) { @@ -5807,7 +5807,7 @@ ahd_alloc_scbs(struct ahd_softc *ahd) /* Allocate the next batch of S/G lists */ if (ahd_createdmamem(ahd->parent_dmat, ahd_sglist_allocsize(ahd), ahd->sc_dmaflags, - &sg_map->dmamap, (caddr_t *)&sg_map->vaddr, + &sg_map->dmamap, (void **)&sg_map->vaddr, &sg_map->physaddr, &sg_map->dmasegs, &sg_map->nseg, ahd_name(ahd), "SG data structures") < 0) { @@ -5847,7 +5847,7 @@ ahd_alloc_scbs(struct ahd_softc *ahd) /* Allocate the next batch of sense buffers */ if (ahd_createdmamem(ahd->parent_dmat, PAGE_SIZE, ahd->sc_dmaflags, - &sense_map->dmamap, (caddr_t *)&sense_map->vaddr, + &sense_map->dmamap, (void **)&sense_map->vaddr, &sense_map->physaddr, &sense_map->dmasegs, &sense_map->nseg, ahd_name(ahd), "Sense Data structures") < 0) { @@ -6055,7 +6055,7 @@ ahd_init(struct ahd_softc *ahd) if (ahd_createdmamem(ahd->parent_dmat, ahd->shared_data_size, ahd->sc_dmaflags, - &ahd->shared_data_map.dmamap, (caddr_t *)&ahd->shared_data_map.vaddr, + &ahd->shared_data_map.dmamap, (void **)&ahd->shared_data_map.vaddr, &ahd->shared_data_map.physaddr, &ahd->shared_data_map.dmasegs, &ahd->shared_data_map.nseg, ahd_name(ahd), "shared data") < 0) return (ENOMEM); @@ -9720,7 +9720,7 @@ ahd_createdmamem(tag, size, flags, mapp, vaddr, baddr, seg, nseg, myname, what) int size; int flags; bus_dmamap_t *mapp; - caddr_t *vaddr; + void **vaddr; bus_addr_t *baddr; bus_dma_segment_t *seg; int *nseg; @@ -9787,7 +9787,7 @@ ahd_freedmamem(tag, size, map, vaddr, seg, nseg) bus_dma_tag_t tag; int size; bus_dmamap_t map; - caddr_t vaddr; + void *vaddr; bus_dma_segment_t *seg; int nseg; { diff --git a/sys/dev/ic/aic79xx_osm.c b/sys/dev/ic/aic79xx_osm.c index 1d06c9f9326..db282d8a9e5 100644 --- a/sys/dev/ic/aic79xx_osm.c +++ b/sys/dev/ic/aic79xx_osm.c @@ -1,4 +1,4 @@ -/* $NetBSD: aic79xx_osm.c,v 1.17 2006/11/16 01:32:50 christos Exp $ */ +/* $NetBSD: aic79xx_osm.c,v 1.18 2007/03/04 06:01:48 christos Exp $ */ /* * Bus independent NetBSD shim for the aic7xxx based adaptec SCSI controllers @@ -41,7 +41,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: aic79xx_osm.c,v 1.17 2006/11/16 01:32:50 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: aic79xx_osm.c,v 1.18 2007/03/04 06:01:48 christos Exp $"); #include <dev/ic/aic79xx_osm.h> #include <dev/ic/aic7xxx_cam.h> @@ -52,7 +52,7 @@ __KERNEL_RCSID(0, "$NetBSD: aic79xx_osm.c,v 1.17 2006/11/16 01:32:50 christos Ex #endif static int ahd_ioctl(struct scsipi_channel *channel, u_long cmd, - caddr_t addr, int flag, struct proc *p); + void *addr, int flag, struct proc *p); static void ahd_action(struct scsipi_channel *chan, scsipi_adapter_req_t req, void *arg); static void ahd_execute_scb(void *arg, bus_dma_segment_t *dm_segs, @@ -111,7 +111,7 @@ ahd_attach(struct ahd_softc *ahd) static int ahd_ioctl(struct scsipi_channel *channel, u_long cmd, - caddr_t addr, int flag, struct proc *p) + void *addr, int flag, struct proc *p) { struct ahd_softc *ahd = (void *)channel->chan_adapter->adapt_dev; int s, ret = ENOTTY; diff --git a/sys/dev/ic/aic7xxx.c b/sys/dev/ic/aic7xxx.c index 03afc732327..0d5135c400c 100644 --- a/sys/dev/ic/aic7xxx.c +++ b/sys/dev/ic/aic7xxx.c @@ -1,4 +1,4 @@ -/* $NetBSD: aic7xxx.c,v 1.123 2006/11/16 01:32:50 christos Exp $ */ +/* $NetBSD: aic7xxx.c,v 1.124 2007/03/04 06:01:48 christos Exp $ */ /* * Core routines and tables shareable across OS platforms. @@ -39,7 +39,7 @@ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGES. * - * $Id: aic7xxx.c,v 1.123 2006/11/16 01:32:50 christos Exp $ + * $Id: aic7xxx.c,v 1.124 2007/03/04 06:01:48 christos Exp $ * * //depot/aic7xxx/aic7xxx/aic7xxx.c#112 $ * @@ -50,7 +50,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: aic7xxx.c,v 1.123 2006/11/16 01:32:50 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: aic7xxx.c,v 1.124 2007/03/04 06:01:48 christos Exp $"); #include <dev/ic/aic7xxx_osm.h> #include <dev/ic/aic7xxx_inline.h> @@ -251,7 +251,7 @@ static int ahc_createdmamem(bus_dma_tag_t tag, int size, int flags, bus_dmamap_t *mapp, - caddr_t *vaddr, + void **vaddr, bus_addr_t *baddr, bus_dma_segment_t *seg, int *nseg, @@ -259,7 +259,7 @@ static int ahc_createdmamem(bus_dma_tag_t tag, static void ahc_freedmamem(bus_dma_tag_t tag, int size, bus_dmamap_t map, - caddr_t vaddr, + void *vaddr, bus_dma_segment_t *seg, int nseg); @@ -3922,7 +3922,7 @@ ahc_free(struct ahc_softc *ahc) case 1: bus_dmamap_unload(ahc->parent_dmat, ahc->shared_data_dmamap); bus_dmamap_destroy(ahc->parent_dmat, ahc->shared_data_dmamap); - bus_dmamem_unmap(ahc->parent_dmat, (caddr_t)ahc->qoutfifo, ahc->shared_data_size); + bus_dmamem_unmap(ahc->parent_dmat, (void *)ahc->qoutfifo, ahc->shared_data_size); bus_dmamem_free(ahc->parent_dmat, &ahc->shared_data_seg, ahc->shared_data_nseg); break; case 0: @@ -4215,7 +4215,7 @@ ahc_init_scbdata(struct ahc_softc *ahc) if (ahc_createdmamem(ahc->parent_dmat, AHC_SCB_MAX * sizeof(struct hardware_scb), ahc->sc_dmaflags, &scb_data->hscb_dmamap, - (caddr_t *)&scb_data->hscbs, &scb_data->hscb_busaddr, + (void **)&scb_data->hscbs, &scb_data->hscb_busaddr, &scb_data->hscb_seg, &scb_data->hscb_nseg, ahc_name(ahc), "hardware SCB structures") < 0) goto error_exit; @@ -4224,7 +4224,7 @@ ahc_init_scbdata(struct ahc_softc *ahc) if (ahc_createdmamem(ahc->parent_dmat, AHC_SCB_MAX * sizeof(struct scsi_sense_data), ahc->sc_dmaflags, - &scb_data->sense_dmamap, (caddr_t *)&scb_data->sense, + &scb_data->sense_dmamap, (void **)&scb_data->sense, &scb_data->sense_busaddr, &scb_data->sense_seg, &scb_data->sense_nseg, ahc_name(ahc), "sense buffers") < 0) goto error_exit; @@ -4278,7 +4278,7 @@ ahc_fini_scbdata(struct ahc_softc *ahc) while ((sg_map = SLIST_FIRST(&scb_data->sg_maps))!= NULL) { SLIST_REMOVE_HEAD(&scb_data->sg_maps, links); ahc_freedmamem(ahc->parent_dmat, PAGE_SIZE, - sg_map->sg_dmamap, (caddr_t)sg_map->sg_vaddr, + sg_map->sg_dmamap, (void *)sg_map->sg_vaddr, &sg_map->sg_dmasegs, sg_map->sg_nseg); free(sg_map, M_DEVBUF); } @@ -4287,13 +4287,13 @@ ahc_fini_scbdata(struct ahc_softc *ahc) case 4: ahc_freedmamem(ahc->parent_dmat, AHC_SCB_MAX * sizeof(struct scsi_sense_data), - scb_data->sense_dmamap, (caddr_t)scb_data->sense, + scb_data->sense_dmamap, (void *)scb_data->sense, &scb_data->sense_seg, scb_data->sense_nseg); /*FALLTHROUGH*/ case 3: ahc_freedmamem(ahc->parent_dmat, AHC_SCB_MAX * sizeof(struct hardware_scb), - scb_data->hscb_dmamap, (caddr_t)scb_data->hscbs, + scb_data->hscb_dmamap, (void *)scb_data->hscbs, &scb_data->hscb_seg, scb_data->hscb_nseg); /*FALLTHROUGH*/ case 2: @@ -4331,7 +4331,7 @@ ahc_alloc_scbs(struct ahc_softc *ahc) /* Allocate S/G space for the next batch of SCBS */ if (ahc_createdmamem(ahc->parent_dmat, PAGE_SIZE, ahc->sc_dmaflags, &sg_map->sg_dmamap, - (caddr_t *)&sg_map->sg_vaddr, &sg_map->sg_physaddr, + (void **)&sg_map->sg_vaddr, &sg_map->sg_physaddr, &sg_map->sg_dmasegs, &sg_map->sg_nseg, ahc_name(ahc), "SG space") < 0) { free(sg_map, M_DEVBUF); @@ -4509,7 +4509,7 @@ ahc_init(struct ahc_softc *ahc) if (ahc_createdmamem(ahc->parent_dmat, driver_data_size, ahc->sc_dmaflags, - &ahc->shared_data_dmamap, (caddr_t *)&ahc->qoutfifo, + &ahc->shared_data_dmamap, (void **)&ahc->qoutfifo, &ahc->shared_data_busaddr, &ahc->shared_data_seg, &ahc->shared_data_nseg, ahc_name(ahc), "shared data") < 0) return (ENOMEM); @@ -7377,7 +7377,7 @@ ahc_createdmamem(tag, size, flags, mapp, vaddr, baddr, seg, nseg, myname, what) int size; int flags; bus_dmamap_t *mapp; - caddr_t *vaddr; + void **vaddr; bus_addr_t *baddr; bus_dma_segment_t *seg; int *nseg; @@ -7444,7 +7444,7 @@ ahc_freedmamem(tag, size, map, vaddr, seg, nseg) bus_dma_tag_t tag; int size; bus_dmamap_t map; - caddr_t vaddr; + void *vaddr; bus_dma_segment_t *seg; int nseg; { diff --git a/sys/dev/ic/aic7xxx_osm.c b/sys/dev/ic/aic7xxx_osm.c index 7c219f9565c..39e92961ef7 100644 --- a/sys/dev/ic/aic7xxx_osm.c +++ b/sys/dev/ic/aic7xxx_osm.c @@ -1,4 +1,4 @@ -/* $NetBSD: aic7xxx_osm.c,v 1.24 2006/11/16 01:32:51 christos Exp $ */ +/* $NetBSD: aic7xxx_osm.c,v 1.25 2007/03/04 06:01:49 christos Exp $ */ /* * Bus independent FreeBSD shim for the aic7xxx based adaptec SCSI controllers @@ -39,7 +39,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: aic7xxx_osm.c,v 1.24 2006/11/16 01:32:51 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: aic7xxx_osm.c,v 1.25 2007/03/04 06:01:49 christos Exp $"); #include <dev/ic/aic7xxx_osm.h> #include <dev/ic/aic7xxx_inline.h> @@ -56,7 +56,7 @@ static void ahc_setup_data(struct ahc_softc *ahc, struct scsipi_xfer *xs, struct scb *scb); static void ahc_set_recoveryscb(struct ahc_softc *ahc, struct scb *scb); static int ahc_ioctl(struct scsipi_channel *channel, u_long cmd, - caddr_t addr, int flag, struct proc *p); + void *addr, int flag, struct proc *p); @@ -243,7 +243,7 @@ ahc_done(struct ahc_softc *ahc, struct scb *scb) } static int -ahc_ioctl(struct scsipi_channel *channel, u_long cmd, caddr_t addr, +ahc_ioctl(struct scsipi_channel *channel, u_long cmd, void *addr, int flag, struct proc *p) { struct ahc_softc *ahc = (void *)channel->chan_adapter->adapt_dev; diff --git a/sys/dev/ic/an.c b/sys/dev/ic/an.c index dff6e09998a..ee643a368db 100644 --- a/sys/dev/ic/an.c +++ b/sys/dev/ic/an.c @@ -1,4 +1,4 @@ -/* $NetBSD: an.c,v 1.47 2007/01/04 18:44:45 elad Exp $ */ +/* $NetBSD: an.c,v 1.48 2007/03/04 06:01:49 christos Exp $ */ /* * Copyright (c) 1997, 1998, 1999 * Bill Paul <wpaul@ctr.columbia.edu>. All rights reserved. @@ -77,7 +77,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: an.c,v 1.47 2007/01/04 18:44:45 elad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: an.c,v 1.48 2007/03/04 06:01:49 christos Exp $"); #include "bpfilter.h" @@ -123,7 +123,7 @@ static int an_init(struct ifnet *); static void an_stop(struct ifnet *, int); static void an_start(struct ifnet *); static void an_watchdog(struct ifnet *); -static int an_ioctl(struct ifnet *, u_long, caddr_t); +static int an_ioctl(struct ifnet *, u_long, void *); static int an_media_change(struct ifnet *); static void an_media_status(struct ifnet *, struct ifmediareq *); @@ -783,13 +783,13 @@ an_start(struct ifnet *ifp) if (ic->ic_flags & IEEE80211_F_PRIVACY) wh->i_fc[1] |= IEEE80211_FC1_WEP; m_copydata(m, 0, sizeof(struct ieee80211_frame), - (caddr_t)&frmhdr.an_whdr); + (void *)&frmhdr.an_whdr); /* insert payload length in front of llc/snap */ len = htons(m->m_pkthdr.len - sizeof(struct ieee80211_frame)); m_adj(m, sizeof(struct ieee80211_frame) - sizeof(len)); if (mtod(m, u_long) & 0x01) - memcpy(mtod(m, caddr_t), &len, sizeof(len)); + memcpy(mtod(m, void *), &len, sizeof(len)); else *mtod(m, u_int16_t *) = len; @@ -913,7 +913,7 @@ an_watchdog(struct ifnet *ifp) } static int -an_ioctl(struct ifnet *ifp, u_long command, caddr_t data) +an_ioctl(struct ifnet *ifp, u_long command, void *data) { struct an_softc *sc = ifp->if_softc; int s, error = 0; @@ -1763,7 +1763,7 @@ an_mwrite_bap(struct an_softc *sc, int id, int off, struct mbuf *m, int totlen) len = min(m->m_len, totlen); if ((mtod(m, u_long) & 0x1) || (len & 0x1)) { - m_copydata(m, 0, totlen, (caddr_t)&sc->sc_buf.sc_txbuf); + m_copydata(m, 0, totlen, (void *)&sc->sc_buf.sc_txbuf); cnt = (totlen + 1) / 2; CSR_WRITE_MULTI_STREAM_2(sc, AN_DATA0, sc->sc_buf.sc_val, cnt); diff --git a/sys/dev/ic/anvar.h b/sys/dev/ic/anvar.h index 95cf11d41d3..eb0be9d34f3 100644 --- a/sys/dev/ic/anvar.h +++ b/sys/dev/ic/anvar.h @@ -1,4 +1,4 @@ -/* $NetBSD: anvar.h,v 1.13 2006/02/19 08:20:02 dyoung Exp $ */ +/* $NetBSD: anvar.h,v 1.14 2007/03/04 06:01:49 christos Exp $ */ /* * Copyright (c) 1997, 1998, 1999 * Bill Paul <wpaul@ctr.columbia.edu>. All rights reserved. @@ -147,7 +147,7 @@ struct an_softc { } sc_buf; /* radiotap header */ - caddr_t sc_drvbpf; + void * sc_drvbpf; union { struct an_rx_radiotap_header tap; u_int8_t pad[64]; diff --git a/sys/dev/ic/ath.c b/sys/dev/ic/ath.c index dde4bb97dcd..1f5d3ea7293 100644 --- a/sys/dev/ic/ath.c +++ b/sys/dev/ic/ath.c @@ -1,4 +1,4 @@ -/* $NetBSD: ath.c,v 1.81 2007/01/29 01:52:45 hubertf Exp $ */ +/* $NetBSD: ath.c,v 1.82 2007/03/04 06:01:49 christos Exp $ */ /*- * Copyright (c) 2002-2005 Sam Leffler, Errno Consulting @@ -41,7 +41,7 @@ __FBSDID("$FreeBSD: src/sys/dev/ath/if_ath.c,v 1.104 2005/09/16 10:09:23 ru Exp $"); #endif #ifdef __NetBSD__ -__KERNEL_RCSID(0, "$NetBSD: ath.c,v 1.81 2007/01/29 01:52:45 hubertf Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ath.c,v 1.82 2007/03/04 06:01:49 christos Exp $"); #endif /* @@ -133,7 +133,7 @@ static void ath_stop(struct ifnet *, int); static void ath_start(struct ifnet *); static int ath_media_change(struct ifnet *); static void ath_watchdog(struct ifnet *); -static int ath_ioctl(struct ifnet *, u_long, caddr_t); +static int ath_ioctl(struct ifnet *, u_long, void *); static void ath_fatal_proc(void *, int); static void ath_rxorn_proc(void *, int); static void ath_bmiss_proc(void *, int); @@ -1886,15 +1886,15 @@ ath_calcrxfilter(struct ath_softc *sc, enum ieee80211_state state) } static void -ath_mcastfilter_accum(caddr_t dl, u_int32_t *mfilt) +ath_mcastfilter_accum(void *dl, u_int32_t *mfilt) { u_int32_t val; u_int8_t pos; /* calculate XOR of eight 6bit values */ - val = LE_READ_4(dl + 0); + val = LE_READ_4((char *)dl + 0); pos = (val >> 18) ^ (val >> 12) ^ (val >> 6) ^ val; - val = LE_READ_4(dl + 3); + val = LE_READ_4((char *)dl + 3); pos ^= (val >> 18) ^ (val >> 12) ^ (val >> 6) ^ val; pos &= 0x3f; mfilt[pos / 32] |= (1 << (pos % 32)); @@ -1963,13 +1963,13 @@ ath_mode_init(struct ath_softc *sc) mfilt[0] = mfilt[1] = 0; IF_ADDR_LOCK(ifp); TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) { - caddr_t dl; + void *dl; /* calculate XOR of eight 6bit values */ dl = LLADDR((struct sockaddr_dl *) ifma->ifma_addr); - val = LE_READ_4(dl + 0); + val = LE_READ_4((char *)dl + 0); pos = (val >> 18) ^ (val >> 12) ^ (val >> 6) ^ val; - val = LE_READ_4(dl + 3); + val = LE_READ_4((char *)dl + 3); pos ^= (val >> 18) ^ (val >> 12) ^ (val >> 6) ^ val; pos &= 0x3f; mfilt[pos / 32] |= (1 << (pos % 32)); @@ -2565,7 +2565,7 @@ ath_descdma_setup(struct ath_softc *sc, const char *name, int nbuf, int ndesc) { #define DS2PHYS(_dd, _ds) \ - ((_dd)->dd_desc_paddr + ((caddr_t)(_ds) - (caddr_t)(_dd)->dd_desc)) + ((_dd)->dd_desc_paddr + ((char *)(_ds) - (char *)(_dd)->dd_desc)) struct ifnet *ifp = &sc->sc_if; struct ath_desc *ds; struct ath_buf *bf; @@ -2592,7 +2592,7 @@ ath_descdma_setup(struct ath_softc *sc, } error = bus_dmamem_map(dd->dd_dmat, &dd->dd_dseg, dd->dd_dnseg, - dd->dd_desc_len, (caddr_t *)&dd->dd_desc, BUS_DMA_COHERENT); + dd->dd_desc_len, (void **)&dd->dd_desc, BUS_DMA_COHERENT); if (error != 0) { if_printf(ifp, "unable to map %u %s descriptors, error = %u\n", nbuf * ndesc, dd->dd_name, error); @@ -2653,7 +2653,7 @@ fail4: fail3: bus_dmamap_destroy(dd->dd_dmat, dd->dd_dmamap); fail2: - bus_dmamem_unmap(dd->dd_dmat, (caddr_t)dd->dd_desc, dd->dd_desc_len); + bus_dmamem_unmap(dd->dd_dmat, (void *)dd->dd_desc, dd->dd_desc_len); fail1: bus_dmamem_free(dd->dd_dmat, &dd->dd_dseg, dd->dd_dnseg); fail0: @@ -2671,7 +2671,7 @@ ath_descdma_cleanup(struct ath_softc *sc, bus_dmamap_unload(dd->dd_dmat, dd->dd_dmamap); bus_dmamap_destroy(dd->dd_dmat, dd->dd_dmamap); - bus_dmamem_unmap(dd->dd_dmat, (caddr_t)dd->dd_desc, dd->dd_desc_len); + bus_dmamem_unmap(dd->dd_dmat, (void *)dd->dd_desc, dd->dd_desc_len); bus_dmamem_free(dd->dd_dmat, &dd->dd_dseg, dd->dd_dnseg); STAILQ_FOREACH(bf, head, bf_list) { @@ -2951,7 +2951,7 @@ static void ath_rx_proc(void *arg, int npending) { #define PA2DESC(_sc, _pa) \ - ((struct ath_desc *)((caddr_t)(_sc)->sc_rxdma.dd_desc + \ + ((struct ath_desc *)((char *)(_sc)->sc_rxdma.dd_desc + \ ((_pa) - (_sc)->sc_rxdma.dd_desc_paddr))) struct ath_softc *sc = arg; struct ath_buf *bf; @@ -3143,7 +3143,7 @@ rx_accept: } if (IFF_DUMPPKTS(sc, ATH_DEBUG_RECV)) { - ieee80211_dump_pkt(mtod(m, caddr_t), len, + ieee80211_dump_pkt(mtod(m, void *), len, sc->sc_hwmap[ds->ds_rxstat.rs_rate].ieeerate, ds->ds_rxstat.rs_rssi); } @@ -3867,7 +3867,7 @@ ath_tx_start(struct ath_softc *sc, struct ieee80211_node *ni, struct ath_buf *bf ctsrate = 0; if (IFF_DUMPPKTS(sc, ATH_DEBUG_XMIT)) - ieee80211_dump_pkt(mtod(m0, caddr_t), m0->m_len, + ieee80211_dump_pkt(mtod(m0, void *), m0->m_len, sc->sc_hwmap[txrate].ieeerate, -1); #if NBPFILTER > 0 if (ic->ic_rawbpf) @@ -4014,7 +4014,7 @@ ath_tx_processq(struct ath_softc *sc, struct ath_txq *txq) DPRINTF(sc, ATH_DEBUG_TX_PROC, "%s: tx queue %u head %p link %p\n", __func__, txq->axq_qnum, - (caddr_t)(uintptr_t) ath_hal_gettxbuf(sc->sc_ah, txq->axq_qnum), + (void *)(uintptr_t) ath_hal_gettxbuf(sc->sc_ah, txq->axq_qnum), txq->axq_link); nacked = 0; for (;;) { @@ -4254,7 +4254,7 @@ ath_tx_stopdma(struct ath_softc *sc, struct ath_txq *txq) (void) ath_hal_stoptxdma(ah, txq->axq_qnum); DPRINTF(sc, ATH_DEBUG_RESET, "%s: tx queue [%u] %p, link %p\n", __func__, txq->axq_qnum, - (caddr_t)(uintptr_t) ath_hal_gettxbuf(ah, txq->axq_qnum), + (void *)(uintptr_t) ath_hal_gettxbuf(ah, txq->axq_qnum), txq->axq_link); } @@ -4274,7 +4274,7 @@ ath_draintxq(struct ath_softc *sc) (void) ath_hal_stoptxdma(ah, sc->sc_bhalq); DPRINTF(sc, ATH_DEBUG_RESET, "%s: beacon queue %p\n", __func__, - (caddr_t)(uintptr_t) ath_hal_gettxbuf(ah, sc->sc_bhalq)); + (void *)(uintptr_t) ath_hal_gettxbuf(ah, sc->sc_bhalq)); for (i = 0; i < HAL_NUM_TX_QUEUES; i++) if (ATH_TXQ_SETUP(sc, i)) ath_tx_stopdma(sc, &sc->sc_txq[i]); @@ -4293,7 +4293,7 @@ static void ath_stoprecv(struct ath_softc *sc) { #define PA2DESC(_sc, _pa) \ - ((struct ath_desc *)((caddr_t)(_sc)->sc_rxdma.dd_desc + \ + ((struct ath_desc *)((char *)(_sc)->sc_rxdma.dd_desc + \ ((_pa) - (_sc)->sc_rxdma.dd_desc_paddr))) struct ath_hal *ah = sc->sc_ah; @@ -4306,7 +4306,7 @@ ath_stoprecv(struct ath_softc *sc) struct ath_buf *bf; printf("%s: rx queue %p, link %p\n", __func__, - (caddr_t)(uintptr_t) ath_hal_getrxbuf(ah), sc->sc_rxlink); + (void *)(uintptr_t) ath_hal_getrxbuf(ah), sc->sc_rxlink); STAILQ_FOREACH(bf, &sc->sc_rxbuf, bf_list) { struct ath_desc *ds = bf->bf_desc; HAL_STATUS status = ath_hal_rxprocdesc(ah, ds, @@ -5217,7 +5217,7 @@ bad: } static int -ath_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) +ath_ioctl(struct ifnet *ifp, u_long cmd, void *data) { #define IS_RUNNING(ifp) \ ((ifp->if_flags & IFF_UP) && (ifp->if_flags & IFF_RUNNING)) diff --git a/sys/dev/ic/ath_netbsd.c b/sys/dev/ic/ath_netbsd.c index 81d6a51c097..a5459a0588f 100644 --- a/sys/dev/ic/ath_netbsd.c +++ b/sys/dev/ic/ath_netbsd.c @@ -1,4 +1,4 @@ -/* $NetBSD: ath_netbsd.c,v 1.9 2007/01/29 01:52:45 hubertf Exp $ */ +/* $NetBSD: ath_netbsd.c,v 1.10 2007/03/04 06:01:49 christos Exp $ */ /*- * Copyright (c) 2003, 2004 David Young @@ -28,7 +28,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ath_netbsd.c,v 1.9 2007/01/29 01:52:45 hubertf Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ath_netbsd.c,v 1.10 2007/03/04 06:01:49 christos Exp $"); #include <sys/param.h> #include <sys/types.h> @@ -86,7 +86,7 @@ m_defrag(struct mbuf *m0, int flags) m_free(m); return NULL; } - m_copydata(m0, 0, m0->m_pkthdr.len, mtod(m, caddr_t)); + m_copydata(m0, 0, m0->m_pkthdr.len, mtod(m, void *)); m->m_len = m->m_pkthdr.len; return m; } diff --git a/sys/dev/ic/athioctl.h b/sys/dev/ic/athioctl.h index 4b514f8adef..d4be5b194bb 100644 --- a/sys/dev/ic/athioctl.h +++ b/sys/dev/ic/athioctl.h @@ -1,4 +1,4 @@ -/* $NetBSD: athioctl.h,v 1.13 2006/10/07 20:54:40 gdt Exp $ */ +/* $NetBSD: athioctl.h,v 1.14 2007/03/04 06:01:50 christos Exp $ */ /*- * Copyright (c) 2002-2005 Sam Leffler, Errno Consulting @@ -121,8 +121,8 @@ struct ath_diag { #define ATH_DIAG_OUT 0x0000 /* copy out results (always) */ #define ATH_DIAG_ID 0x0fff u_int16_t ad_in_size; /* pack to fit, yech */ - caddr_t ad_in_data; - caddr_t ad_out_data; + void * ad_in_data; + void * ad_out_data; u_int ad_out_size; }; diff --git a/sys/dev/ic/athvar.h b/sys/dev/ic/athvar.h index b449a529dbf..3f8064e8b00 100644 --- a/sys/dev/ic/athvar.h +++ b/sys/dev/ic/athvar.h @@ -1,4 +1,4 @@ -/* $NetBSD: athvar.h,v 1.19 2006/07/14 13:37:25 seanb Exp $ */ +/* $NetBSD: athvar.h,v 1.20 2007/03/04 06:01:50 christos Exp $ */ /*- * Copyright (c) 2002-2005 Sam Leffler, Errno Consulting @@ -233,7 +233,7 @@ struct ath_softc { u_int16_t sc_ledoff; /* off time for current blink */ struct callout sc_ledtimer; /* led off timer */ - caddr_t sc_drvbpf; + void * sc_drvbpf; union { struct ath_tx_radiotap_header th; u_int8_t pad[64]; diff --git a/sys/dev/ic/atppc.c b/sys/dev/ic/atppc.c index 34deddd1f76..506f113f7bf 100644 --- a/sys/dev/ic/atppc.c +++ b/sys/dev/ic/atppc.c @@ -1,4 +1,4 @@ -/* $NetBSD: atppc.c,v 1.22 2006/12/25 18:39:48 wiz Exp $ */ +/* $NetBSD: atppc.c,v 1.23 2007/03/04 06:01:50 christos Exp $ */ /* * Copyright (c) 2001 Alcove - Nicolas Souchu @@ -31,7 +31,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: atppc.c,v 1.22 2006/12/25 18:39:48 wiz Exp $"); +__KERNEL_RCSID(0, "$NetBSD: atppc.c,v 1.23 2007/03/04 06:01:50 christos Exp $"); #include "opt_atppc.h" @@ -131,7 +131,7 @@ static void atppc_fifo_write_error(struct atppc_softc * const, /* Miscellaneous */ static int atppc_poll_str(const struct atppc_softc * const, const u_int8_t, const u_int8_t); -static int atppc_wait_interrupt(struct atppc_softc * const, const caddr_t, +static int atppc_wait_interrupt(struct atppc_softc * const, const void *, const u_int8_t); @@ -2388,7 +2388,7 @@ atppc_poll_str(const struct atppc_softc * const atppc, const u_int8_t status, /* Wait for interrupt for MAXBUSYWAIT: returns 0 if acknowledge received. */ static int -atppc_wait_interrupt(struct atppc_softc * const atppc, const caddr_t where, +atppc_wait_interrupt(struct atppc_softc * const atppc, const void *where, const u_int8_t irqstat) { int error = EIO; diff --git a/sys/dev/ic/atppcvar.h b/sys/dev/ic/atppcvar.h index 43e5670dcfc..600d2c446ea 100644 --- a/sys/dev/ic/atppcvar.h +++ b/sys/dev/ic/atppcvar.h @@ -1,4 +1,4 @@ -/* $NetBSD: atppcvar.h,v 1.7 2005/12/11 12:21:25 christos Exp $ */ +/* $NetBSD: atppcvar.h,v 1.8 2007/03/04 06:01:50 christos Exp $ */ /*- * Copyright (c) 2001 Alcove - Nicolas Souchu @@ -95,7 +95,7 @@ extern int atppc_verbose; /* Single softintr callback entry */ struct atppc_handler_node { void (*func)(void *); - void * arg; + void *arg; SLIST_ENTRY(atppc_handler_node) entries; }; @@ -120,7 +120,7 @@ struct atppc_softc { struct device * child; /* Opaque handle used for interrupt handler establishment */ - void * sc_ieh; + void *sc_ieh; /* List of soft interrupts to call */ SLIST_HEAD(handler_list, atppc_handler_node) sc_handler_listhead; @@ -141,9 +141,9 @@ struct atppc_softc { int (*sc_dma_start)(struct atppc_softc *, void *, u_int, u_int8_t); int (*sc_dma_finish)(struct atppc_softc *); int (*sc_dma_abort)(struct atppc_softc *); - int (*sc_dma_malloc)(struct device *, caddr_t *, bus_addr_t *, + int (*sc_dma_malloc)(struct device *, void **, bus_addr_t *, bus_size_t); - void (*sc_dma_free)(struct device *, caddr_t *, bus_addr_t *, + void (*sc_dma_free)(struct device *, void **, bus_addr_t *, bus_size_t); /* Microsequence related members */ diff --git a/sys/dev/ic/atw.c b/sys/dev/ic/atw.c index 670ed233b5a..30bf11381e8 100644 --- a/sys/dev/ic/atw.c +++ b/sys/dev/ic/atw.c @@ -1,4 +1,4 @@ -/* $NetBSD: atw.c,v 1.125 2006/11/24 19:46:59 christos Exp $ */ +/* $NetBSD: atw.c,v 1.126 2007/03/04 06:01:50 christos Exp $ */ /*- * Copyright (c) 1998, 1999, 2000, 2002, 2003, 2004 The NetBSD Foundation, Inc. @@ -41,7 +41,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: atw.c,v 1.125 2006/11/24 19:46:59 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: atw.c,v 1.126 2007/03/04 06:01:50 christos Exp $"); #include "bpfilter.h" @@ -193,7 +193,7 @@ static int atw_si4126_read(struct atw_softc *, u_int, u_int *); /* ifnet methods */ int atw_init(struct ifnet *); -int atw_ioctl(struct ifnet *, u_long, caddr_t); +int atw_ioctl(struct ifnet *, u_long, void *); void atw_start(struct ifnet *); void atw_stop(struct ifnet *, int); void atw_watchdog(struct ifnet *); @@ -589,7 +589,7 @@ atw_attach(struct atw_softc *sc) } if ((error = bus_dmamem_map(sc->sc_dmat, &sc->sc_cdseg, sc->sc_cdnseg, - sizeof(struct atw_control_data), (caddr_t *)&sc->sc_control_data, + sizeof(struct atw_control_data), (void **)&sc->sc_control_data, BUS_DMA_COHERENT)) != 0) { printf("%s: unable to map control data, error = %d\n", sc->sc_dev.dv_xname, error); @@ -909,7 +909,7 @@ atw_attach(struct atw_softc *sc) fail_3: bus_dmamap_destroy(sc->sc_dmat, sc->sc_cddmamap); fail_2: - bus_dmamem_unmap(sc->sc_dmat, (caddr_t)sc->sc_control_data, + bus_dmamem_unmap(sc->sc_dmat, (void *)sc->sc_control_data, sizeof(struct atw_control_data)); fail_1: bus_dmamem_free(sc->sc_dmat, &sc->sc_cdseg, sc->sc_cdnseg); @@ -2764,7 +2764,7 @@ atw_detach(struct atw_softc *sc) } bus_dmamap_unload(sc->sc_dmat, sc->sc_cddmamap); bus_dmamap_destroy(sc->sc_dmat, sc->sc_cddmamap); - bus_dmamem_unmap(sc->sc_dmat, (caddr_t)sc->sc_control_data, + bus_dmamem_unmap(sc->sc_dmat, (void *)sc->sc_control_data, sizeof(struct atw_control_data)); bus_dmamem_free(sc->sc_dmat, &sc->sc_cdseg, sc->sc_cdnseg); @@ -3203,7 +3203,7 @@ atw_rxintr(struct atw_softc *sc) tap->ar_antsignal = (int)rssi; /* TBD tap->ar_flags */ - bpf_mtap2(sc->sc_radiobpf, (caddr_t)tap, + bpf_mtap2(sc->sc_radiobpf, (void *)tap, tap->ar_ihdr.it_len, m); } #endif /* NPBFILTER > 0 */ @@ -3508,7 +3508,7 @@ atw_start(struct ifnet *ifp) * Pass the packet to any BPF listeners. */ if (ic->ic_rawbpf != NULL) - bpf_mtap((caddr_t)ic->ic_rawbpf, m0); + bpf_mtap((void *)ic->ic_rawbpf, m0); if (sc->sc_radiobpf != NULL) { struct atw_tx_radiotap_header *tap = &sc->sc_txtap; @@ -3519,7 +3519,7 @@ atw_start(struct ifnet *ifp) /* TBD tap->at_flags */ - bpf_mtap2(sc->sc_radiobpf, (caddr_t)tap, + bpf_mtap2(sc->sc_radiobpf, (void *)tap, tap->at_ihdr.it_len, m0); } #endif /* NBPFILTER > 0 */ @@ -3650,7 +3650,7 @@ atw_start(struct ifnet *ifp) break; } } - m_copydata(m0, 0, m0->m_pkthdr.len, mtod(m, caddr_t)); + m_copydata(m0, 0, m0->m_pkthdr.len, mtod(m, void *)); m->m_pkthdr.len = m->m_len = m0->m_pkthdr.len; m_freem(m0); m0 = m; @@ -3848,7 +3848,7 @@ atw_power(int why, void *arg) * Handle control requests from the operator. */ int -atw_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) +atw_ioctl(struct ifnet *ifp, u_long cmd, void *data) { struct atw_softc *sc = ifp->if_softc; struct ifreq *ifr = (struct ifreq *)data; diff --git a/sys/dev/ic/atwvar.h b/sys/dev/ic/atwvar.h index d1412b3ab46..fb773d6e334 100644 --- a/sys/dev/ic/atwvar.h +++ b/sys/dev/ic/atwvar.h @@ -1,4 +1,4 @@ -/* $NetBSD: atwvar.h,v 1.22 2006/08/31 19:24:37 dyoung Exp $ */ +/* $NetBSD: atwvar.h,v 1.23 2007/03/04 06:01:50 christos Exp $ */ /* * Copyright (c) 2003, 2004 The NetBSD Foundation, Inc. All rights reserved. @@ -223,7 +223,7 @@ struct atw_softc { u_int16_t *sc_srom; u_int16_t sc_sromsz; - caddr_t sc_radiobpf; + void * sc_radiobpf; bus_dma_segment_t sc_cdseg; /* control data memory */ int sc_cdnseg; /* number of segments */ diff --git a/sys/dev/ic/awi.c b/sys/dev/ic/awi.c index 63ec6657924..6558264270f 100644 --- a/sys/dev/ic/awi.c +++ b/sys/dev/ic/awi.c @@ -1,4 +1,4 @@ -/* $NetBSD: awi.c,v 1.73 2006/10/04 15:36:23 christos Exp $ */ +/* $NetBSD: awi.c,v 1.74 2007/03/04 06:01:51 christos Exp $ */ /*- * Copyright (c) 1999,2000,2001 The NetBSD Foundation, Inc. @@ -86,7 +86,7 @@ #include <sys/cdefs.h> #ifdef __NetBSD__ -__KERNEL_RCSID(0, "$NetBSD: awi.c,v 1.73 2006/10/04 15:36:23 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: awi.c,v 1.74 2007/03/04 06:01:51 christos Exp $"); #endif #ifdef __FreeBSD__ __FBSDID("$FreeBSD: src/sys/dev/awi/awi.c,v 1.30 2004/01/15 13:30:06 onoe Exp $"); @@ -159,7 +159,7 @@ static int awi_init(struct ifnet *); static void awi_stop(struct ifnet *, int); static void awi_start(struct ifnet *); static void awi_watchdog(struct ifnet *); -static int awi_ioctl(struct ifnet *, u_long, caddr_t); +static int awi_ioctl(struct ifnet *, u_long, void *); static int awi_media_change(struct ifnet *); static void awi_media_status(struct ifnet *, struct ifmediareq *); static int awi_mode_init(struct awi_softc *); @@ -919,7 +919,7 @@ awi_watchdog(struct ifnet *ifp) } static int -awi_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) +awi_ioctl(struct ifnet *ifp, u_long cmd, void *data) { struct awi_softc *sc = ifp->if_softc; struct ifreq *ifr = (struct ifreq *)data; @@ -1338,7 +1338,7 @@ awi_devget(struct awi_softc *sc, u_int32_t off, u_int16_t len) if (top == NULL) { int hdrlen = sizeof(struct ieee80211_frame) + sizeof(struct llc); - caddr_t newdata = (caddr_t) + char *newdata = (char *) ALIGN(m->m_data + hdrlen) - hdrlen; m->m_len -= newdata - m->m_data; m->m_data = newdata; @@ -2174,16 +2174,16 @@ awi_ether_modcap(struct awi_softc *sc, struct mbuf *m) if (m == NULL) return NULL; } - memcpy(&wh, mtod(m, caddr_t), sizeof(wh)); + memcpy(&wh, mtod(m, void *), sizeof(wh)); if (wh.i_fc[0] != (IEEE80211_FC0_VERSION_0 | IEEE80211_FC0_TYPE_DATA)) return m; - memcpy(&eh, mtod(m, caddr_t) + sizeof(wh), sizeof(eh)); + memcpy(&eh, mtod(m, char *) + sizeof(wh), sizeof(eh)); m_adj(m, sizeof(eh) - sizeof(*llc)); if (ic->ic_opmode == IEEE80211_M_IBSS || ic->ic_opmode == IEEE80211_M_AHDEMO) IEEE80211_ADDR_COPY(wh.i_addr2, eh.ether_shost); - memcpy(mtod(m, caddr_t), &wh, sizeof(wh)); - llc = (struct llc *)(mtod(m, caddr_t) + sizeof(wh)); + memcpy(mtod(m, void *), &wh, sizeof(wh)); + llc = (struct llc *)(mtod(m, char *) + sizeof(wh)); llc->llc_dsap = llc->llc_ssap = LLC_SNAP_LSAP; llc->llc_control = LLC_UI; llc->llc_snap.org_code[0] = 0; diff --git a/sys/dev/ic/bha.c b/sys/dev/ic/bha.c index 846cee88647..e0941bbd482 100644 --- a/sys/dev/ic/bha.c +++ b/sys/dev/ic/bha.c @@ -1,4 +1,4 @@ -/* $NetBSD: bha.c,v 1.67 2006/08/17 17:11:28 christos Exp $ */ +/* $NetBSD: bha.c,v 1.68 2007/03/04 06:01:51 christos Exp $ */ /*- * Copyright (c) 1997, 1998, 1999 The NetBSD Foundation, Inc. @@ -53,7 +53,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: bha.c,v 1.67 2006/08/17 17:11:28 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: bha.c,v 1.68 2007/03/04 06:01:51 christos Exp $"); #include "opt_ddb.h" @@ -1648,7 +1648,7 @@ bha_create_mailbox(struct bha_softc *sc) } error = bus_dmamem_map(sc->sc_dmat, &seg, rseg, size, - (caddr_t *)&sc->sc_mbo, sc->sc_dmaflags | BUS_DMA_COHERENT); + (void **)&sc->sc_mbo, sc->sc_dmaflags | BUS_DMA_COHERENT); if (error) { aprint_error("%s: unable to map mailboxes, error = %d\n", sc->sc_dev.dv_xname, error); @@ -1681,7 +1681,7 @@ bha_create_mailbox(struct bha_softc *sc) bad_3: bus_dmamap_destroy(sc->sc_dmat, sc->sc_dmamap_mbox); bad_2: - bus_dmamem_unmap(sc->sc_dmat, (caddr_t)sc->sc_mbo, size); + bus_dmamem_unmap(sc->sc_dmat, (void *)sc->sc_mbo, size); bad_1: bus_dmamem_free(sc->sc_dmat, &seg, rseg); bad_0: @@ -1855,7 +1855,7 @@ bha_create_ccbs(struct bha_softc *sc, int count) bad_3: bus_dmamap_destroy(sc->sc_dmat, ccbmap); bad_2: - bus_dmamem_unmap(sc->sc_dmat, (caddr_t)bcg, PAGE_SIZE); + bus_dmamem_unmap(sc->sc_dmat, (void *)bcg, PAGE_SIZE); bad_1: bus_dmamem_free(sc->sc_dmat, &seg, rseg); bad_0: diff --git a/sys/dev/ic/bt8xx.h b/sys/dev/ic/bt8xx.h index aca7e7841f4..c2d9d08e636 100644 --- a/sys/dev/ic/bt8xx.h +++ b/sys/dev/ic/bt8xx.h @@ -1,4 +1,4 @@ -/* $NetBSD: bt8xx.h,v 1.7 2003/05/03 18:11:16 wiz Exp $ */ +/* $NetBSD: bt8xx.h,v 1.8 2007/03/04 06:01:51 christos Exp $ */ /* This file is merged from ioctl_meteor.h and ioctl_bt848.h from FreeBSD. */ /* The copyright below only applies to the ioctl_meteor.h part of this file. */ @@ -188,7 +188,7 @@ struct meteor_mem { kernel increments, user decrements */ /* reference to mmapped data */ - caddr_t buf; /* The real space (virtual addr) */ + void * buf; /* The real space (virtual addr) */ }; /* $SourceForge: ioctl_bt848.h,v 1.4 2003/03/11 23:11:29 thomasklausner Exp $ */ diff --git a/sys/dev/ic/cac.c b/sys/dev/ic/cac.c index fac89bd5336..93dc8eac074 100644 --- a/sys/dev/ic/cac.c +++ b/sys/dev/ic/cac.c @@ -1,4 +1,4 @@ -/* $NetBSD: cac.c,v 1.39 2007/02/09 21:55:27 ad Exp $ */ +/* $NetBSD: cac.c,v 1.40 2007/03/04 06:01:51 christos Exp $ */ /*- * Copyright (c) 2000, 2006, 2007 The NetBSD Foundation, Inc. @@ -41,7 +41,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: cac.c,v 1.39 2007/02/09 21:55:27 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cac.c,v 1.40 2007/03/04 06:01:51 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -121,7 +121,7 @@ cac_init(struct cac_softc *sc, const char *intrstr, int startfw) } if ((error = bus_dmamem_map(sc->sc_dmat, &seg, rseg, size, - (caddr_t *)&sc->sc_ccbs, + (void **)&sc->sc_ccbs, BUS_DMA_NOWAIT | BUS_DMA_COHERENT)) != 0) { aprint_error("%s: unable to map CCBs, error = %d\n", sc->sc_dv.dv_xname, error); @@ -520,7 +520,8 @@ cac_l0_submit(struct cac_softc *sc, struct cac_ccb *ccb) LOCK_ASSERT(mutex_owned(&sc->sc_mutex)); - bus_dmamap_sync(sc->sc_dmat, sc->sc_dmamap, (caddr_t)ccb - sc->sc_ccbs, + bus_dmamap_sync(sc->sc_dmat, sc->sc_dmamap, + (char *)ccb - (char *)sc->sc_ccbs, sizeof(struct cac_ccb), BUS_DMASYNC_PREWRITE | BUS_DMASYNC_PREREAD); cac_outl(sc, CAC_REG_CMD_FIFO, ccb->ccb_paddr); } @@ -541,7 +542,7 @@ cac_l0_completed(struct cac_softc *sc) sc->sc_dv.dv_xname, (long)off); off = (off & ~3) - sc->sc_ccbs_paddr; - ccb = (struct cac_ccb *)(sc->sc_ccbs + off); + ccb = (struct cac_ccb *)((char *)sc->sc_ccbs + off); bus_dmamap_sync(sc->sc_dmat, sc->sc_dmamap, off, sizeof(struct cac_ccb), BUS_DMASYNC_POSTWRITE | BUS_DMASYNC_POSTREAD); diff --git a/sys/dev/ic/cacvar.h b/sys/dev/ic/cacvar.h index d6f9a7a9aef..32939ba5c83 100644 --- a/sys/dev/ic/cacvar.h +++ b/sys/dev/ic/cacvar.h @@ -1,4 +1,4 @@ -/* $NetBSD: cacvar.h,v 1.14 2007/02/09 21:55:27 ad Exp $ */ +/* $NetBSD: cacvar.h,v 1.15 2007/03/04 06:01:51 christos Exp $ */ /*- * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -116,7 +116,7 @@ struct cac_softc { bus_dmamap_t sc_dmamap; int sc_nunits; void *sc_ih; - caddr_t sc_ccbs; + void * sc_ccbs; paddr_t sc_ccbs_paddr; SIMPLEQ_HEAD(, cac_ccb) sc_ccb_free; SIMPLEQ_HEAD(, cac_ccb) sc_ccb_queue; diff --git a/sys/dev/ic/cd18xx.c b/sys/dev/ic/cd18xx.c index 7da0d979d2f..27167118b99 100644 --- a/sys/dev/ic/cd18xx.c +++ b/sys/dev/ic/cd18xx.c @@ -1,4 +1,4 @@ -/* $NetBSD: cd18xx.c,v 1.18 2006/10/01 20:31:50 elad Exp $ */ +/* $NetBSD: cd18xx.c,v 1.19 2007/03/04 06:01:51 christos Exp $ */ /* XXXad does this even compile? */ @@ -103,7 +103,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: cd18xx.c,v 1.18 2006/10/01 20:31:50 elad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cd18xx.c,v 1.19 2007/03/04 06:01:51 christos Exp $"); #include <sys/param.h> #include <sys/conf.h> @@ -611,7 +611,7 @@ int cdttyioctl(dev, cmd, data, flag, p) dev_t dev; u_long cmd; - caddr_t data; + void *data; int flag; struct proc *p; { @@ -691,7 +691,7 @@ cdttystart(tp) if (tp->t_outq.c_cc <= tp->t_lowat) { if (ISSET(tp->t_state, TS_ASLEEP)) { CLR(tp->t_state, TS_ASLEEP); - wakeup((caddr_t)&tp->t_outq); + wakeup((void *)&tp->t_outq); } selwakeup(&tp->t_wsel); if (tp->t_outq.c_cc == 0) diff --git a/sys/dev/ic/ciss.c b/sys/dev/ic/ciss.c index b3e6f919f83..27df63e6616 100644 --- a/sys/dev/ic/ciss.c +++ b/sys/dev/ic/ciss.c @@ -1,4 +1,4 @@ -/* $NetBSD: ciss.c,v 1.6 2006/11/16 01:32:51 christos Exp $ */ +/* $NetBSD: ciss.c,v 1.7 2007/03/04 06:01:53 christos Exp $ */ /* $OpenBSD: ciss.c,v 1.14 2006/03/13 16:02:23 mickey Exp $ */ /* @@ -19,7 +19,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ciss.c,v 1.6 2006/11/16 01:32:51 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ciss.c,v 1.7 2007/03/04 06:01:53 christos Exp $"); /* #define CISS_DEBUG */ @@ -67,7 +67,7 @@ int ciss_debug = 0 static void ciss_scsi_cmd(struct scsipi_channel *chan, scsipi_adapter_req_t req, void *arg); static int ciss_scsi_ioctl(struct scsipi_channel *chan, u_long cmd, - caddr_t addr, int flag, struct proc *p); + void *addr, int flag, struct proc *p); static void cissminphys(struct buf *bp); #if 0 @@ -76,7 +76,7 @@ static void ciss_scsi_raw_cmd(struct scsipi_channel *chan, #endif #if NBIO > 0 -static int ciss_ioctl(struct device *, u_long, caddr_t); +static int ciss_ioctl(struct device *, u_long, void *); #endif static int ciss_sync(struct ciss_softc *sc); static void ciss_heartbeat(void *v); @@ -210,7 +210,7 @@ ciss_attach(struct ciss_softc *sc) } if ((error = bus_dmamem_map(sc->sc_dmat, sc->cmdseg, rseg, total, - (caddr_t *)&sc->ccbs, BUS_DMA_NOWAIT))) { + (void **)&sc->ccbs, BUS_DMA_NOWAIT))) { printf(": cannot map CCBs (%d)\n", error); return -1; } @@ -237,7 +237,7 @@ ciss_attach(struct ciss_softc *sc) maxfer = sc->maxsg * PAGE_SIZE; for (i = 0; total > 0 && i < sc->maxcmd; i++, total -= sc->ccblen) { - ccb = (struct ciss_ccb *) (sc->ccbs + i * sc->ccblen); + ccb = (struct ciss_ccb *) ((char *)sc->ccbs + i * sc->ccblen); cmd = &ccb->ccb_cmd; pa = sc->cmdseg[0].ds_addr + i * sc->ccblen; @@ -278,7 +278,7 @@ ciss_attach(struct ciss_softc *sc) } if ((error = bus_dmamem_map(sc->sc_dmat, seg, rseg, PAGE_SIZE, - (caddr_t *)&sc->scratch, BUS_DMA_NOWAIT))) { + (void **)&sc->scratch, BUS_DMA_NOWAIT))) { printf(": cannot map scratch buffer (%d)\n", error); return -1; } @@ -516,7 +516,7 @@ ciss_cmd(struct ciss_ccb *ccb, int flags, int wait) CISS_DPRINTF(CISS_D_CMD, ("got=0x%x ", id)); ccb1 = (struct ciss_ccb *) - (sc->ccbs + (id >> 2) * sc->ccblen); + ((char *)sc->ccbs + (id >> 2) * sc->ccblen); ccb1->ccb_cmd.id = htole32(id); } @@ -943,7 +943,7 @@ ciss_intr(void *v) while ((id = bus_space_read_4(sc->sc_iot, sc->sc_ioh, CISS_OUTQ)) != 0xffffffff) { - ccb = (struct ciss_ccb *) (sc->ccbs + (id >> 2) * sc->ccblen); + ccb = (struct ciss_ccb *) ((char *)sc->ccbs + (id >> 2) * sc->ccblen); ccb->ccb_cmd.id = htole32(id); if (ccb->ccb_state == CISS_CCB_POLL) { ccb->ccb_state = CISS_CCB_ONQ; @@ -996,7 +996,7 @@ ciss_kthread(void *v) static int ciss_scsi_ioctl(struct scsipi_channel *chan, u_long cmd, - caddr_t addr, int flag, struct proc *p) + void *addr, int flag, struct proc *p) { #if NBIO > 0 return ciss_ioctl(chan->chan_adapter->adapt_dev, cmd, addr); @@ -1007,7 +1007,7 @@ ciss_scsi_ioctl(struct scsipi_channel *chan, u_long cmd, #if NBIO > 0 static int -ciss_ioctl(struct device *dev, u_long cmd, caddr_t addr) /* TODO */ +ciss_ioctl(struct device *dev, u_long cmd, void *addr) /* TODO */ { /* struct ciss_softc *sc = (struct ciss_softc *)dev; */ ciss_lock_t lock; diff --git a/sys/dev/ic/cissvar.h b/sys/dev/ic/cissvar.h index 0ba1cc777c0..c88e06a1397 100644 --- a/sys/dev/ic/cissvar.h +++ b/sys/dev/ic/cissvar.h @@ -1,4 +1,4 @@ -/* $NetBSD: cissvar.h,v 1.1 2006/03/21 20:42:14 he Exp $ */ +/* $NetBSD: cissvar.h,v 1.2 2007/03/04 06:01:53 christos Exp $ */ /* $OpenBSD: cissvar.h,v 1.2 2005/09/07 04:00:16 mickey Exp $ */ /* @@ -41,7 +41,7 @@ struct ciss_softc { bus_dmamap_t cmdmap; bus_dma_segment_t cmdseg[1]; - caddr_t ccbs; + void * ccbs; void *scratch; bus_space_handle_t cfg_ioh; diff --git a/sys/dev/ic/clmpcc.c b/sys/dev/ic/clmpcc.c index 2c279fdc968..ddcb3b8c220 100644 --- a/sys/dev/ic/clmpcc.c +++ b/sys/dev/ic/clmpcc.c @@ -1,4 +1,4 @@ -/* $NetBSD: clmpcc.c,v 1.31 2006/10/01 20:31:50 elad Exp $ */ +/* $NetBSD: clmpcc.c,v 1.32 2007/03/04 06:01:53 christos Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -41,7 +41,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: clmpcc.c,v 1.31 2006/10/01 20:31:50 elad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: clmpcc.c,v 1.32 2007/03/04 06:01:53 christos Exp $"); #include "opt_ddb.h" @@ -691,7 +691,7 @@ int clmpccioctl(dev, cmd, data, flag, l) dev_t dev; u_long cmd; - caddr_t data; + void *data; int flag; struct lwp *l; { diff --git a/sys/dev/ic/com.c b/sys/dev/ic/com.c index 76c86b81069..e45832ff295 100644 --- a/sys/dev/ic/com.c +++ b/sys/dev/ic/com.c @@ -1,4 +1,4 @@ -/* $NetBSD: com.c,v 1.258 2007/01/10 20:59:10 cube Exp $ */ +/* $NetBSD: com.c,v 1.259 2007/03/04 06:01:53 christos Exp $ */ /*- * Copyright (c) 1998, 1999, 2004 The NetBSD Foundation, Inc. @@ -73,7 +73,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: com.c,v 1.258 2007/01/10 20:59:10 cube Exp $"); +__KERNEL_RCSID(0, "$NetBSD: com.c,v 1.259 2007/03/04 06:01:53 christos Exp $"); #include "opt_com.h" #include "opt_ddb.h" @@ -1001,7 +1001,7 @@ comtty(dev_t dev) } int -comioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct lwp *l) +comioctl(dev_t dev, u_long cmd, void *data, int flag, struct lwp *l) { struct com_softc *sc = device_lookup(&com_cd, COMUNIT(dev)); struct tty *tp = sc->sc_tty; diff --git a/sys/dev/ic/cs4231var.h b/sys/dev/ic/cs4231var.h index e0bbfb379e6..860e027b697 100644 --- a/sys/dev/ic/cs4231var.h +++ b/sys/dev/ic/cs4231var.h @@ -1,4 +1,4 @@ -/* $NetBSD: cs4231var.h,v 1.6 2005/12/11 12:21:26 christos Exp $ */ +/* $NetBSD: cs4231var.h,v 1.7 2007/03/04 06:01:53 christos Exp $ */ /*- * Copyright (c) 1998, 1999 The NetBSD Foundation, Inc. @@ -46,7 +46,7 @@ */ struct cs_dma { struct cs_dma *next; - caddr_t addr; + void * addr; bus_dmamap_t dmamap; bus_dma_segment_t segs[1]; int nsegs; diff --git a/sys/dev/ic/cs89x0.c b/sys/dev/ic/cs89x0.c index 534971bf003..e57f156c9ee 100644 --- a/sys/dev/ic/cs89x0.c +++ b/sys/dev/ic/cs89x0.c @@ -1,4 +1,4 @@ -/* $NetBSD: cs89x0.c,v 1.20 2006/09/24 03:53:08 jmcneill Exp $ */ +/* $NetBSD: cs89x0.c,v 1.21 2007/03/04 06:01:53 christos Exp $ */ /* * Copyright (c) 2004 Christopher Gilbert @@ -212,7 +212,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: cs89x0.c,v 1.20 2006/09/24 03:53:08 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cs89x0.c,v 1.21 2007/03/04 06:01:53 christos Exp $"); #include "opt_inet.h" @@ -270,7 +270,7 @@ int cs_get_params(struct cs_softc *); int cs_get_enaddr(struct cs_softc *); int cs_reset_chip(struct cs_softc *); void cs_reset(void *); -int cs_ioctl(struct ifnet *, u_long, caddr_t); +int cs_ioctl(struct ifnet *, u_long, void *); void cs_initChip(struct cs_softc *); void cs_buffer_event(struct cs_softc *, u_int16_t); void cs_transmit_event(struct cs_softc *, u_int16_t); @@ -1324,7 +1324,7 @@ cs_reset(void *arg) } int -cs_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) +cs_ioctl(struct ifnet *ifp, u_long cmd, void *data) { struct cs_softc *sc = ifp->if_softc; struct ifreq *ifr = (struct ifreq *) data; diff --git a/sys/dev/ic/cy.c b/sys/dev/ic/cy.c index bacb09cf16c..03df74c551e 100644 --- a/sys/dev/ic/cy.c +++ b/sys/dev/ic/cy.c @@ -1,4 +1,4 @@ -/* $NetBSD: cy.c,v 1.49 2007/01/29 01:52:45 hubertf Exp $ */ +/* $NetBSD: cy.c,v 1.50 2007/03/04 06:01:53 christos Exp $ */ /* * cy.c @@ -16,7 +16,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: cy.c,v 1.49 2007/01/29 01:52:45 hubertf Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cy.c,v 1.50 2007/03/04 06:01:53 christos Exp $"); #include <sys/param.h> #include <sys/ioctl.h> @@ -490,7 +490,7 @@ cytty(dev_t dev) * ioctl routine */ int -cyioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct lwp *l) +cyioctl(dev_t dev, u_long cmd, void *data, int flag, struct lwp *l) { struct cy_softc *sc; struct cy_port *cy; diff --git a/sys/dev/ic/dp8390.c b/sys/dev/ic/dp8390.c index 020b409b1d5..855b5cbc7bd 100644 --- a/sys/dev/ic/dp8390.c +++ b/sys/dev/ic/dp8390.c @@ -1,4 +1,4 @@ -/* $NetBSD: dp8390.c,v 1.62 2007/01/13 19:46:21 cube Exp $ */ +/* $NetBSD: dp8390.c,v 1.63 2007/03/04 06:01:54 christos Exp $ */ /* * Device driver for National Semiconductor DS8390/WD83C690 based ethernet @@ -14,7 +14,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: dp8390.c,v 1.62 2007/01/13 19:46:21 cube Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dp8390.c,v 1.63 2007/03/04 06:01:54 christos Exp $"); #include "opt_ipkdb.h" #include "opt_inet.h" @@ -73,7 +73,7 @@ static inline void dp8390_xmit(struct dp8390_softc *); static inline void dp8390_read_hdr(struct dp8390_softc *, int, struct dp8390_ring *); static inline int dp8390_ring_copy(struct dp8390_softc *, - int, caddr_t, u_short); + int, void *, u_short); static inline int dp8390_write_mbuf(struct dp8390_softc *, struct mbuf *, int); @@ -862,7 +862,7 @@ int dp8390_ioctl(ifp, cmd, data) struct ifnet *ifp; u_long cmd; - caddr_t data; + void *data; { struct dp8390_softc *sc = ifp->if_softc; struct ifaddr *ifa = (struct ifaddr *) data; @@ -1097,7 +1097,7 @@ dp8390_get(sc, src, total_len) * Make sure the data after the Ethernet header is aligned. */ if (m == m0) { - caddr_t newdata = (caddr_t) + char *newdata = (char *) ALIGN(m->m_data + sizeof(struct ether_header)) - sizeof(struct ether_header); len -= newdata - m->m_data; @@ -1106,9 +1106,9 @@ dp8390_get(sc, src, total_len) m->m_len = len = min(total_len, len); if (sc->ring_copy) - src = (*sc->ring_copy)(sc, src, mtod(m, caddr_t), len); + src = (*sc->ring_copy)(sc, src, mtod(m, void *), len); else - src = dp8390_ring_copy(sc, src, mtod(m, caddr_t), len); + src = dp8390_ring_copy(sc, src, mtod(m, void *), len); total_len -= len; if (total_len > 0) { @@ -1188,7 +1188,7 @@ static inline int dp8390_ring_copy(sc, src, dst, amount) struct dp8390_softc *sc; int src; - caddr_t dst; + void *dst; u_short amount; { bus_space_tag_t buft = sc->sc_buft; @@ -1204,7 +1204,7 @@ dp8390_ring_copy(sc, src, dst, amount) amount -= tmp_amount; src = sc->mem_ring; - dst += tmp_amount; + dst = (char *)dst + tmp_amount; } bus_space_read_region_1(buft, bufh, src, dst, amount); diff --git a/sys/dev/ic/dp8390var.h b/sys/dev/ic/dp8390var.h index f839e5c645e..20163a7dc69 100644 --- a/sys/dev/ic/dp8390var.h +++ b/sys/dev/ic/dp8390var.h @@ -1,4 +1,4 @@ -/* $NetBSD: dp8390var.h,v 1.27 2005/12/11 12:21:26 christos Exp $ */ +/* $NetBSD: dp8390var.h,v 1.28 2007/03/04 06:01:54 christos Exp $ */ /* * Device driver for National Semiconductor DS8390/WD83C690 based ethernet @@ -80,7 +80,7 @@ struct dp8390_softc { void (*stop_card)(struct dp8390_softc *); void (*read_hdr)(struct dp8390_softc *, int, struct dp8390_ring *); void (*recv_int)(struct dp8390_softc *); - int (*ring_copy)(struct dp8390_softc *, int, caddr_t, u_short); + int (*ring_copy)(struct dp8390_softc *, int, void *, u_short); int (*write_mbuf)(struct dp8390_softc *, struct mbuf *, int); int (*sc_enable)(struct dp8390_softc *); @@ -160,7 +160,7 @@ struct dp8390_softc { int dp8390_config(struct dp8390_softc *); int dp8390_intr(void *); -int dp8390_ioctl(struct ifnet *, u_long, caddr_t); +int dp8390_ioctl(struct ifnet *, u_long, void *); void dp8390_start(struct ifnet *); void dp8390_watchdog(struct ifnet *); void dp8390_reset(struct dp8390_softc *); diff --git a/sys/dev/ic/dp83932.c b/sys/dev/ic/dp83932.c index 258b12fdc3f..6f40c6d7e43 100644 --- a/sys/dev/ic/dp83932.c +++ b/sys/dev/ic/dp83932.c @@ -1,4 +1,4 @@ -/* $NetBSD: dp83932.c,v 1.13 2005/12/11 12:21:26 christos Exp $ */ +/* $NetBSD: dp83932.c,v 1.14 2007/03/04 06:01:54 christos Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -42,7 +42,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: dp83932.c,v 1.13 2005/12/11 12:21:26 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dp83932.c,v 1.14 2007/03/04 06:01:54 christos Exp $"); #include "bpfilter.h" @@ -74,7 +74,7 @@ __KERNEL_RCSID(0, "$NetBSD: dp83932.c,v 1.13 2005/12/11 12:21:26 christos Exp $" void sonic_start(struct ifnet *); void sonic_watchdog(struct ifnet *); -int sonic_ioctl(struct ifnet *, u_long, caddr_t); +int sonic_ioctl(struct ifnet *, u_long, void *); int sonic_init(struct ifnet *); void sonic_stop(struct ifnet *, int); @@ -124,7 +124,7 @@ sonic_attach(struct sonic_softc *sc, const uint8_t *enaddr) } if ((error = bus_dmamem_map(sc->sc_dmat, &seg, rseg, - cdatasize + ETHER_PAD_LEN, (caddr_t *) &sc->sc_cdata16, + cdatasize + ETHER_PAD_LEN, (void **) &sc->sc_cdata16, BUS_DMA_NOWAIT|BUS_DMA_COHERENT)) != 0) { printf("%s: unable to map control data, error = %d\n", sc->sc_dev.dv_xname, error); @@ -249,7 +249,7 @@ sonic_attach(struct sonic_softc *sc, const uint8_t *enaddr) fail_3: bus_dmamap_destroy(sc->sc_dmat, sc->sc_cddmamap); fail_2: - bus_dmamem_unmap(sc->sc_dmat, (caddr_t) sc->sc_cdata16, cdatasize); + bus_dmamem_unmap(sc->sc_dmat, (void *) sc->sc_cdata16, cdatasize); fail_1: bus_dmamem_free(sc->sc_dmat, &seg, rseg); fail_0: @@ -344,7 +344,7 @@ sonic_start(struct ifnet *ifp) break; } } - m_copydata(m0, 0, m0->m_pkthdr.len, mtod(m, caddr_t)); + m_copydata(m0, 0, m0->m_pkthdr.len, mtod(m, void *)); m->m_pkthdr.len = m->m_len = m0->m_pkthdr.len; error = bus_dmamap_load_mbuf(sc->sc_dmat, dmamap, m, BUS_DMA_WRITE|BUS_DMA_NOWAIT); @@ -545,7 +545,7 @@ sonic_watchdog(struct ifnet *ifp) * Handle control requests from the operator. */ int -sonic_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) +sonic_ioctl(struct ifnet *ifp, u_long cmd, void *data) { int s, error; @@ -794,7 +794,7 @@ sonic_rxintr(struct sonic_softc *sc) * Note that we use a cluster for incoming frames, * so the buffer is virtually contiguous. */ - memcpy(mtod(m, caddr_t), mtod(ds->ds_mbuf, caddr_t), + memcpy(mtod(m, void *), mtod(ds->ds_mbuf, void *), len); SONIC_INIT_RXDESC(sc, i); bus_dmamap_sync(sc->sc_dmat, ds->ds_dmamap, 0, @@ -816,7 +816,7 @@ sonic_rxintr(struct sonic_softc *sc) * Note that we use a cluster for incoming frames, * so the buffer is virtually contiguous. */ - memcpy(mtod(m, caddr_t), mtod(ds->ds_mbuf, caddr_t), + memcpy(mtod(m, void *), mtod(ds->ds_mbuf, void *), len); SONIC_INIT_RXDESC(sc, i); bus_dmamap_sync(sc->sc_dmat, ds->ds_dmamap, 0, diff --git a/sys/dev/ic/dpt.c b/sys/dev/ic/dpt.c index c0c3fbf331b..41bf83cd62f 100644 --- a/sys/dev/ic/dpt.c +++ b/sys/dev/ic/dpt.c @@ -1,4 +1,4 @@ -/* $NetBSD: dpt.c,v 1.55 2006/12/02 03:10:42 elad Exp $ */ +/* $NetBSD: dpt.c,v 1.56 2007/03/04 06:01:54 christos Exp $ */ /*- * Copyright (c) 1997, 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc. @@ -78,7 +78,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: dpt.c,v 1.55 2006/12/02 03:10:42 elad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dpt.c,v 1.56 2007/03/04 06:01:54 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -356,7 +356,7 @@ dpt_init(struct dpt_softc *sc, const char *intrstr) } if ((rv = bus_dmamem_map(sc->sc_dmat, &seg, rseg, mapsize, - (caddr_t *)&sc->sc_ccbs, BUS_DMA_NOWAIT|BUS_DMA_COHERENT)) != 0) { + (void **)&sc->sc_ccbs, BUS_DMA_NOWAIT|BUS_DMA_COHERENT)) != 0) { aprint_error("%s: unable to map CCBs, rv = %d\n", sc->sc_dv.dv_xname, rv); return; @@ -376,9 +376,9 @@ dpt_init(struct dpt_softc *sc, const char *intrstr) return; } - sc->sc_stp = (struct eata_sp *)((caddr_t)sc->sc_ccbs + sc->sc_stpoff); + sc->sc_stp = (struct eata_sp *)((char *)sc->sc_ccbs + sc->sc_stpoff); sc->sc_stppa = sc->sc_dmamap->dm_segs[0].ds_addr + sc->sc_stpoff; - sc->sc_scr = (caddr_t)sc->sc_ccbs + sc->sc_scroff; + sc->sc_scr = (char *)sc->sc_ccbs + sc->sc_scroff; sc->sc_scrpa = sc->sc_dmamap->dm_segs[0].ds_addr + sc->sc_scroff; sc->sc_stp->sp_ccbid = -1; @@ -1125,7 +1125,7 @@ dptopen(dev_t dev, int flag, int mode, struct lwp *l) } int -dptioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct lwp *l) +dptioctl(dev_t dev, u_long cmd, void *data, int flag, struct lwp *l) { struct dpt_softc *sc; int rv; diff --git a/sys/dev/ic/dptreg.h b/sys/dev/ic/dptreg.h index 297a78507ec..1f8a7f2bf97 100644 --- a/sys/dev/ic/dptreg.h +++ b/sys/dev/ic/dptreg.h @@ -1,4 +1,4 @@ -/* $NetBSD: dptreg.h,v 1.17 2005/12/11 12:21:26 christos Exp $ */ +/* $NetBSD: dptreg.h,v 1.18 2007/03/04 06:01:54 christos Exp $ */ /* * Copyright (c) 1999, 2000, 2001 Andrew Doran <ad@NetBSD.org> @@ -110,9 +110,9 @@ struct eata_ucp { u_int8_t ucp_cp[sizeof(struct eata_cp) - 5*4]; /* XXX */ u_long ucp_datalen; u_long ucp_ccbid; - caddr_t ucp_dataaddr; - caddr_t ucp_stataddr; - caddr_t ucp_senseaddr; + void * ucp_dataaddr; + void * ucp_stataddr; + void * ucp_senseaddr; u_long ucp_timeout; u_int8_t ucp_hstatus; u_int8_t ucp_tstatus; diff --git a/sys/dev/ic/dptvar.h b/sys/dev/ic/dptvar.h index cb725f8a34b..c55de5b7d54 100644 --- a/sys/dev/ic/dptvar.h +++ b/sys/dev/ic/dptvar.h @@ -1,4 +1,4 @@ -/* $NetBSD: dptvar.h,v 1.13 2005/12/11 12:21:26 christos Exp $ */ +/* $NetBSD: dptvar.h,v 1.14 2007/03/04 06:01:54 christos Exp $ */ /* * Copyright (c) 1999, 2000, 2001 Andrew Doran <ad@NetBSD.org> @@ -76,7 +76,7 @@ struct dpt_softc { struct eata_sp *sc_stp; /* EATA status packet */ int sc_stpoff; /* status packet offset in dmamap */ u_int32_t sc_stppa; /* status packet physical address */ - caddr_t sc_scr; /* scratch area */ + void * sc_scr; /* scratch area */ int sc_scroff; /* scratch area offset in dmamap */ u_int32_t sc_scrpa; /* scratch area physical address */ int sc_hbaid[3]; /* ID of HBA on each channel */ diff --git a/sys/dev/ic/elink3.c b/sys/dev/ic/elink3.c index 71a278ef468..1f1e28bc9d8 100644 --- a/sys/dev/ic/elink3.c +++ b/sys/dev/ic/elink3.c @@ -1,4 +1,4 @@ -/* $NetBSD: elink3.c,v 1.120 2006/11/16 01:32:51 christos Exp $ */ +/* $NetBSD: elink3.c,v 1.121 2007/03/04 06:01:54 christos Exp $ */ /*- * Copyright (c) 1998, 2001 The NetBSD Foundation, Inc. @@ -69,7 +69,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: elink3.c,v 1.120 2006/11/16 01:32:51 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: elink3.c,v 1.121 2007/03/04 06:01:54 christos Exp $"); #include "opt_inet.h" #include "bpfilter.h" @@ -195,7 +195,7 @@ static void eptxstat(struct ep_softc *); static int epstatus(struct ep_softc *); int epinit(struct ifnet *); void epstop(struct ifnet *, int); -int epioctl(struct ifnet *, u_long, caddr_t); +int epioctl(struct ifnet *, u_long, void *); void epstart(struct ifnet *); void epwatchdog(struct ifnet *); void epreset(struct ep_softc *); @@ -1595,7 +1595,7 @@ epget(sc, totlen) bus_size_t rxreg; int len, remaining; int s; - caddr_t newdata; + void *newdata; u_long offset; m = sc->mb[sc->next_mb]; @@ -1638,8 +1638,8 @@ epget(sc, totlen) } /* align the struct ip header */ - newdata = (caddr_t) ALIGN(m->m_data + sizeof(struct ether_header)) - - sizeof(struct ether_header); + newdata = (char *)ALIGN(m->m_data + sizeof(struct ether_header)) + - sizeof(struct ether_header); m->m_data = newdata; m->m_len = totlen; @@ -1726,7 +1726,7 @@ int epioctl(ifp, cmd, data) struct ifnet *ifp; u_long cmd; - caddr_t data; + void *data; { struct ep_softc *sc = ifp->if_softc; struct ifreq *ifr = (struct ifreq *)data; diff --git a/sys/dev/ic/elinkxl.c b/sys/dev/ic/elinkxl.c index 4a8d5638549..d353cf17ec5 100644 --- a/sys/dev/ic/elinkxl.c +++ b/sys/dev/ic/elinkxl.c @@ -1,4 +1,4 @@ -/* $NetBSD: elinkxl.c,v 1.95 2006/11/12 07:16:14 itohy Exp $ */ +/* $NetBSD: elinkxl.c,v 1.96 2007/03/04 06:01:54 christos Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: elinkxl.c,v 1.95 2006/11/12 07:16:14 itohy Exp $"); +__KERNEL_RCSID(0, "$NetBSD: elinkxl.c,v 1.96 2007/03/04 06:01:54 christos Exp $"); #include "bpfilter.h" #include "rnd.h" @@ -242,7 +242,7 @@ ex_config(sc) attach_stage = 1; if ((error = bus_dmamem_map(sc->sc_dmat, &sc->sc_useg, sc->sc_urseg, - EX_NUPD * sizeof (struct ex_upd), (caddr_t *)&sc->sc_upd, + EX_NUPD * sizeof (struct ex_upd), (void **)&sc->sc_upd, BUS_DMA_NOWAIT|BUS_DMA_COHERENT)) != 0) { aprint_error("%s: can't map upload descriptors, error = %d\n", sc->sc_dev.dv_xname, error); @@ -290,7 +290,7 @@ ex_config(sc) attach_stage = 5; if ((error = bus_dmamem_map(sc->sc_dmat, &sc->sc_dseg, sc->sc_drseg, - DPDMEM_SIZE + EX_IP4CSUMTX_PADLEN, (caddr_t *)&sc->sc_dpd, + DPDMEM_SIZE + EX_IP4CSUMTX_PADLEN, (void **)&sc->sc_dpd, BUS_DMA_NOWAIT|BUS_DMA_COHERENT)) != 0) { aprint_error("%s: can't map download descriptors, error = %d\n", sc->sc_dev.dv_xname, error); @@ -517,7 +517,7 @@ ex_config(sc) /* FALLTHROUGH */ case 6: - bus_dmamem_unmap(sc->sc_dmat, (caddr_t)sc->sc_dpd, + bus_dmamem_unmap(sc->sc_dmat, (void *)sc->sc_dpd, EX_NDPD * sizeof (struct ex_dpd)); /* FALLTHROUGH */ @@ -534,7 +534,7 @@ ex_config(sc) /* FALLTHROUGH */ case 2: - bus_dmamem_unmap(sc->sc_dmat, (caddr_t)sc->sc_upd, + bus_dmamem_unmap(sc->sc_dmat, (void *)sc->sc_upd, EX_NUPD * sizeof (struct ex_upd)); /* FALLTHROUGH */ @@ -1128,7 +1128,7 @@ ex_start(ifp) } } m_copydata(mb_head, 0, mb_head->m_pkthdr.len, - mtod(mn, caddr_t)); + mtod(mn, void *)); mn->m_pkthdr.len = mn->m_len = mb_head->m_pkthdr.len; m_freem(mb_head); mb_head = mn; @@ -1246,7 +1246,7 @@ ex_start(ifp) if (sc->tx_head) { sc->tx_tail->tx_dpd->dpd_fsh |= htole32(EX_DPD_DNIND); bus_dmamap_sync(sc->sc_dmat, sc->sc_dpd_dmamap, - ((caddr_t)sc->tx_tail->tx_dpd - (caddr_t)sc->sc_dpd), + ((char *)sc->tx_tail->tx_dpd - (char *)sc->sc_dpd), sizeof (struct ex_dpd), BUS_DMASYNC_PREREAD|BUS_DMASYNC_PREWRITE); ifp->if_flags |= IFF_OACTIVE; @@ -1333,7 +1333,7 @@ ex_intr(arg) txp = txp->tx_next) { bus_dmamap_sync(sc->sc_dmat, sc->sc_dpd_dmamap, - (caddr_t)txp->tx_dpd - (caddr_t)sc->sc_dpd, + (char *)txp->tx_dpd - (char *)sc->sc_dpd, sizeof (struct ex_dpd), BUS_DMASYNC_POSTREAD|BUS_DMASYNC_POSTWRITE); if (txp->tx_mbhead != NULL) { @@ -1381,7 +1381,7 @@ ex_intr(arg) rxmap->dm_mapsize, BUS_DMASYNC_POSTREAD|BUS_DMASYNC_POSTWRITE); bus_dmamap_sync(sc->sc_dmat, sc->sc_upd_dmamap, - ((caddr_t)upd - (caddr_t)sc->sc_upd), + ((char *)upd - (char *)sc->sc_upd), sizeof (struct ex_upd), BUS_DMASYNC_POSTREAD|BUS_DMASYNC_POSTWRITE); pktstat = le32toh(upd->upd_pktstatus); @@ -1479,7 +1479,7 @@ int ex_ioctl(ifp, cmd, data) struct ifnet *ifp; u_long cmd; - caddr_t data; + void *data; { struct ex_softc *sc = ifp->if_softc; struct ifreq *ifr = (struct ifreq *)data; @@ -1667,7 +1667,7 @@ ex_stop(ifp, disable) bus_dmamap_unload(sc->sc_dmat, tx->tx_dmamap); tx->tx_dpd->dpd_fsh = tx->tx_dpd->dpd_nextptr = 0; bus_dmamap_sync(sc->sc_dmat, sc->sc_dpd_dmamap, - ((caddr_t)tx->tx_dpd - (caddr_t)sc->sc_dpd), + ((char *)tx->tx_dpd - (char *)sc->sc_dpd), sizeof (struct ex_dpd), BUS_DMASYNC_PREREAD|BUS_DMASYNC_PREWRITE); } @@ -1787,12 +1787,12 @@ ex_detach(sc) bus_dmamap_destroy(sc->sc_dmat, sc->sc_tx_dmamaps[i]); bus_dmamap_unload(sc->sc_dmat, sc->sc_dpd_dmamap); bus_dmamap_destroy(sc->sc_dmat, sc->sc_dpd_dmamap); - bus_dmamem_unmap(sc->sc_dmat, (caddr_t)sc->sc_dpd, + bus_dmamem_unmap(sc->sc_dmat, (void *)sc->sc_dpd, EX_NDPD * sizeof (struct ex_dpd)); bus_dmamem_free(sc->sc_dmat, &sc->sc_dseg, sc->sc_drseg); bus_dmamap_unload(sc->sc_dmat, sc->sc_upd_dmamap); bus_dmamap_destroy(sc->sc_dmat, sc->sc_upd_dmamap); - bus_dmamem_unmap(sc->sc_dmat, (caddr_t)sc->sc_upd, + bus_dmamem_unmap(sc->sc_dmat, (void *)sc->sc_upd, EX_NUPD * sizeof (struct ex_upd)); bus_dmamem_free(sc->sc_dmat, &sc->sc_useg, sc->sc_urseg); @@ -1933,9 +1933,9 @@ ex_add_rxbuf(sc, rxd) if (sc->rx_head != NULL) { sc->rx_tail->rx_next = rxd; sc->rx_tail->rx_upd->upd_nextptr = htole32(sc->sc_upddma + - ((caddr_t)rxd->rx_upd - (caddr_t)sc->sc_upd)); + ((char *)rxd->rx_upd - (char *)sc->sc_upd)); bus_dmamap_sync(sc->sc_dmat, sc->sc_upd_dmamap, - (caddr_t)sc->rx_tail->rx_upd - (caddr_t)sc->sc_upd, + (char *)sc->rx_tail->rx_upd - (char *)sc->sc_upd, sizeof (struct ex_upd), BUS_DMASYNC_PREREAD|BUS_DMASYNC_PREWRITE); } else { @@ -1946,7 +1946,7 @@ ex_add_rxbuf(sc, rxd) bus_dmamap_sync(sc->sc_dmat, rxmap, 0, rxmap->dm_mapsize, BUS_DMASYNC_PREREAD|BUS_DMASYNC_PREWRITE); bus_dmamap_sync(sc->sc_dmat, sc->sc_upd_dmamap, - ((caddr_t)rxd->rx_upd - (caddr_t)sc->sc_upd), + ((char *)rxd->rx_upd - (char *)sc->sc_upd), sizeof (struct ex_upd), BUS_DMASYNC_PREREAD|BUS_DMASYNC_PREWRITE); return (rval); } diff --git a/sys/dev/ic/elinkxlreg.h b/sys/dev/ic/elinkxlreg.h index 8210968140c..7a161893edc 100644 --- a/sys/dev/ic/elinkxlreg.h +++ b/sys/dev/ic/elinkxlreg.h @@ -1,4 +1,4 @@ -/* $NetBSD: elinkxlreg.h,v 1.13 2006/11/17 21:35:24 tsutsui Exp $ */ +/* $NetBSD: elinkxlreg.h,v 1.14 2007/03/04 06:01:54 christos Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -281,7 +281,7 @@ struct ex_txdesc { #define DPDMEMPAD_DMADDR(sc) ((sc)->sc_dpddma + DPDMEMPAD_OFF) #define DPD_DMADDR(s,t) \ - ((s)->sc_dpddma + ((caddr_t)((t)->tx_dpd) - (caddr_t)((s)->sc_dpd))) + ((s)->sc_dpddma + ((char *)((t)->tx_dpd) - (char *)((s)->sc_dpd))) /* * Frame Start Header bitfields. diff --git a/sys/dev/ic/elinkxlvar.h b/sys/dev/ic/elinkxlvar.h index 0c51b205058..ba017d9b729 100644 --- a/sys/dev/ic/elinkxlvar.h +++ b/sys/dev/ic/elinkxlvar.h @@ -1,4 +1,4 @@ -/* $NetBSD: elinkxlvar.h,v 1.17 2005/12/11 12:21:26 christos Exp $ */ +/* $NetBSD: elinkxlvar.h,v 1.18 2007/03/04 06:01:54 christos Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -156,7 +156,7 @@ void ex_config(struct ex_softc *); int ex_intr(void *); void ex_stop(struct ifnet *, int); void ex_watchdog(struct ifnet *); -int ex_ioctl(struct ifnet *ifp, u_long, caddr_t); +int ex_ioctl(struct ifnet *ifp, u_long, void *); int ex_activate(struct device *, enum devact); int ex_detach(struct ex_softc *); diff --git a/sys/dev/ic/esiop.c b/sys/dev/ic/esiop.c index e50fcb2167e..fa5a71b5aa5 100644 --- a/sys/dev/ic/esiop.c +++ b/sys/dev/ic/esiop.c @@ -1,4 +1,4 @@ -/* $NetBSD: esiop.c,v 1.38 2006/11/02 15:08:30 garbled Exp $ */ +/* $NetBSD: esiop.c,v 1.39 2007/03/04 06:01:55 christos Exp $ */ /* * Copyright (c) 2002 Manuel Bouyer. @@ -33,7 +33,7 @@ /* SYM53c7/8xx PCI-SCSI I/O Processors driver */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: esiop.c,v 1.38 2006/11/02 15:08:30 garbled Exp $"); +__KERNEL_RCSID(0, "$NetBSD: esiop.c,v 1.39 2007/03/04 06:01:55 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -1921,7 +1921,7 @@ esiop_morecbd(sc) goto bad2; } error = bus_dmamem_map(sc->sc_c.sc_dmat, &seg, rseg, PAGE_SIZE, - (caddr_t *)&newcbd->xfers, BUS_DMA_NOWAIT|BUS_DMA_COHERENT); + (void **)&newcbd->xfers, BUS_DMA_NOWAIT|BUS_DMA_COHERENT); if (error) { printf("%s: unable to map cbd DMA memory, error = %d\n", sc->sc_c.sc_dev.dv_xname, error); @@ -1993,7 +1993,7 @@ esiop_morecbd(sc) TAILQ_INSERT_TAIL(&sc->free_list, &newcbd->cmds[i], next); splx(s); #ifdef SIOP_DEBUG - printf("tables[%d]: in=0x%x out=0x%x status=0x%x\n", i + printf("tables[%d]: in=0x%x out=0x%x status=0x%x\n", i, le32toh(newcbd->cmds[i].cmd_tables->t_msgin.addr), le32toh(newcbd->cmds[i].cmd_tables->t_msgout.addr), le32toh(newcbd->cmds[i].cmd_tables->t_status.addr)); diff --git a/sys/dev/ic/gem.c b/sys/dev/ic/gem.c index 1bfa670c4c1..7a73d7480b1 100644 --- a/sys/dev/ic/gem.c +++ b/sys/dev/ic/gem.c @@ -1,4 +1,4 @@ -/* $NetBSD: gem.c,v 1.52 2006/11/24 19:46:59 christos Exp $ */ +/* $NetBSD: gem.c,v 1.53 2007/03/04 06:01:55 christos Exp $ */ /* * @@ -34,7 +34,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: gem.c,v 1.52 2006/11/24 19:46:59 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: gem.c,v 1.53 2007/03/04 06:01:55 christos Exp $"); #include "opt_inet.h" #include "bpfilter.h" @@ -87,7 +87,7 @@ __KERNEL_RCSID(0, "$NetBSD: gem.c,v 1.52 2006/11/24 19:46:59 christos Exp $"); static void gem_start(struct ifnet *); static void gem_stop(struct ifnet *, int); -int gem_ioctl(struct ifnet *, u_long, caddr_t); +int gem_ioctl(struct ifnet *, u_long, void *); void gem_tick(void *); void gem_watchdog(struct ifnet *); void gem_shutdown(void *); @@ -171,7 +171,7 @@ gem_attach(sc, enaddr) /* XXX should map this in with correct endianness */ if ((error = bus_dmamem_map(sc->sc_dmatag, &sc->sc_cdseg, sc->sc_cdnseg, - sizeof(struct gem_control_data), (caddr_t *)&sc->sc_control_data, + sizeof(struct gem_control_data), (void **)&sc->sc_control_data, BUS_DMA_COHERENT)) != 0) { aprint_error("%s: unable to map control data, error = %d\n", sc->sc_dev.dv_xname, error); @@ -179,7 +179,7 @@ gem_attach(sc, enaddr) } nullbuf = - (caddr_t)sc->sc_control_data + sizeof(struct gem_control_data); + (void *)sc->sc_control_data + sizeof(struct gem_control_data); if ((error = bus_dmamap_create(sc->sc_dmatag, sizeof(struct gem_control_data), 1, @@ -467,11 +467,11 @@ gem_attach(sc, enaddr) fail_5: bus_dmamap_destroy(sc->sc_dmatag, sc->sc_nulldmamap); fail_4: - bus_dmamem_unmap(sc->sc_dmatag, (caddr_t)nullbuf, ETHER_MIN_TX); + bus_dmamem_unmap(sc->sc_dmatag, (void *)nullbuf, ETHER_MIN_TX); fail_3: bus_dmamap_destroy(sc->sc_dmatag, sc->sc_cddmamap); fail_2: - bus_dmamem_unmap(sc->sc_dmatag, (caddr_t)sc->sc_control_data, + bus_dmamem_unmap(sc->sc_dmatag, (void *)sc->sc_control_data, sizeof(struct gem_control_data)); fail_1: bus_dmamem_free(sc->sc_dmatag, &sc->sc_cdseg, sc->sc_cdnseg); @@ -1093,7 +1093,7 @@ gem_start(ifp) break; } } - m_copydata(m0, 0, m0->m_pkthdr.len, mtod(m, caddr_t)); + m_copydata(m0, 0, m0->m_pkthdr.len, mtod(m, void *)); m->m_pkthdr.len = m->m_len = m0->m_pkthdr.len; error = bus_dmamap_load_mbuf(sc->sc_dmatag, dmamap, m, BUS_DMA_WRITE|BUS_DMA_NOWAIT); @@ -1545,7 +1545,7 @@ gem_rint(sc) if (sc->sc_ethercom.ec_capenable & ETHERCAP_VLAN_MTU) { pktlen = m->m_pkthdr.len - ETHER_HDR_LEN - ETHER_VLAN_ENCAP_LEN; - eh = (struct ether_header *) mtod(m, caddr_t) + + eh = (struct ether_header *) mtod(m, void *) + ETHER_VLAN_ENCAP_LEN; } else { pktlen = m->m_pkthdr.len - ETHER_HDR_LEN; @@ -1553,7 +1553,7 @@ gem_rint(sc) } if (ntohs(eh->ether_type) != ETHERTYPE_IP) goto swcsum; - ip = (struct ip *) ((caddr_t)eh + ETHER_HDR_LEN); + ip = (struct ip *) ((void *)eh + ETHER_HDR_LEN); /* IPv4 only */ if (ip->ip_v != IPVERSION) @@ -1585,7 +1585,7 @@ gem_rint(sc) goto swcsum; if (pktlen < (hlen + sizeof(struct udphdr))) goto swcsum; - uh = (struct udphdr *)((caddr_t)ip + hlen); + uh = (struct udphdr *)((void *)ip + hlen); /* no checksum */ if (uh->uh_sum == 0) goto swcsum; @@ -1605,7 +1605,7 @@ gem_rint(sc) optsum = 0; temp = hlen - sizeof(struct ip); - opts = (uint16_t *) ((caddr_t) ip + + opts = (uint16_t *) ((void *) ip + sizeof(struct ip)); while (temp > 1) { @@ -2034,7 +2034,7 @@ int gem_ioctl(ifp, cmd, data) struct ifnet *ifp; u_long cmd; - caddr_t data; + void *data; { struct gem_softc *sc = ifp->if_softc; struct ifreq *ifr = (struct ifreq *)data; diff --git a/sys/dev/ic/hd44780_subr.c b/sys/dev/ic/hd44780_subr.c index dd5a3720f85..15296b2814b 100644 --- a/sys/dev/ic/hd44780_subr.c +++ b/sys/dev/ic/hd44780_subr.c @@ -1,4 +1,4 @@ -/* $NetBSD: hd44780_subr.c,v 1.9 2006/04/12 19:38:23 jmmv Exp $ */ +/* $NetBSD: hd44780_subr.c,v 1.10 2007/03/04 06:01:55 christos Exp $ */ /* * Copyright (c) 2002 Dennis I. Chernoivanov @@ -32,7 +32,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: hd44780_subr.c,v 1.9 2006/04/12 19:38:23 jmmv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: hd44780_subr.c,v 1.10 2007/03/04 06:01:55 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -88,7 +88,7 @@ const struct wsdisplay_emulops hlcd_emulops = { hlcd_allocattr }; -static int hlcd_ioctl(void *, void *, u_long, caddr_t, int, struct lwp *); +static int hlcd_ioctl(void *, void *, u_long, void *, int, struct lwp *); static paddr_t hlcd_mmap(void *, void *, off_t, int); static int hlcd_alloc_screen(void *, const struct wsscreen_descr *, void **, int *, int *, long *); @@ -232,7 +232,7 @@ hlcd_ioctl(v, vs, cmd, data, flag, l) void *v; void *vs; u_long cmd; - caddr_t data; + void *data; int flag; struct lwp *l; { @@ -507,7 +507,7 @@ int hd44780_ioctl_subr(sc, cmd, data) struct hd44780_chip *sc; u_long cmd; - caddr_t data; + void *data; { u_int8_t tmp; int error = 0; diff --git a/sys/dev/ic/hd44780var.h b/sys/dev/ic/hd44780var.h index 92ddcc5eb16..27212983aa4 100644 --- a/sys/dev/ic/hd44780var.h +++ b/sys/dev/ic/hd44780var.h @@ -1,4 +1,4 @@ -/* $NetBSD: hd44780var.h,v 1.4 2005/12/11 12:21:26 christos Exp $ */ +/* $NetBSD: hd44780var.h,v 1.5 2007/03/04 06:01:55 christos Exp $ */ /* * Copyright (c) 2002 Dennis I. Chernoivanov @@ -137,7 +137,7 @@ void hd44780_attach_subr(struct hd44780_chip *); void hd44780_busy_wait(struct hd44780_chip *, u_int32_t); int hd44780_init(struct hd44780_chip *); int hd44780_chipinit(struct hd44780_chip *, u_int32_t); -int hd44780_ioctl_subr(struct hd44780_chip *, u_long, caddr_t); +int hd44780_ioctl_subr(struct hd44780_chip *, u_long, void *); void hd44780_ddram_redraw(struct hd44780_chip *, u_int32_t, struct hd44780_io *); #define HD_DDRAM_READ 0x0 diff --git a/sys/dev/ic/hd64570.c b/sys/dev/ic/hd64570.c index d64792f8801..d16497edb61 100644 --- a/sys/dev/ic/hd64570.c +++ b/sys/dev/ic/hd64570.c @@ -1,4 +1,4 @@ -/* $NetBSD: hd64570.c,v 1.35 2007/02/17 22:34:07 dyoung Exp $ */ +/* $NetBSD: hd64570.c,v 1.36 2007/03/04 06:01:55 christos Exp $ */ /* * Copyright (c) 1999 Christian E. Hopps @@ -65,7 +65,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: hd64570.c,v 1.35 2007/02/17 22:34:07 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: hd64570.c,v 1.36 2007/03/04 06:01:55 christos Exp $"); #include "bpfilter.h" #include "opt_inet.h" @@ -171,11 +171,11 @@ static void sca_port_down(sca_port_t *); static int sca_output(struct ifnet *, struct mbuf *, const struct sockaddr *, struct rtentry *); -static int sca_ioctl(struct ifnet *, u_long, caddr_t); +static int sca_ioctl(struct ifnet *, u_long, void *); static void sca_start(struct ifnet *); static void sca_watchdog(struct ifnet *); -static struct mbuf *sca_mbuf_alloc(struct sca_softc *, caddr_t, u_int); +static struct mbuf *sca_mbuf_alloc(struct sca_softc *, void *, u_int); #if SCA_DEBUG_LEVEL > 0 static void sca_frame_print(sca_port_t *, sca_desc_t *, u_int8_t *); @@ -929,7 +929,7 @@ static int sca_ioctl(ifp, cmd, addr) struct ifnet *ifp; u_long cmd; - caddr_t addr; + void *addr; { struct ifreq *ifr; struct ifaddr *ifa; @@ -2011,7 +2011,7 @@ sca_port_starttx(sca_port_t *scp) * otherwise let the caller handle copying the data in. */ static struct mbuf * -sca_mbuf_alloc(struct sca_softc *sc, caddr_t p, u_int len) +sca_mbuf_alloc(struct sca_softc *sc, void *p, u_int len) { struct mbuf *m; @@ -2037,7 +2037,7 @@ sca_mbuf_alloc(struct sca_softc *sc, caddr_t p, u_int len) if (p != NULL) { /* XXX do we need to sync here? */ if (sc->sc_usedma) - memcpy(mtod(m, caddr_t), p, len); + memcpy(mtod(m, void *), p, len); else bus_space_read_region_1(sc->scu_memt, sc->scu_memh, sca_page_addr(sc, p), mtod(m, u_int8_t *), len); diff --git a/sys/dev/ic/hd64570var.h b/sys/dev/ic/hd64570var.h index 8e3f61d4923..524f966d55a 100644 --- a/sys/dev/ic/hd64570var.h +++ b/sys/dev/ic/hd64570var.h @@ -1,4 +1,4 @@ -/* $NetBSD: hd64570var.h,v 1.7 2005/12/11 12:21:26 christos Exp $ */ +/* $NetBSD: hd64570var.h,v 1.8 2007/03/04 06:01:55 christos Exp $ */ /* * Copyright (c) 1999 Christian E. Hopps @@ -184,7 +184,7 @@ struct sca_softc { bus_dma_tag_t d_dmat; /* bus DMA tag */ bus_dmamap_t d_dmam; /* bus DMA map */ bus_dma_segment_t d_seg; /* bus DMA segment */ - caddr_t d_dma_addr; /* kva of segment */ + void * d_dma_addr; /* kva of segment */ bus_size_t d_allocsize; /* size of region */ } u_dma; } sc_u; diff --git a/sys/dev/ic/hme.c b/sys/dev/ic/hme.c index 5522ad65a9e..f683aec6ea0 100644 --- a/sys/dev/ic/hme.c +++ b/sys/dev/ic/hme.c @@ -1,4 +1,4 @@ -/* $NetBSD: hme.c,v 1.55 2006/11/24 19:46:59 christos Exp $ */ +/* $NetBSD: hme.c,v 1.56 2007/03/04 06:01:55 christos Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -41,7 +41,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: hme.c,v 1.55 2006/11/24 19:46:59 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: hme.c,v 1.56 2007/03/04 06:01:55 christos Exp $"); /* #define HMEDEBUG */ @@ -94,7 +94,7 @@ __KERNEL_RCSID(0, "$NetBSD: hme.c,v 1.55 2006/11/24 19:46:59 christos Exp $"); void hme_start(struct ifnet *); void hme_stop(struct hme_softc *); -int hme_ioctl(struct ifnet *, u_long, caddr_t); +int hme_ioctl(struct ifnet *, u_long, void *); void hme_tick(void *); void hme_watchdog(struct ifnet *); void hme_shutdown(void *); @@ -386,7 +386,7 @@ hme_meminit(sc) { bus_addr_t txbufdma, rxbufdma; bus_addr_t dma; - caddr_t p; + char *p; unsigned int ntbuf, nrbuf, i; struct hme_ring *hr = &sc->sc_rb; @@ -405,7 +405,7 @@ hme_meminit(sc) dma += ntbuf * HME_XD_SIZE; /* We have reserved descriptor space until the next 2048 byte boundary.*/ dma = (bus_addr_t)roundup((u_long)dma, 2048); - p = (caddr_t)roundup((u_long)p, 2048); + p = (void *)roundup((u_long)p, 2048); /* * Allocate receive descriptors @@ -416,7 +416,7 @@ hme_meminit(sc) dma += nrbuf * HME_XD_SIZE; /* Again move forward to the next 2048 byte boundary.*/ dma = (bus_addr_t)roundup((u_long)dma, 2048); - p = (caddr_t)roundup((u_long)p, 2048); + p = (void *)roundup((u_long)p, 2048); /* @@ -674,16 +674,16 @@ hme_put(sc, ri, m) { struct mbuf *n; int len, tlen = 0; - caddr_t bp; + char *bp; - bp = sc->sc_rb.rb_txbuf + (ri % sc->sc_rb.rb_ntbuf) * _HME_BUFSZ; + bp = (char *)sc->sc_rb.rb_txbuf + (ri % sc->sc_rb.rb_ntbuf) * _HME_BUFSZ; for (; m; m = n) { len = m->m_len; if (len == 0) { MFREE(m, n); continue; } - memcpy(bp, mtod(m, caddr_t), len); + memcpy(bp, mtod(m, void *), len); bp += len; tlen += len; MFREE(m, n); @@ -705,7 +705,7 @@ hme_get(sc, ri, flags) { struct ifnet *ifp = &sc->sc_ethercom.ec_if; struct mbuf *m, *m0, *newm; - caddr_t bp; + char *bp; int len, totlen; totlen = HME_XD_DECODE_RSIZE(flags); @@ -717,7 +717,7 @@ hme_get(sc, ri, flags) len = MHLEN; m = m0; - bp = sc->sc_rb.rb_rxbuf + (ri % sc->sc_rb.rb_nrbuf) * _HME_BUFSZ; + bp = (char *)sc->sc_rb.rb_rxbuf + (ri % sc->sc_rb.rb_nrbuf) * _HME_BUFSZ; while (totlen > 0) { if (totlen >= MINCLSIZE) { @@ -728,7 +728,7 @@ hme_get(sc, ri, flags) } if (m == m0) { - caddr_t newdata = (caddr_t) + char *newdata = (char *) ALIGN(m->m_data + sizeof(struct ether_header)) - sizeof(struct ether_header); len -= newdata - m->m_data; @@ -736,7 +736,7 @@ hme_get(sc, ri, flags) } m->m_len = len = min(totlen, len); - memcpy(mtod(m, caddr_t), bp, len); + memcpy(mtod(m, void *), bp, len); bp += len; totlen -= len; @@ -762,7 +762,7 @@ hme_get(sc, ri, flags) if (sc->sc_ethercom.ec_capenable & ETHERCAP_VLAN_MTU) { pktlen = m0->m_pkthdr.len - ETHER_HDR_LEN - ETHER_VLAN_ENCAP_LEN; - eh = (struct ether_header *) mtod(m0, caddr_t) + + eh = (struct ether_header *) mtod(m0, void *) + ETHER_VLAN_ENCAP_LEN; } else { pktlen = m0->m_pkthdr.len - ETHER_HDR_LEN; @@ -770,7 +770,7 @@ hme_get(sc, ri, flags) } if (ntohs(eh->ether_type) != ETHERTYPE_IP) goto swcsum; - ip = (struct ip *) ((caddr_t) eh + ETHER_HDR_LEN); + ip = (struct ip *) ((char *)eh + ETHER_HDR_LEN); /* IPv4 only */ if (ip->ip_v != IPVERSION) @@ -801,7 +801,7 @@ hme_get(sc, ri, flags) goto swcsum; if (pktlen < (hlen + sizeof(struct udphdr))) goto swcsum; - uh = (struct udphdr *)((caddr_t)ip + hlen); + uh = (struct udphdr *)((char *)ip + hlen); /* no checksum */ if (uh->uh_sum == 0) goto swcsum; @@ -820,7 +820,7 @@ hme_get(sc, ri, flags) optsum = 0; temp = hlen - sizeof(struct ip); - opts = (uint16_t *) ((caddr_t) ip + sizeof(struct ip)); + opts = (uint16_t *)((char *)ip + sizeof(struct ip)); while (temp > 1) { optsum += ntohs(*opts++); @@ -905,7 +905,7 @@ hme_start(ifp) struct ifnet *ifp; { struct hme_softc *sc = (struct hme_softc *)ifp->if_softc; - caddr_t txd = sc->sc_rb.rb_txd; + void *txd = sc->sc_rb.rb_txd; struct mbuf *m; unsigned int txflags; unsigned int ri, len; @@ -1056,7 +1056,7 @@ int hme_rint(sc) struct hme_softc *sc; { - caddr_t xdr = sc->sc_rb.rb_rxd; + void *xdr = sc->sc_rb.rb_rxd; unsigned int nrbuf = sc->sc_rb.rb_nrbuf; unsigned int ri; u_int32_t flags; @@ -1421,7 +1421,7 @@ int hme_ioctl(ifp, cmd, data) struct ifnet *ifp; u_long cmd; - caddr_t data; + void *data; { struct hme_softc *sc = ifp->if_softc; struct ifaddr *ifa = (struct ifaddr *)data; @@ -1655,7 +1655,7 @@ hme_copytobuf_contig(sc, from, ri, len) void *from; int ri, len; { - volatile caddr_t buf = sc->sc_rb.rb_txbuf + (ri * _HME_BUFSZ); + volatile void *buf = sc->sc_rb.rb_txbuf + (ri * _HME_BUFSZ); /* * Just call memcpy() to do the work. @@ -1669,7 +1669,7 @@ hme_copyfrombuf_contig(sc, to, boff, len) void *to; int boff, len; { - volatile caddr_t buf = sc->sc_rb.rb_rxbuf + (ri * _HME_BUFSZ); + volatile void *buf = sc->sc_rb.rb_rxbuf + (ri * _HME_BUFSZ); /* * Just call memcpy() to do the work. diff --git a/sys/dev/ic/hmereg.h b/sys/dev/ic/hmereg.h index 3de40392bc3..07c9e802b49 100644 --- a/sys/dev/ic/hmereg.h +++ b/sys/dev/ic/hmereg.h @@ -1,4 +1,4 @@ -/* $NetBSD: hmereg.h,v 1.18 2005/12/11 12:21:26 christos Exp $ */ +/* $NetBSD: hmereg.h,v 1.19 2007/03/04 06:01:55 christos Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -300,8 +300,8 @@ struct hme_xd { }; #endif #define HME_XD_SIZE 8 -#define HME_XD_FLAGS(base, index) ((base) + ((index) * HME_XD_SIZE) + 0) -#define HME_XD_ADDR(base, index) ((base) + ((index) * HME_XD_SIZE) + 4) +#define HME_XD_FLAGS(b, i) ((char *)(b) + ((i) * HME_XD_SIZE) + 0) +#define HME_XD_ADDR(b, i) ((char *)(b) + ((i) * HME_XD_SIZE) + 4) #define HME_XD_GETFLAGS(p, b, i) \ (p) ? le32toh(*((u_int32_t *)HME_XD_FLAGS(b,i))) : \ (*((u_int32_t *)HME_XD_FLAGS(b,i))) diff --git a/sys/dev/ic/hmevar.h b/sys/dev/ic/hmevar.h index f3294e239a1..e76b261b346 100644 --- a/sys/dev/ic/hmevar.h +++ b/sys/dev/ic/hmevar.h @@ -1,4 +1,4 @@ -/* $NetBSD: hmevar.h,v 1.14 2005/12/11 12:21:26 christos Exp $ */ +/* $NetBSD: hmevar.h,v 1.15 2007/03/04 06:01:55 christos Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -46,14 +46,14 @@ struct hme_ring { /* Ring Descriptors */ - caddr_t rb_membase; /* Packet buffer: CPU address */ + void * rb_membase; /* Packet buffer: CPU address */ bus_addr_t rb_dmabase; /* Packet buffer: DMA address */ - caddr_t rb_txd; /* Transmit descriptors */ + void * rb_txd; /* Transmit descriptors */ bus_addr_t rb_txddma; /* DMA address of same */ - caddr_t rb_rxd; /* Receive descriptors */ + void * rb_rxd; /* Receive descriptors */ bus_addr_t rb_rxddma; /* DMA address of same */ - caddr_t rb_txbuf; /* Transmit buffers */ - caddr_t rb_rxbuf; /* Receive buffers */ + void * rb_txbuf; /* Transmit buffers */ + void * rb_rxbuf; /* Receive buffers */ int rb_ntbuf; /* # of transmit buffers */ int rb_nrbuf; /* # of receive buffers */ diff --git a/sys/dev/ic/i82365.c b/sys/dev/ic/i82365.c index 424d6ca99af..f87b17d6fff 100644 --- a/sys/dev/ic/i82365.c +++ b/sys/dev/ic/i82365.c @@ -1,4 +1,4 @@ -/* $NetBSD: i82365.c,v 1.97 2006/11/16 01:32:51 christos Exp $ */ +/* $NetBSD: i82365.c,v 1.98 2007/03/04 06:01:55 christos Exp $ */ /* * Copyright (c) 2004 Charles M. Hannum. All rights reserved. @@ -49,7 +49,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: i82365.c,v 1.97 2006/11/16 01:32:51 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: i82365.c,v 1.98 2007/03/04 06:01:55 christos Exp $"); #define PCICDEBUG @@ -565,7 +565,7 @@ pcic_event_thread(arg) } else { splx(s); /* sleep .25s to be enqueued chatterling interrupts */ - (void) tsleep((caddr_t)pcic_event_thread, PWAIT, + (void) tsleep((void *)pcic_event_thread, PWAIT, "pcicss", hz/4); } s = splhigh(); diff --git a/sys/dev/ic/i82557.c b/sys/dev/ic/i82557.c index 0848962c506..07a2922c2aa 100644 --- a/sys/dev/ic/i82557.c +++ b/sys/dev/ic/i82557.c @@ -1,4 +1,4 @@ -/* $NetBSD: i82557.c,v 1.100 2006/11/16 01:32:51 christos Exp $ */ +/* $NetBSD: i82557.c,v 1.101 2007/03/04 06:01:55 christos Exp $ */ /*- * Copyright (c) 1997, 1998, 1999, 2001, 2002 The NetBSD Foundation, Inc. @@ -73,7 +73,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: i82557.c,v 1.100 2006/11/16 01:32:51 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: i82557.c,v 1.101 2007/03/04 06:01:55 christos Exp $"); #include "bpfilter.h" #include "rnd.h" @@ -183,7 +183,7 @@ int fxp_80c24_mediachange(struct ifnet *); void fxp_80c24_mediastatus(struct ifnet *, struct ifmediareq *); void fxp_start(struct ifnet *); -int fxp_ioctl(struct ifnet *, u_long, caddr_t); +int fxp_ioctl(struct ifnet *, u_long, void *); void fxp_watchdog(struct ifnet *); int fxp_init(struct ifnet *); void fxp_stop(struct ifnet *, int); @@ -311,7 +311,7 @@ fxp_attach(struct fxp_softc *sc) } if ((error = bus_dmamem_map(sc->sc_dmat, &seg, rseg, - sizeof(struct fxp_control_data), (caddr_t *)&sc->sc_control_data, + sizeof(struct fxp_control_data), (void **)&sc->sc_control_data, BUS_DMA_COHERENT)) != 0) { aprint_error("%s: unable to map control data, error = %d\n", sc->sc_dev.dv_xname, error); @@ -480,7 +480,7 @@ fxp_attach(struct fxp_softc *sc) fail_3: bus_dmamap_destroy(sc->sc_dmat, sc->sc_dmamap); fail_2: - bus_dmamem_unmap(sc->sc_dmat, (caddr_t)sc->sc_control_data, + bus_dmamem_unmap(sc->sc_dmat, (void *)sc->sc_control_data, sizeof(struct fxp_control_data)); fail_1: bus_dmamem_free(sc->sc_dmat, &seg, rseg); @@ -954,7 +954,7 @@ fxp_start(struct ifnet *ifp) break; } } - m_copydata(m0, 0, m0->m_pkthdr.len, mtod(m, caddr_t)); + m_copydata(m0, 0, m0->m_pkthdr.len, mtod(m, void *)); m->m_pkthdr.len = m->m_len = m0->m_pkthdr.len; error = bus_dmamap_load_mbuf(sc->sc_dmat, dmamap, m, BUS_DMA_WRITE|BUS_DMA_NOWAIT); @@ -1382,8 +1382,8 @@ fxp_rxintr(struct fxp_softc *sc) if (m0 == NULL) goto dropit; MCLAIM(m0, &sc->sc_ethercom.ec_rx_mowner); - memcpy(mtod(m0, caddr_t), - mtod(m, caddr_t), len); + memcpy(mtod(m0, void *), + mtod(m, void *), len); m0->m_pkthdr.csum_flags = m->m_pkthdr.csum_flags; m0->m_pkthdr.csum_data = m->m_pkthdr.csum_data; FXP_INIT_RFABUF(sc, m); @@ -2115,7 +2115,7 @@ fxp_mdi_write(struct device *self, int phy, int reg, int value) } int -fxp_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) +fxp_ioctl(struct ifnet *ifp, u_long cmd, void *data) { struct fxp_softc *sc = ifp->if_softc; struct ifreq *ifr = (struct ifreq *)data; @@ -2468,7 +2468,7 @@ fxp_detach(struct fxp_softc *sc) bus_dmamap_unload(sc->sc_dmat, sc->sc_dmamap); bus_dmamap_destroy(sc->sc_dmat, sc->sc_dmamap); - bus_dmamem_unmap(sc->sc_dmat, (caddr_t)sc->sc_control_data, + bus_dmamem_unmap(sc->sc_dmat, (void *)sc->sc_control_data, sizeof(struct fxp_control_data)); bus_dmamem_free(sc->sc_dmat, &sc->sc_cdseg, sc->sc_cdnseg); diff --git a/sys/dev/ic/i82586.c b/sys/dev/ic/i82586.c index aad4755de7a..6b9a4fd9864 100644 --- a/sys/dev/ic/i82586.c +++ b/sys/dev/ic/i82586.c @@ -1,4 +1,4 @@ -/* $NetBSD: i82586.c,v 1.57 2006/11/16 01:32:51 christos Exp $ */ +/* $NetBSD: i82586.c,v 1.58 2007/03/04 06:01:56 christos Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -144,7 +144,7 @@ Mode of operation: */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: i82586.c,v 1.57 2006/11/16 01:32:51 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: i82586.c,v 1.58 2007/03/04 06:01:56 christos Exp $"); #include "bpfilter.h" @@ -176,7 +176,7 @@ __KERNEL_RCSID(0, "$NetBSD: i82586.c,v 1.57 2006/11/16 01:32:51 christos Exp $") void i82586_reset(struct ie_softc *, int); void i82586_watchdog(struct ifnet *); int i82586_init(struct ifnet *); -int i82586_ioctl(struct ifnet *, u_long, caddr_t); +int i82586_ioctl(struct ifnet *, u_long, void *); void i82586_start(struct ifnet *); void i82586_stop(struct ifnet *, int); @@ -964,7 +964,7 @@ ieget(sc, head, totlen) } if (m == m0) { - caddr_t newdata = (caddr_t) + char *newdata = (char *) ALIGN(m->m_data + sizeof(struct ether_header)) - sizeof(struct ether_header); len -= newdata - m->m_data; @@ -989,7 +989,7 @@ ieget(sc, head, totlen) /* * Copy the Ethernet header into the mbuf chain. */ - memcpy(mtod(m, caddr_t), &eh, sizeof(struct ether_header)); + memcpy(mtod(m, void *), &eh, sizeof(struct ether_header)); thismboff = sizeof(struct ether_header); thisrboff = sizeof(struct ether_header); resid -= sizeof(struct ether_header); @@ -1004,7 +1004,7 @@ ieget(sc, head, totlen) thismblen = m->m_len - thismboff; len = min(thisrblen, thismblen); - (sc->memcopyin)(sc, mtod(m, caddr_t) + thismboff, + (sc->memcopyin)(sc, mtod(m, char *) + thismboff, IE_RBUF_ADDR(sc,head) + thisrboff, (u_int)len); resid -= len; @@ -1220,7 +1220,7 @@ i82586_start(ifp) buffer = IE_XBUF_ADDR(sc, head); for (m = m0; m != 0; m = m->m_next) { - (sc->memcopyout)(sc, mtod(m,caddr_t), buffer, m->m_len); + (sc->memcopyout)(sc, mtod(m,void *), buffer, m->m_len); buffer += m->m_len; } len = m0->m_pkthdr.len; @@ -1647,7 +1647,7 @@ ie_mc_setup(sc, cmdbuf) setup_simple_command(sc, IE_CMD_MCAST, cmdbuf); - (sc->memcopyout)(sc, (caddr_t)sc->mcast_addrs, + (sc->memcopyout)(sc, (void *)sc->mcast_addrs, IE_CMD_MCAST_MADDR(cmdbuf), sc->mcast_count * ETHER_ADDR_LEN); @@ -1795,7 +1795,7 @@ int i82586_ioctl(ifp, cmd, data) struct ifnet *ifp; u_long cmd; - caddr_t data; + void *data; { struct ie_softc *sc = ifp->if_softc; struct ifreq *ifr = (struct ifreq *)data; diff --git a/sys/dev/ic/i82586reg.h b/sys/dev/ic/i82586reg.h index 4d7d67ab7dc..120cd821334 100644 --- a/sys/dev/ic/i82586reg.h +++ b/sys/dev/ic/i82586reg.h @@ -1,4 +1,4 @@ -/* $NetBSD: i82586reg.h,v 1.11 2005/12/11 12:21:26 christos Exp $ */ +/* $NetBSD: i82586reg.h,v 1.12 2007/03/04 06:01:56 christos Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -142,7 +142,7 @@ struct __ie_int_sys_conf_ptr { u_int8_t ie_busy; // zeroed after init u_int8_t mbz; u_int16_t ie_scb_offset; // 16-bit physaddr of next struct - caddr_t ie_base; // 24-bit physaddr for all 16-bit vars + void * ie_base; // 24-bit physaddr for all 16-bit vars }; */ #define IE_ISCP_SZ 8 @@ -263,7 +263,7 @@ struct __ie_recv_frame_desc { struct __ie_recv_buf_desc { u_int16_t ie_rbd_status; // status for this buffer u_int16_t ie_rbd_next; // 16-pointer to next RBD - caddr_t ie_rbd_buffer; // 24-pointer to buffer for this RBD + void * ie_rbd_buffer; // 24-pointer to buffer for this RBD u_int16_t ie_rbd_length; // length of the buffer u_int16_t mbz; // must be zero }; @@ -368,7 +368,7 @@ struct __ie_xmit_cmd { struct __ie_xmit_buf { u_int16_t ie_xmit_flags; // see below u_int16_t ie_xmit_next; // 16-pointer to next desc - caddr_t ie_xmit_buf; // 24-pointer to the actual buffer + void *ie_xmit_buf; // 24-pointer to the actual buffer }; */ #define IE_XBD_SZ 8 diff --git a/sys/dev/ic/i82596.c b/sys/dev/ic/i82596.c index 4df946fef7d..99387200538 100644 --- a/sys/dev/ic/i82596.c +++ b/sys/dev/ic/i82596.c @@ -1,4 +1,4 @@ -/* $NetBSD: i82596.c,v 1.14 2006/07/12 05:12:06 skrll Exp $ */ +/* $NetBSD: i82596.c,v 1.15 2007/03/04 06:01:56 christos Exp $ */ /* * Copyright (c) 2003 Jochen Kunz. @@ -43,7 +43,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: i82596.c,v 1.14 2006/07/12 05:12:06 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: i82596.c,v 1.15 2007/03/04 06:01:56 christos Exp $"); /* autoconfig and device stuff */ #include <sys/param.h> @@ -90,7 +90,7 @@ static void iee_mediastatus(struct ifnet *, struct ifmediareq *); /* interface routines to upper protocols */ static void iee_start(struct ifnet *); /* initiate output */ -static int iee_ioctl(struct ifnet *, u_long, caddr_t); /* ioctl routine */ +static int iee_ioctl(struct ifnet *, u_long, void *); /* ioctl routine */ static int iee_init(struct ifnet *); /* init routine */ static void iee_stop(struct ifnet *, int); /* stop routine */ static void iee_watchdog(struct ifnet *); /* timer routine */ @@ -643,7 +643,7 @@ iee_start(struct ifnet *ifp) continue; } m_copydata(sc->sc_tx_mbuf[t], 0, - sc->sc_tx_mbuf[t]->m_pkthdr.len, mtod(m, caddr_t)); + sc->sc_tx_mbuf[t]->m_pkthdr.len, mtod(m, void *)); m->m_pkthdr.len = sc->sc_tx_mbuf[t]->m_pkthdr.len; m->m_len = sc->sc_tx_mbuf[t]->m_pkthdr.len; m_freem(sc->sc_tx_mbuf[t]); @@ -697,7 +697,7 @@ iee_start(struct ifnet *ifp) /* ioctl routine */ int -iee_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) +iee_ioctl(struct ifnet *ifp, u_long cmd, void *data) { struct iee_softc *sc = ifp->if_softc; int s; diff --git a/sys/dev/ic/i82596var.h b/sys/dev/ic/i82596var.h index 148ede48096..55beaf7d47b 100644 --- a/sys/dev/ic/i82596var.h +++ b/sys/dev/ic/i82596var.h @@ -1,4 +1,4 @@ -/* $NetBSD: i82596var.h,v 1.6 2006/07/08 16:07:47 skrll Exp $ */ +/* $NetBSD: i82596var.h,v 1.7 2007/03/04 06:01:56 christos Exp $ */ /* * Copyright (c) 2003 Jochen Kunz. @@ -160,7 +160,7 @@ struct iee_softc { bus_dmamap_t sc_tx_map[IEE_NCB]; struct mbuf *sc_rx_mbuf[IEE_NRFD]; struct mbuf *sc_tx_mbuf[IEE_NCB]; - caddr_t sc_shmem_addr; + void *sc_shmem_addr; int sc_next_cb; int sc_next_tbd; int sc_rx_done; diff --git a/sys/dev/ic/iavcvar.h b/sys/dev/ic/iavcvar.h index 56a2fabd9a8..cef8bd8abd6 100644 --- a/sys/dev/ic/iavcvar.h +++ b/sys/dev/ic/iavcvar.h @@ -1,4 +1,4 @@ -/* $NetBSD: iavcvar.h,v 1.3 2005/12/11 12:21:27 christos Exp $ */ +/* $NetBSD: iavcvar.h,v 1.4 2007/03/04 06:01:56 christos Exp $ */ /* * Copyright (c) 2001-2003 Cubical Solutions Ltd. All rights reserved. @@ -72,8 +72,8 @@ typedef struct iavc_softc { u_int32_t sc_csr; - caddr_t sc_sendbuf; - caddr_t sc_recvbuf; + void * sc_sendbuf; + void * sc_recvbuf; u_int32_t sc_recv1; diff --git a/sys/dev/ic/icp.c b/sys/dev/ic/icp.c index 25d333065fb..76d777aea30 100644 --- a/sys/dev/ic/icp.c +++ b/sys/dev/ic/icp.c @@ -1,4 +1,4 @@ -/* $NetBSD: icp.c,v 1.22 2006/11/16 01:32:51 christos Exp $ */ +/* $NetBSD: icp.c,v 1.23 2007/03/04 06:01:56 christos Exp $ */ /*- * Copyright (c) 2002, 2003 The NetBSD Foundation, Inc. @@ -83,7 +83,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: icp.c,v 1.22 2006/11/16 01:32:51 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: icp.c,v 1.23 2007/03/04 06:01:56 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -784,7 +784,7 @@ icp_ucmd_intr(struct icp_ccb *ic) ICP_SCRATCH_UCMD, iu->iu_cnt, BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE); memcpy(ucmd->data, - icp->icp_scr + ICP_SCRATCH_UCMD, iu->iu_cnt); + (char *)icp->icp_scr + ICP_SCRATCH_UCMD, iu->iu_cnt); } icp->icp_ucmd_ccb = NULL; @@ -1062,7 +1062,7 @@ icp_ccb_enqueue(struct icp_softc *icp, struct icp_ccb *ic) icp->icp_ucmd_ccb = ic; if (iu->iu_cnt != 0) { - memcpy(icp->icp_scr + ICP_SCRATCH_UCMD, + memcpy((char *)icp->icp_scr + ICP_SCRATCH_UCMD, ucmd->data, iu->iu_cnt); bus_dmamap_sync(icp->icp_dmat, icp->icp_scr_dmamap, diff --git a/sys/dev/ic/icp_ioctl.c b/sys/dev/ic/icp_ioctl.c index 9328333382f..8045c397e4f 100644 --- a/sys/dev/ic/icp_ioctl.c +++ b/sys/dev/ic/icp_ioctl.c @@ -1,4 +1,4 @@ -/* $NetBSD: icp_ioctl.c,v 1.14 2006/12/02 03:10:43 elad Exp $ */ +/* $NetBSD: icp_ioctl.c,v 1.15 2007/03/04 06:01:56 christos Exp $ */ /*- * Copyright (c) 2003 The NetBSD Foundation, Inc. @@ -76,7 +76,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: icp_ioctl.c,v 1.14 2006/12/02 03:10:43 elad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: icp_ioctl.c,v 1.15 2007/03/04 06:01:56 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -120,7 +120,7 @@ icpopen(dev_t dev, int flag, int mode, struct lwp *l) } static int -icpioctl(dev_t dev, u_long cmd, caddr_t data, int flag, +icpioctl(dev_t dev, u_long cmd, void *data, int flag, struct lwp *l) { int error; diff --git a/sys/dev/ic/icpsp.c b/sys/dev/ic/icpsp.c index 5be9882267e..e8ee5da11c7 100644 --- a/sys/dev/ic/icpsp.c +++ b/sys/dev/ic/icpsp.c @@ -1,4 +1,4 @@ -/* $NetBSD: icpsp.c,v 1.16 2006/11/16 01:32:51 christos Exp $ */ +/* $NetBSD: icpsp.c,v 1.17 2007/03/04 06:01:56 christos Exp $ */ /*- * Copyright (c) 2002 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: icpsp.c,v 1.16 2006/11/16 01:32:51 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: icpsp.c,v 1.17 2007/03/04 06:01:56 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -313,7 +313,8 @@ icpsp_intr(struct icp_ccb *ic) xs->resid = 0; break; case SCSI_CHECK: - memcpy(&xs->sense.scsi_sense, icp->icp_scr + soff, + memcpy(&xs->sense.scsi_sense, + (char *)icp->icp_scr + soff, sizeof(xs->sense.scsi_sense)); xs->error = XS_SENSE; /* FALLTHROUGH */ diff --git a/sys/dev/ic/icpvar.h b/sys/dev/ic/icpvar.h index c6aa1eb3b0a..e6d9278095b 100644 --- a/sys/dev/ic/icpvar.h +++ b/sys/dev/ic/icpvar.h @@ -1,4 +1,4 @@ -/* $NetBSD: icpvar.h,v 1.7 2005/12/11 12:21:27 christos Exp $ */ +/* $NetBSD: icpvar.h,v 1.8 2007/03/04 06:01:56 christos Exp $ */ /*- * Copyright (c) 2002, 2003 The NetBSD Foundation, Inc. @@ -144,7 +144,7 @@ struct icp_softc { bus_dmamap_t icp_scr_dmamap; bus_dma_segment_t icp_scr_seg[1]; - caddr_t icp_scr; + void * icp_scr; struct icp_ccb *icp_ccbs; u_int icp_nccbs; diff --git a/sys/dev/ic/igsfb.c b/sys/dev/ic/igsfb.c index a0d1b6e4258..0d41827b3c6 100644 --- a/sys/dev/ic/igsfb.c +++ b/sys/dev/ic/igsfb.c @@ -1,4 +1,4 @@ -/* $NetBSD: igsfb.c,v 1.41 2007/01/13 19:45:28 cube Exp $ */ +/* $NetBSD: igsfb.c,v 1.42 2007/03/04 06:01:56 christos Exp $ */ /* * Copyright (c) 2002, 2003 Valeriy E. Ushakov @@ -31,7 +31,7 @@ * Integraphics Systems IGA 168x and CyberPro series. */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: igsfb.c,v 1.41 2007/01/13 19:45:28 cube Exp $"); +__KERNEL_RCSID(0, "$NetBSD: igsfb.c,v 1.42 2007/03/04 06:01:56 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -78,7 +78,7 @@ static const struct wsscreen_list igsfb_screenlist = { * wsdisplay_accessops */ -static int igsfb_ioctl(void *, void *, u_long, caddr_t, int, struct lwp *); +static int igsfb_ioctl(void *, void *, u_long, void *, int, struct lwp *); static paddr_t igsfb_mmap(void *, void *, off_t, int); static struct wsdisplay_accessops igsfb_accessops = { @@ -589,7 +589,7 @@ igsfb_mmap(void *v, void *vs, off_t offset, int prot) * wsdisplay_accessops: ioctl() */ static int -igsfb_ioctl(void *v, void *vs, u_long cmd, caddr_t data, int flag, +igsfb_ioctl(void *v, void *vs, u_long cmd, void *data, int flag, struct lwp *l) { struct vcons_data *vd = v; diff --git a/sys/dev/ic/iha.c b/sys/dev/ic/iha.c index d4b03377f6d..24345982a59 100644 --- a/sys/dev/ic/iha.c +++ b/sys/dev/ic/iha.c @@ -1,4 +1,4 @@ -/* $NetBSD: iha.c,v 1.34 2006/05/21 23:56:09 christos Exp $ */ +/* $NetBSD: iha.c,v 1.35 2007/03/04 06:01:57 christos Exp $ */ /*- * Device driver for the INI-9XXXU/UW or INIC-940/950 PCI SCSI Controller. @@ -39,7 +39,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: iha.c,v 1.34 2006/05/21 23:56:09 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: iha.c,v 1.35 2007/03/04 06:01:57 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -620,7 +620,7 @@ iha_alloc_sglist(struct iha_softc *sc) return (error); } if ((error = bus_dmamem_map(sc->sc_dmat, &seg, rseg, - IHA_SG_SIZE * IHA_MAX_SCB, (caddr_t *)&sc->sc_sglist, + IHA_SG_SIZE * IHA_MAX_SCB, (void **)&sc->sc_sglist, BUS_DMA_NOWAIT | BUS_DMA_COHERENT)) != 0) { printf(": unable to map sglist, error = %d\n", error); return (error); diff --git a/sys/dev/ic/isp_netbsd.c b/sys/dev/ic/isp_netbsd.c index a2d5d7c4a2f..2cad52cf12b 100644 --- a/sys/dev/ic/isp_netbsd.c +++ b/sys/dev/ic/isp_netbsd.c @@ -1,4 +1,4 @@ -/* $NetBSD: isp_netbsd.c,v 1.72 2007/01/13 19:41:12 cube Exp $ */ +/* $NetBSD: isp_netbsd.c,v 1.73 2007/03/04 06:01:57 christos Exp $ */ /* * This driver, which is contained in NetBSD in the files: * @@ -59,7 +59,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: isp_netbsd.c,v 1.72 2007/01/13 19:41:12 cube Exp $"); +__KERNEL_RCSID(0, "$NetBSD: isp_netbsd.c,v 1.73 2007/03/04 06:01:57 christos Exp $"); #include <dev/ic/isp_netbsd.h> #include <sys/scsiio.h> @@ -89,7 +89,7 @@ static void ispminphys(struct buf *); static INLINE void ispcmd(struct ispsoftc *, XS_T *); static void isprequest(struct scsipi_channel *, scsipi_adapter_req_t, void *); static int -ispioctl(struct scsipi_channel *, u_long, caddr_t, int, struct proc *); +ispioctl(struct scsipi_channel *, u_long, void *, int, struct proc *); static void isp_polled_cmd(struct ispsoftc *, XS_T *); static void isp_dog(void *); @@ -233,7 +233,7 @@ ispminphys(struct buf *bp) } static int -ispioctl(struct scsipi_channel *chan, u_long cmd, caddr_t addr, +ispioctl(struct scsipi_channel *chan, u_long cmd, void *addr, int flag, struct proc *p) { struct ispsoftc *isp = (void *)chan->chan_adapter->adapt_dev; diff --git a/sys/dev/ic/isp_netbsd.h b/sys/dev/ic/isp_netbsd.h index 0ed350ab874..5d62dc3f4dd 100644 --- a/sys/dev/ic/isp_netbsd.h +++ b/sys/dev/ic/isp_netbsd.h @@ -1,4 +1,4 @@ -/* $NetBSD: isp_netbsd.h,v 1.57 2006/03/29 04:43:56 thorpej Exp $ */ +/* $NetBSD: isp_netbsd.h,v 1.58 2007/03/04 06:01:57 christos Exp $ */ /* * This driver, which is contained in NetBSD in the files: * @@ -251,7 +251,7 @@ default: \ ((void *)(xs)->xs_periph->periph_channel->chan_adapter->adapt_dev) #define XS_LUN(xs) ((int) (xs)->xs_periph->periph_lun) #define XS_TGT(xs) ((int) (xs)->xs_periph->periph_target) -#define XS_CDBP(xs) ((caddr_t) (xs)->cmd) +#define XS_CDBP(xs) ((char *) (xs)->cmd) #define XS_CDBLEN(xs) (xs)->cmdlen #define XS_XFRLEN(xs) (xs)->datalen #define XS_TIME(xs) (xs)->timeout diff --git a/sys/dev/ic/ispvar.h b/sys/dev/ic/ispvar.h index eb95adb7349..8488f475ada 100644 --- a/sys/dev/ic/ispvar.h +++ b/sys/dev/ic/ispvar.h @@ -1,4 +1,4 @@ -/* $NetBSD: ispvar.h,v 1.64 2005/12/11 12:21:27 christos Exp $ */ +/* $NetBSD: ispvar.h,v 1.65 2007/03/04 06:01:57 christos Exp $ */ /* * This driver, which is contained in NetBSD in the files: * @@ -187,7 +187,7 @@ typedef u_int32_t isp_dma_addr_t; #define RESULT_QUEUE_LEN(x) \ (((MAXISPREQUEST(x) >> 2) < 64)? 64 : MAXISPREQUEST(x) >> 2) #endif -#define ISP_QUEUE_ENTRY(q, idx) ((q) + ((idx) * QENTRY_LEN)) +#define ISP_QUEUE_ENTRY(q, idx) ((char *)(q) + ((idx) * QENTRY_LEN)) #define ISP_QUEUE_SIZE(n) ((n) * QENTRY_LEN) #define ISP_NXT_QENTRY(idx, qlen) (((idx) + 1) & ((qlen)-1)) #define ISP_QFREE(in, out, qlen) \ @@ -338,7 +338,7 @@ typedef struct { /* * Scratch DMA mapped in area to fetch Port Database stuff, etc. */ - caddr_t isp_scratch; + void * isp_scratch; isp_dma_addr_t isp_scdma; #ifdef ISP_FW_CRASH_DUMP u_int16_t *isp_dump_data; @@ -389,7 +389,7 @@ typedef struct ispsoftc { * may contain some volatile state (e.g., current loop state). */ - void * isp_param; /* type specific */ + void * isp_param; /* type specific */ u_int16_t isp_fwrev[3]; /* Loaded F/W revision */ u_int16_t isp_romfw_rev[3]; /* PROM F/W revision */ u_int16_t isp_maxcmds; /* max possible I/O cmds */ @@ -459,8 +459,8 @@ typedef struct ispsoftc { /* * request/result queue pointers and DMA handles for them. */ - caddr_t isp_rquest; - caddr_t isp_result; + void * isp_rquest; + void * isp_result; isp_dma_addr_t isp_rquest_dma; isp_dma_addr_t isp_result_dma; } ispsoftc_t; diff --git a/sys/dev/ic/joy.c b/sys/dev/ic/joy.c index cfde68fa091..a66be5095db 100644 --- a/sys/dev/ic/joy.c +++ b/sys/dev/ic/joy.c @@ -1,4 +1,4 @@ -/* $NetBSD: joy.c,v 1.13 2006/11/16 01:32:51 christos Exp $ */ +/* $NetBSD: joy.c,v 1.14 2007/03/04 06:01:57 christos Exp $ */ /*- * Copyright (c) 1995 Jean-Marc Zucconi @@ -32,7 +32,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: joy.c,v 1.13 2006/11/16 01:32:51 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: joy.c,v 1.14 2007/03/04 06:01:57 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -179,7 +179,7 @@ joyread(dev_t dev, struct uio *uio, int flag) } int -joyioctl(dev_t dev, u_long cmd, caddr_t data, int flag, +joyioctl(dev_t dev, u_long cmd, void *data, int flag, struct lwp *l) { int unit = JOYUNIT(dev); diff --git a/sys/dev/ic/lance.c b/sys/dev/ic/lance.c index f74a56e50f3..87b28633eea 100644 --- a/sys/dev/ic/lance.c +++ b/sys/dev/ic/lance.c @@ -1,4 +1,4 @@ -/* $NetBSD: lance.c,v 1.37 2006/11/16 01:32:51 christos Exp $ */ +/* $NetBSD: lance.c,v 1.38 2007/03/04 06:01:57 christos Exp $ */ /*- * Copyright (c) 1997, 1998 The NetBSD Foundation, Inc. @@ -72,7 +72,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: lance.c,v 1.37 2006/11/16 01:32:51 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: lance.c,v 1.38 2007/03/04 06:01:57 christos Exp $"); #include "bpfilter.h" #include "rnd.h" @@ -126,7 +126,7 @@ void lance_mediastatus(struct ifnet *, struct ifmediareq *); static inline u_int16_t ether_cmp(void *, void *); void lance_stop(struct ifnet *, int); -int lance_ioctl(struct ifnet *, u_long, caddr_t); +int lance_ioctl(struct ifnet *, u_long, void *); void lance_watchdog(struct ifnet *); /* @@ -365,7 +365,7 @@ lance_put(sc, boff, m) MFREE(m, n); continue; } - (*sc->sc_copytobuf)(sc, mtod(m, caddr_t), boff, len); + (*sc->sc_copytobuf)(sc, mtod(m, void *), boff, len); boff += len; tlen += len; MFREE(m, n); @@ -408,7 +408,7 @@ lance_get(sc, boff, totlen) } if (m == m0) { - caddr_t newdata = (caddr_t) + char *newdata = (char *) ALIGN(m->m_data + sizeof(struct ether_header)) - sizeof(struct ether_header); len -= newdata - m->m_data; @@ -416,7 +416,7 @@ lance_get(sc, boff, totlen) } m->m_len = len = min(totlen, len); - (*sc->sc_copyfrombuf)(sc, mtod(m, caddr_t), boff, len); + (*sc->sc_copyfrombuf)(sc, mtod(m, void *), boff, len); boff += len; totlen -= len; @@ -558,7 +558,7 @@ int lance_ioctl(ifp, cmd, data) struct ifnet *ifp; u_long cmd; - caddr_t data; + void *data; { struct lance_softc *sc = ifp->if_softc; struct ifreq *ifr = (struct ifreq *)data; @@ -692,7 +692,7 @@ lance_copytobuf_contig(sc, from, boff, len) void *from; int boff, len; { - volatile caddr_t buf = sc->sc_mem; + char *buf = sc->sc_mem; /* * Just call memcpy() to do the work. @@ -706,7 +706,7 @@ lance_copyfrombuf_contig(sc, to, boff, len) void *to; int boff, len; { - volatile caddr_t buf = sc->sc_mem; + char *buf = sc->sc_mem; /* * Just call memcpy() to do the work. @@ -719,7 +719,7 @@ lance_zerobuf_contig(sc, boff, len) struct lance_softc *sc; int boff, len; { - volatile caddr_t buf = sc->sc_mem; + char *buf = sc->sc_mem; /* * Just let memset() do the work @@ -747,8 +747,8 @@ lance_copytobuf_gap2(sc, fromv, boff, len) int boff; int len; { - volatile caddr_t buf = sc->sc_mem; - caddr_t from = fromv; + volatile void *buf = sc->sc_mem; + void *from = fromv; volatile u_int16_t *bptr; if (boff & 0x1) { @@ -775,8 +775,8 @@ lance_copyfrombuf_gap2(sc, tov, boff, len) void *tov; int boff, len; { - volatile caddr_t buf = sc->sc_mem; - caddr_t to = tov; + volatile void *buf = sc->sc_mem; + void *to = tov; volatile u_int16_t *bptr; u_int16_t tmp; @@ -804,7 +804,7 @@ lance_zerobuf_gap2(sc, boff, len) struct lance_softc *sc; int boff, len; { - volatile caddr_t buf = sc->sc_mem; + volatile void *buf = sc->sc_mem; volatile u_int16_t *bptr; if ((unsigned)boff & 0x1) { @@ -834,9 +834,9 @@ lance_copytobuf_gap16(sc, fromv, boff, len) int boff; int len; { - volatile caddr_t buf = sc->sc_mem; - caddr_t from = fromv; - caddr_t bptr; + volatile void *buf = sc->sc_mem; + void *from = fromv; + void *bptr; int xfer; bptr = buf + ((boff << 1) & ~0x1f); @@ -858,9 +858,9 @@ lance_copyfrombuf_gap16(sc, tov, boff, len) void *tov; int boff, len; { - volatile caddr_t buf = sc->sc_mem; - caddr_t to = tov; - caddr_t bptr; + volatile void *buf = sc->sc_mem; + void *to = tov; + void *bptr; int xfer; bptr = buf + ((boff << 1) & ~0x1f); @@ -881,8 +881,8 @@ lance_zerobuf_gap16(sc, boff, len) struct lance_softc *sc; int boff, len; { - volatile caddr_t buf = sc->sc_mem; - caddr_t bptr; + volatile void *buf = sc->sc_mem; + void *bptr; int xfer; bptr = buf + ((boff << 1) & ~0x1f); diff --git a/sys/dev/ic/lemac.c b/sys/dev/ic/lemac.c index ae7f35ae9be..ab0a386ac91 100644 --- a/sys/dev/ic/lemac.c +++ b/sys/dev/ic/lemac.c @@ -1,4 +1,4 @@ -/* $NetBSD: lemac.c,v 1.30 2006/09/07 02:40:32 dogcow Exp $ */ +/* $NetBSD: lemac.c,v 1.31 2007/03/04 06:01:57 christos Exp $ */ /*- * Copyright (c) 1994, 1995, 1997 Matt Thomas <matt@3am-software.com> @@ -34,7 +34,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: lemac.c,v 1.30 2006/09/07 02:40:32 dogcow Exp $"); +__KERNEL_RCSID(0, "$NetBSD: lemac.c,v 1.31 2007/03/04 06:01:57 christos Exp $"); #include "opt_inet.h" #include "rnd.h" @@ -300,13 +300,13 @@ lemac_input( } } m->m_data += 2; - memcpy(m->m_data, (caddr_t)&eh, sizeof(eh)); + memcpy(m->m_data, (void *)&eh, sizeof(eh)); if (LEMAC_USE_PIO_MODE(sc)) { LEMAC_INSB(sc, LEMAC_REG_DAT, length - sizeof(eh), - mtod(m, caddr_t) + sizeof(eh)); + mtod(m, char *) + sizeof(eh)); } else { LEMAC_GETBUF16(sc, offset + sizeof(eh), (length - sizeof(eh)) / 2, - (void *) (mtod(m, caddr_t) + sizeof(eh))); + mtod(m, char *) + sizeof(eh)); if (length & 1) m->m_data[length - 1] = LEMAC_GET8(sc, offset + length - 1); } @@ -748,7 +748,7 @@ static int lemac_ifioctl( struct ifnet *ifp, u_long cmd, - caddr_t data) + void *data) { lemac_softc_t * const sc = LEMAC_IFP_TO_SOFTC(ifp); int s; diff --git a/sys/dev/ic/lpt.c b/sys/dev/ic/lpt.c index 8352454a01e..231f3f2c428 100644 --- a/sys/dev/ic/lpt.c +++ b/sys/dev/ic/lpt.c @@ -1,4 +1,4 @@ -/* $NetBSD: lpt.c,v 1.68 2006/11/16 01:32:51 christos Exp $ */ +/* $NetBSD: lpt.c,v 1.69 2007/03/04 06:01:57 christos Exp $ */ /* * Copyright (c) 1993, 1994 Charles M. Hannum. @@ -54,7 +54,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: lpt.c,v 1.68 2006/11/16 01:32:51 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: lpt.c,v 1.69 2007/03/04 06:01:57 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -179,7 +179,7 @@ lptopen(dev_t dev, int flag, int mode, struct lwp *l) } /* wait 1/4 second, give up if we get a signal */ - error = tsleep((caddr_t)sc, LPTPRI | PCATCH, "lptopen", STEP); + error = tsleep((void *)sc, LPTPRI | PCATCH, "lptopen", STEP); if (error != EWOULDBLOCK) { sc->sc_state = 0; return error; @@ -295,7 +295,7 @@ lptpushbytes(sc) tic = tic + tic + 1; if (tic > TIMEOUT) tic = TIMEOUT; - error = tsleep((caddr_t)sc, + error = tsleep((void *)sc, LPTPRI | PCATCH, "lptpsh", tic); if (error != EWOULDBLOCK) return error; @@ -328,7 +328,7 @@ lptpushbytes(sc) (void) lptintr(sc); splx(s); } - error = tsleep((caddr_t)sc, LPTPRI | PCATCH, + error = tsleep((void *)sc, LPTPRI | PCATCH, "lptwrite2", 0); if (error) return error; @@ -402,14 +402,14 @@ lptintr(arg) if (sc->sc_count == 0) { /* none, wake up the top half to get more */ - wakeup((caddr_t)sc); + wakeup((void *)sc); } return 1; } int -lptioctl(dev_t dev, u_long cmd, caddr_t data, +lptioctl(dev_t dev, u_long cmd, void *data, int flag, struct lwp *l) { return ENODEV; diff --git a/sys/dev/ic/lsi64854.c b/sys/dev/ic/lsi64854.c index 0ac90bacd4e..b26311dfd36 100644 --- a/sys/dev/ic/lsi64854.c +++ b/sys/dev/ic/lsi64854.c @@ -1,4 +1,4 @@ -/* $NetBSD: lsi64854.c,v 1.27 2005/12/11 12:21:27 christos Exp $ */ +/* $NetBSD: lsi64854.c,v 1.28 2007/03/04 06:01:57 christos Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: lsi64854.c,v 1.27 2005/12/11 12:21:27 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: lsi64854.c,v 1.28 2007/03/04 06:01:57 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -63,9 +63,9 @@ __KERNEL_RCSID(0, "$NetBSD: lsi64854.c,v 1.27 2005/12/11 12:21:27 christos Exp $ #include <dev/ic/ncr53c9xvar.h> void lsi64854_reset(struct lsi64854_softc *); -int lsi64854_setup(struct lsi64854_softc *, caddr_t *, size_t *, +int lsi64854_setup(struct lsi64854_softc *, void **, size_t *, int, size_t *); -int lsi64854_setup_pp(struct lsi64854_softc *, caddr_t *, size_t *, +int lsi64854_setup_pp(struct lsi64854_softc *, void **, size_t *, int, size_t *); #ifdef DEBUG @@ -293,7 +293,7 @@ lsi64854_reset(sc) int lsi64854_setup(sc, addr, len, datain, dmasize) struct lsi64854_softc *sc; - caddr_t *addr; + void **addr; size_t *len; int datain; size_t *dmasize; /* IN-OUT */ @@ -551,7 +551,7 @@ lsi64854_enet_intr(arg) int lsi64854_setup_pp(sc, addr, len, datain, dmasize) struct lsi64854_softc *sc; - caddr_t *addr; + void **addr; size_t *len; int datain; size_t *dmasize; /* IN-OUT */ diff --git a/sys/dev/ic/lsi64854var.h b/sys/dev/ic/lsi64854var.h index a64a925d0a9..68854ec72ce 100644 --- a/sys/dev/ic/lsi64854var.h +++ b/sys/dev/ic/lsi64854var.h @@ -1,4 +1,4 @@ -/* $NetBSD: lsi64854var.h,v 1.8 2005/12/11 12:21:27 christos Exp $ */ +/* $NetBSD: lsi64854var.h,v 1.9 2007/03/04 06:01:58 christos Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -53,13 +53,13 @@ struct lsi64854_softc { int sc_active; /* DMA active ? */ bus_dmamap_t sc_dmamap; /* DMA map for bus_dma_* */ - caddr_t sc_dvmaaddr; /* DVMA cookie */ + void * sc_dvmaaddr; /* DVMA cookie */ size_t sc_dmasize; - caddr_t *sc_dmaaddr; + void * *sc_dmaaddr; size_t *sc_dmalen; void (*reset)(struct lsi64854_softc *);/* reset routine */ - int (*setup)(struct lsi64854_softc *, caddr_t *, size_t *, + int (*setup)(struct lsi64854_softc *, void **, size_t *, int, size_t *); /* DMA setup */ int (*intr)(void *); /* interrupt handler */ diff --git a/sys/dev/ic/matrixkp_subr.c b/sys/dev/ic/matrixkp_subr.c index 81f59e170cf..e81ad611e63 100644 --- a/sys/dev/ic/matrixkp_subr.c +++ b/sys/dev/ic/matrixkp_subr.c @@ -46,7 +46,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: matrixkp_subr.c,v 1.4 2005/12/12 01:20:26 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: matrixkp_subr.c,v 1.5 2007/03/04 06:01:58 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -194,7 +194,7 @@ mxkp_set_leds(void *v, int leds) } int -mxkp_ioctl(void *v, u_long cmd, caddr_t data, int flag, struct lwp *l) +mxkp_ioctl(void *v, u_long cmd, void *data, int flag, struct lwp *l) { switch (cmd) { case WSKBDIO_GTYPE: diff --git a/sys/dev/ic/matrixkpvar.h b/sys/dev/ic/matrixkpvar.h index 4e0558adda7..ecc25415c73 100644 --- a/sys/dev/ic/matrixkpvar.h +++ b/sys/dev/ic/matrixkpvar.h @@ -51,7 +51,7 @@ void mxkp_debounce(struct matrixkp_softc *, u_int32_t *, u_int32_t *); void mxkp_wskbd_event(struct matrixkp_softc *, u_int32_t *, u_int32_t *); int mxkp_enable(void *, int); void mxkp_set_leds(void *, int); -int mxkp_ioctl(void *, u_long, caddr_t, int, struct lwp *); +int mxkp_ioctl(void *, u_long, void *, int, struct lwp *); const struct wskbd_accessops mxkp_accessops; diff --git a/sys/dev/ic/mb86950.c b/sys/dev/ic/mb86950.c index 23e22eb261c..96e8a461b59 100644 --- a/sys/dev/ic/mb86950.c +++ b/sys/dev/ic/mb86950.c @@ -1,4 +1,4 @@ -/* $NetBSD: mb86950.c,v 1.8 2006/11/16 01:32:51 christos Exp $ */ +/* $NetBSD: mb86950.c,v 1.9 2007/03/04 06:01:58 christos Exp $ */ /* * All Rights Reserved, Copyright (C) Fujitsu Limited 1995 @@ -67,7 +67,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: mb86950.c,v 1.8 2006/11/16 01:32:51 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mb86950.c,v 1.9 2007/03/04 06:01:58 christos Exp $"); /* * Device driver for Fujitsu mb86950 based Ethernet cards. @@ -167,7 +167,7 @@ __KERNEL_RCSID(0, "$NetBSD: mb86950.c,v 1.8 2006/11/16 01:32:51 christos Exp $") #endif /* __BUS_SPACE_HAS_STREAM_METHODS */ /* Standard driver entry points. These can be static. */ -int mb86950_ioctl __P((struct ifnet *, u_long, caddr_t)); +int mb86950_ioctl __P((struct ifnet *, u_long, void *)); void mb86950_init __P((struct mb86950_softc *)); void mb86950_start __P((struct ifnet *)); void mb86950_watchdog __P((struct ifnet *)); @@ -447,7 +447,7 @@ int mb86950_ioctl(ifp, cmd, data) struct ifnet *ifp; u_long cmd; - caddr_t data; + void *data; { struct mb86950_softc *sc = ifp->if_softc; struct ifaddr *ifa = (struct ifaddr *)data; diff --git a/sys/dev/ic/mb86960.c b/sys/dev/ic/mb86960.c index dc032726bad..fa5c869995f 100644 --- a/sys/dev/ic/mb86960.c +++ b/sys/dev/ic/mb86960.c @@ -1,4 +1,4 @@ -/* $NetBSD: mb86960.c,v 1.65 2006/09/07 02:40:32 dogcow Exp $ */ +/* $NetBSD: mb86960.c,v 1.66 2007/03/04 06:01:58 christos Exp $ */ /* * All Rights Reserved, Copyright (C) Fujitsu Limited 1995 @@ -32,7 +32,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: mb86960.c,v 1.65 2006/09/07 02:40:32 dogcow Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mb86960.c,v 1.66 2007/03/04 06:01:58 christos Exp $"); /* * Device driver for Fujitsu MB86960A/MB86965A based Ethernet cards. @@ -96,7 +96,7 @@ __KERNEL_RCSID(0, "$NetBSD: mb86960.c,v 1.65 2006/09/07 02:40:32 dogcow Exp $"); /* Standard driver entry points. These can be static. */ void mb86960_init(struct mb86960_softc *); -int mb86960_ioctl(struct ifnet *, u_long, caddr_t); +int mb86960_ioctl(struct ifnet *, u_long, void *); void mb86960_start(struct ifnet *); void mb86960_reset(struct mb86960_softc *); void mb86960_watchdog(struct ifnet *); @@ -1171,7 +1171,7 @@ mb86960_intr(void *arg) * Process an ioctl request. This code needs some work - it looks pretty ugly. */ int -mb86960_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) +mb86960_ioctl(struct ifnet *ifp, u_long cmd, void *data) { struct mb86960_softc *sc = ifp->if_softc; struct ifaddr *ifa = (struct ifaddr *)data; diff --git a/sys/dev/ic/mfi.c b/sys/dev/ic/mfi.c index 0695f52b0dc..647f73505a5 100644 --- a/sys/dev/ic/mfi.c +++ b/sys/dev/ic/mfi.c @@ -1,4 +1,4 @@ -/* $NetBSD: mfi.c,v 1.2 2006/12/20 21:44:06 bouyer Exp $ */ +/* $NetBSD: mfi.c,v 1.3 2007/03/04 06:01:58 christos Exp $ */ /* $OpenBSD: mfi.c,v 1.66 2006/11/28 23:59:45 dlg Exp $ */ /* * Copyright (c) 2006 Marco Peereboom <marco@peereboom.us> @@ -17,7 +17,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: mfi.c,v 1.2 2006/12/20 21:44:06 bouyer Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mfi.c,v 1.3 2007/03/04 06:01:58 christos Exp $"); /* #include "bio.h" XXX */ @@ -64,7 +64,7 @@ uint32_t mfi_debug = 0 void mfi_scsipi_request(struct scsipi_channel *, scsipi_adapter_req_t, void *); -int mfi_scsi_ioctl(struct scsipi_channel *, u_long, caddr_t, int, +int mfi_scsi_ioctl(struct scsipi_channel *, u_long, void *, int, struct proc *); void mfiminphys(struct buf *bp); @@ -94,7 +94,7 @@ int mfi_mgmt(struct mfi_softc *, uint32_t, uint32_t, uint32_t, void mfi_mgmt_done(struct mfi_ccb *); #if NBIO > 0 -int mfi_ioctl(struct device *, u_long, caddr_t); +int mfi_ioctl(struct device *, u_long, void *); int mfi_ioctl_inq(struct mfi_softc *, struct bioc_inq *); int mfi_ioctl_vol(struct mfi_softc *, struct bioc_vol *); int mfi_ioctl_disk(struct mfi_softc *, struct bioc_disk *); @@ -1287,7 +1287,7 @@ mfi_mgmt_done(struct mfi_ccb *ccb) int -mfi_scsi_ioctl(struct scsipi_channel *chan, u_long cmd, caddr_t arg, +mfi_scsi_ioctl(struct scsipi_channel *chan, u_long cmd, void *arg, int flag, struct proc *p) { return (ENOTTY); @@ -1295,7 +1295,7 @@ mfi_scsi_ioctl(struct scsipi_channel *chan, u_long cmd, caddr_t arg, #if NBIO > 0 int -mfi_ioctl(struct device *dev, u_long cmd, caddr_t addr) +mfi_ioctl(struct device *dev, u_long cmd, void *addr) { struct mfi_softc *sc = (struct mfi_softc *)dev; int error = 0; diff --git a/sys/dev/ic/mfivar.h b/sys/dev/ic/mfivar.h index 83f901801fb..c1506969bcb 100644 --- a/sys/dev/ic/mfivar.h +++ b/sys/dev/ic/mfivar.h @@ -1,4 +1,4 @@ -/* $NetBSD: mfivar.h,v 1.2 2006/12/20 21:44:06 bouyer Exp $ */ +/* $NetBSD: mfivar.h,v 1.3 2007/03/04 06:01:58 christos Exp $ */ /* $OpenBSD: mfivar.h,v 1.28 2006/08/31 18:18:46 marco Exp $ */ /* * Copyright (c) 2006 Marco Peereboom <marco@peereboom.us> @@ -40,7 +40,7 @@ struct mfi_mem { bus_dmamap_t am_map; bus_dma_segment_t am_seg; size_t am_size; - caddr_t am_kva; + void * am_kva; }; #define MFIMEM_MAP(_am) ((_am)->am_map) @@ -115,7 +115,7 @@ struct mfi_softc { } sc_ld[MFI_MAX_LD]; /* scsi ioctl from sd device */ - int (*sc_ioctl)(struct device *, u_long, caddr_t); + int (*sc_ioctl)(struct device *, u_long, void *); /* firmware determined max, totals and other information*/ uint32_t sc_max_cmds; diff --git a/sys/dev/ic/midway.c b/sys/dev/ic/midway.c index 101ba00d53f..faea82099be 100644 --- a/sys/dev/ic/midway.c +++ b/sys/dev/ic/midway.c @@ -1,4 +1,4 @@ -/* $NetBSD: midway.c,v 1.74 2007/01/04 18:44:45 elad Exp $ */ +/* $NetBSD: midway.c,v 1.75 2007/03/04 06:01:58 christos Exp $ */ /* (sync'd to midway.c 1.68) */ /* @@ -68,7 +68,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: midway.c,v 1.74 2007/01/04 18:44:45 elad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: midway.c,v 1.75 2007/03/04 06:01:58 christos Exp $"); #include "opt_natm.h" @@ -344,10 +344,10 @@ STATIC INLINE int en_b2sz(int) __attribute__ ((unused)); STATIC void en_dmaprobe(struct en_softc *); STATIC int en_dmaprobe_doit(struct en_softc *, u_int8_t *, u_int8_t *, int); -STATIC INLINE int en_dqneed(struct en_softc *, caddr_t, u_int, +STATIC INLINE int en_dqneed(struct en_softc *, void *, u_int, u_int) __attribute__ ((unused)); STATIC void en_init(struct en_softc *); -STATIC int en_ioctl(struct ifnet *, EN_IOCTL_CMDT, caddr_t); +STATIC int en_ioctl(struct ifnet *, EN_IOCTL_CMDT, void *); STATIC INLINE int en_k2sz(int) __attribute__ ((unused)); STATIC void en_loadvc(struct en_softc *, int); STATIC int en_mfix(struct en_softc *, struct mbuf **, @@ -607,7 +607,7 @@ int sz; STATIC INLINE int en_dqneed(sc, data, len, tx) struct en_softc *sc; -caddr_t data; +void *data; u_int len, tx; { @@ -633,7 +633,7 @@ u_int len, tx; result++; sz = min(len, sizeof(u_int32_t) - needalign); len -= sz; - data += sz; + data = (char *)data + sz; } } @@ -1152,7 +1152,7 @@ STATIC int en_ioctl(ifp, cmd, data) struct ifnet *ifp; EN_IOCTL_CMDT cmd; -caddr_t data; +void *data; { #ifdef MISSING_IF_SOFTC @@ -1904,7 +1904,7 @@ struct mbuf **mm, *prev; if ((m->m_flags & M_EXT) == 0) { memmove(d - off, d, m->m_len); /* ALIGN! (with costly data copy...) */ d -= off; - m->m_data = (caddr_t)d; + m->m_data = (void *)d; } else { /* can't write to an M_EXT mbuf since it may be shared */ MGET(new, M_DONTWAIT, MT_DATA); @@ -1947,7 +1947,7 @@ struct mbuf **mm, *prev; *d++ = *cp++; m->m_len++; nxt->m_len--; - nxt->m_data = (caddr_t)cp; + nxt->m_data = (void *)cp; } return(1); } @@ -2003,7 +2003,7 @@ STATIC int en_makeexclusive(sc, mm, prev) if (off > 0) { memmove(d - off, d, m->m_len); - m->m_data = (caddr_t)d - off; + m->m_data = (void *)d - off; } } } @@ -2036,7 +2036,7 @@ struct mbuf **mm, *prev; if ((m->m_flags & M_EXT) == 0) { memmove(d - off, d, m->m_len); /* ALIGN! (with costly data copy...) */ d -= off; - m->m_data = (caddr_t)d; + m->m_data = (void *)d; } else { /* can't write to an M_EXT mbuf since it may be shared */ if (en_makeexclusive(sc, &m, prev) == 0) @@ -2074,7 +2074,7 @@ struct mbuf **mm, *prev; *d++ = *cp++; m->m_len++; nxt->m_len--; - nxt->m_data = (caddr_t)cp; + nxt->m_data = (void *)cp; } if (nxt != NULL && nxt->m_len == 0) m->m_next = m_free(nxt); @@ -2170,7 +2170,7 @@ again: if (len == 0) continue; /* atm_pseudohdr alone in first mbuf */ - dtqneed += en_dqneed(sc, (caddr_t) cp, len, 1); + dtqneed += en_dqneed(sc, (void *) cp, len, 1); } if ((launch.need % sizeof(u_int32_t)) != 0) diff --git a/sys/dev/ic/midwayreg.h b/sys/dev/ic/midwayreg.h index 624f994d595..75cee7e3526 100644 --- a/sys/dev/ic/midwayreg.h +++ b/sys/dev/ic/midwayreg.h @@ -1,4 +1,4 @@ -/* $NetBSD: midwayreg.h,v 1.13 2005/12/11 12:21:27 christos Exp $ */ +/* $NetBSD: midwayreg.h,v 1.14 2007/03/04 06:01:58 christos Exp $ */ /* * m i d w a y r e g . h @@ -9,11 +9,11 @@ */ #if defined(__FreeBSD__) -typedef void * bus_space_tag_t; +typedef void *bus_space_tag_t; typedef u_int32_t pci_chipset_tag_t; -typedef caddr_t bus_space_handle_t; +typedef void *bus_space_handle_t; typedef u_int32_t bus_size_t; -typedef caddr_t bus_addr_t; +typedef void *bus_addr_t; #define bus_space_read_4(t, h, o) ((void) t, \ (*(volatile u_int32_t *)((h) + (o)))) diff --git a/sys/dev/ic/mlx.c b/sys/dev/ic/mlx.c index 2427e6b0023..7a7f1cbc5b5 100644 --- a/sys/dev/ic/mlx.c +++ b/sys/dev/ic/mlx.c @@ -1,4 +1,4 @@ -/* $NetBSD: mlx.c,v 1.50 2007/02/18 12:26:13 tsutsui Exp $ */ +/* $NetBSD: mlx.c,v 1.51 2007/03/04 06:01:58 christos Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -74,7 +74,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: mlx.c,v 1.50 2007/02/18 12:26:13 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mlx.c,v 1.51 2007/03/04 06:01:58 christos Exp $"); #include "ld.h" @@ -288,7 +288,7 @@ mlx_init(struct mlx_softc *mlx, const char *intrstr) } if ((rv = bus_dmamem_map(mlx->mlx_dmat, &seg, rseg, size, - (caddr_t *)&mlx->mlx_sgls, + (void **)&mlx->mlx_sgls, BUS_DMA_NOWAIT | BUS_DMA_COHERENT)) != 0) { printf("%s: unable to map sglists, rv = %d\n", mlx->mlx_dv.dv_xname, rv); @@ -726,7 +726,7 @@ mlxclose(dev_t dev, int flag, int mode, * Handle control operations. */ int -mlxioctl(dev_t dev, u_long cmd, caddr_t data, int flag, +mlxioctl(dev_t dev, u_long cmd, void *data, int flag, struct lwp *l) { struct mlx_softc *mlx; @@ -1943,7 +1943,7 @@ mlx_ccb_map(struct mlx_softc *mlx, struct mlx_ccb *mc, void *data, int size, mc->mc_xfer_phys = xfer->dm_segs[0].ds_addr; sgloff = MLX_SGL_SIZE * mc->mc_ident; - sge = (struct mlx_sgentry *)((caddr_t)mlx->mlx_sgls + sgloff); + sge = (struct mlx_sgentry *)((char *)mlx->mlx_sgls + sgloff); for (i = 0; i < nsegs; i++, sge++) { sge->sge_addr = htole32(xfer->dm_segs[i].ds_addr); diff --git a/sys/dev/ic/mlxvar.h b/sys/dev/ic/mlxvar.h index f5f123a4397..c9328ad488b 100644 --- a/sys/dev/ic/mlxvar.h +++ b/sys/dev/ic/mlxvar.h @@ -1,4 +1,4 @@ -/* $NetBSD: mlxvar.h,v 1.12 2006/02/16 20:17:16 perry Exp $ */ +/* $NetBSD: mlxvar.h,v 1.13 2007/03/04 06:01:58 christos Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -138,7 +138,7 @@ struct mlx_softc { int mlx_nccbs; int mlx_nccbs_ctrl; - caddr_t mlx_sgls; + void * mlx_sgls; bus_addr_t mlx_sgls_paddr; int (*mlx_submit)(struct mlx_softc *, struct mlx_ccb *); diff --git a/sys/dev/ic/mpt.c b/sys/dev/ic/mpt.c index ca5f6c4f1f6..b46b528e7ca 100644 --- a/sys/dev/ic/mpt.c +++ b/sys/dev/ic/mpt.c @@ -1,4 +1,4 @@ -/* $NetBSD: mpt.c,v 1.7 2005/12/24 20:27:30 perry Exp $ */ +/* $NetBSD: mpt.c,v 1.8 2007/03/04 06:01:58 christos Exp $ */ /* * Copyright (c) 2000, 2001 by Greg Ansley @@ -38,7 +38,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: mpt.c,v 1.7 2005/12/24 20:27:30 perry Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mpt.c,v 1.8 2007/03/04 06:01:58 christos Exp $"); #include <dev/ic/mpt.h> @@ -632,7 +632,7 @@ mpt_read_cfg_page(mpt_softc_t *mpt, int PageAddress, fCONFIG_PAGE_HEADER *hdr) cfgp->Header.PageNumber == 1) { amt = sizeof (fCONFIG_PAGE_SCSI_DEVICE_1); } - bcopy(((caddr_t)req->req_vbuf)+CFG_DATA_OFF, hdr, amt); + memcpy(hdr, (char *)req->req_vbuf + CFG_DATA_OFF, amt); mpt_free_request(mpt, req); return (0); } @@ -692,7 +692,7 @@ mpt_write_cfg_page(mpt_softc_t *mpt, int PageAddress, fCONFIG_PAGE_HEADER *hdr) cfgp->Header.PageNumber == 1) { amt = sizeof (fCONFIG_PAGE_SCSI_DEVICE_1); } - bcopy(hdr, ((caddr_t)req->req_vbuf)+CFG_DATA_OFF, amt); + memcpy((char *)req->req_vbuf + CFG_DATA_OFF, hdr, amt); /* Restore stripped out attributes */ hdr->PageType |= hdr_attr; diff --git a/sys/dev/ic/mpt_netbsd.c b/sys/dev/ic/mpt_netbsd.c index ba94c0a0058..802ea7143a9 100644 --- a/sys/dev/ic/mpt_netbsd.c +++ b/sys/dev/ic/mpt_netbsd.c @@ -1,4 +1,4 @@ -/* $NetBSD: mpt_netbsd.c,v 1.10 2005/12/11 12:21:28 christos Exp $ */ +/* $NetBSD: mpt_netbsd.c,v 1.11 2007/03/04 06:01:59 christos Exp $ */ /* * Copyright (c) 2003 Wasabi Systems, Inc. @@ -75,7 +75,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: mpt_netbsd.c,v 1.10 2005/12/11 12:21:28 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mpt_netbsd.c,v 1.11 2007/03/04 06:01:59 christos Exp $"); #include <dev/ic/mpt.h> /* pulls in all headers */ @@ -139,7 +139,7 @@ mpt_dma_mem_alloc(mpt_softc_t *mpt) bus_dma_segment_t reply_seg, request_seg; int reply_rseg, request_rseg; bus_addr_t pptr, end; - caddr_t vptr; + char *vptr; size_t len; int error, i; @@ -171,7 +171,7 @@ mpt_dma_mem_alloc(mpt_softc_t *mpt) } error = bus_dmamem_map(mpt->sc_dmat, &reply_seg, reply_rseg, PAGE_SIZE, - (caddr_t *) &mpt->reply, BUS_DMA_COHERENT/*XXX*/); + (void **) &mpt->reply, BUS_DMA_COHERENT/*XXX*/); if (error) { aprint_error("%s: unable to map reply area, error = %d\n", mpt->sc_dev.dv_xname, error); @@ -207,7 +207,7 @@ mpt_dma_mem_alloc(mpt_softc_t *mpt) } error = bus_dmamem_map(mpt->sc_dmat, &request_seg, request_rseg, - MPT_REQ_MEM_SIZE(mpt), (caddr_t *) &mpt->request, 0); + MPT_REQ_MEM_SIZE(mpt), (void **) &mpt->request, 0); if (error) { aprint_error("%s: unable to map request area, error = %d\n", mpt->sc_dev.dv_xname, error); @@ -232,7 +232,7 @@ mpt_dma_mem_alloc(mpt_softc_t *mpt) mpt->request_phys = mpt->request_dmap->dm_segs[0].ds_addr; pptr = mpt->request_phys; - vptr = (caddr_t) mpt->request; + vptr = (void *) mpt->request; end = pptr + MPT_REQ_MEM_SIZE(mpt); for (i = 0; pptr < end; i++) { @@ -270,7 +270,7 @@ mpt_dma_mem_alloc(mpt_softc_t *mpt) fail_7: bus_dmamap_destroy(mpt->sc_dmat, mpt->request_dmap); fail_6: - bus_dmamem_unmap(mpt->sc_dmat, (caddr_t)mpt->request, PAGE_SIZE); + bus_dmamem_unmap(mpt->sc_dmat, (void *)mpt->request, PAGE_SIZE); fail_5: bus_dmamem_free(mpt->sc_dmat, &request_seg, request_rseg); fail_4: @@ -278,7 +278,7 @@ mpt_dma_mem_alloc(mpt_softc_t *mpt) fail_3: bus_dmamap_destroy(mpt->sc_dmat, mpt->reply_dmap); fail_2: - bus_dmamem_unmap(mpt->sc_dmat, (caddr_t)mpt->reply, PAGE_SIZE); + bus_dmamem_unmap(mpt->sc_dmat, (void *)mpt->reply, PAGE_SIZE); fail_1: bus_dmamem_free(mpt->sc_dmat, &reply_seg, reply_rseg); fail_0: diff --git a/sys/dev/ic/mtd803.c b/sys/dev/ic/mtd803.c index 42ce074056a..a5820c88a32 100644 --- a/sys/dev/ic/mtd803.c +++ b/sys/dev/ic/mtd803.c @@ -1,4 +1,4 @@ -/* $NetBSD: mtd803.c,v 1.12 2006/11/16 01:32:51 christos Exp $ */ +/* $NetBSD: mtd803.c,v 1.13 2007/03/04 06:01:59 christos Exp $ */ /*- * @@ -51,7 +51,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: mtd803.c,v 1.12 2006/11/16 01:32:51 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mtd803.c,v 1.13 2007/03/04 06:01:59 christos Exp $"); #include "bpfilter.h" @@ -122,7 +122,7 @@ void mtd_mii_statchg(struct device *); void mtd_start(struct ifnet *); void mtd_stop(struct ifnet *, int); -int mtd_ioctl(struct ifnet *, u_long, caddr_t); +int mtd_ioctl(struct ifnet *, u_long, void *); void mtd_setmulti(struct mtd_softc *); void mtd_watchdog(struct ifnet *); int mtd_mediachange(struct ifnet *); @@ -275,7 +275,7 @@ mtd_init_desc(sc) /* Map memory to kernel addressable space */ if ((err = bus_dmamem_map(sc->dma_tag, &seg, 1, size, - (caddr_t *)&sc->desc, BUS_DMA_NOWAIT | BUS_DMA_COHERENT)) != 0) { + (void **)&sc->desc, BUS_DMA_NOWAIT | BUS_DMA_COHERENT)) != 0) { printf("%s: unable to map DMA buffer, error = %d\n", sc->dev.dv_xname, err); bus_dmamem_free(sc->dma_tag, &seg, rseg); @@ -287,7 +287,7 @@ mtd_init_desc(sc) size, 0, BUS_DMA_NOWAIT, &sc->desc_dma_map)) != 0) { printf("%s: unable to create DMA map, error = %d\n", sc->dev.dv_xname, err); - bus_dmamem_unmap(sc->dma_tag, (caddr_t)sc->desc, size); + bus_dmamem_unmap(sc->dma_tag, (void *)sc->desc, size); bus_dmamem_free(sc->dma_tag, &seg, rseg); return 1; } @@ -298,7 +298,7 @@ mtd_init_desc(sc) printf("%s: unable to load DMA map, error = %d\n", sc->dev.dv_xname, err); bus_dmamap_destroy(sc->dma_tag, sc->desc_dma_map); - bus_dmamem_unmap(sc->dma_tag, (caddr_t)sc->desc, size); + bus_dmamem_unmap(sc->dma_tag, (void *)sc->desc, size); bus_dmamem_free(sc->dma_tag, &seg, rseg); return 1; } @@ -315,7 +315,7 @@ mtd_init_desc(sc) /* Undo DMA map for descriptors */ bus_dmamap_unload(sc->dma_tag, sc->desc_dma_map); bus_dmamap_destroy(sc->dma_tag, sc->desc_dma_map); - bus_dmamem_unmap(sc->dma_tag, (caddr_t)sc->desc, size); + bus_dmamem_unmap(sc->dma_tag, (void *)sc->desc, size); bus_dmamem_free(sc->dma_tag, &seg, rseg); return 1; } @@ -330,7 +330,7 @@ mtd_init_desc(sc) /* Undo DMA map for descriptors */ bus_dmamap_unload(sc->dma_tag, sc->desc_dma_map); bus_dmamap_destroy(sc->dma_tag, sc->desc_dma_map); - bus_dmamem_unmap(sc->dma_tag, (caddr_t)sc->desc, size); + bus_dmamem_unmap(sc->dma_tag, (void *)sc->desc, size); bus_dmamem_free(sc->dma_tag, &seg, rseg); return 1; } @@ -346,7 +346,7 @@ mtd_init_desc(sc) /* Undo DMA map for descriptors */ bus_dmamap_unload(sc->dma_tag, sc->desc_dma_map); bus_dmamap_destroy(sc->dma_tag, sc->desc_dma_map); - bus_dmamem_unmap(sc->dma_tag, (caddr_t)sc->desc, size); + bus_dmamem_unmap(sc->dma_tag, (void *)sc->desc, size); bus_dmamem_free(sc->dma_tag, &seg, rseg); return 1; } @@ -363,7 +363,7 @@ mtd_init_desc(sc) /* Undo DMA map for descriptors */ bus_dmamap_unload(sc->dma_tag, sc->desc_dma_map); bus_dmamap_destroy(sc->dma_tag, sc->desc_dma_map); - bus_dmamem_unmap(sc->dma_tag, (caddr_t)sc->desc, size); + bus_dmamem_unmap(sc->dma_tag, (void *)sc->desc, size); bus_dmamem_free(sc->dma_tag, &seg, rseg); return 1; } @@ -447,7 +447,7 @@ mtd_put(sc, index, m) struct mbuf *m; { int len, tlen; - caddr_t buf = sc->buf + MTD_NUM_RXD * MTD_RXBUF_SIZE + char *buf = (char *)sc->buf + MTD_NUM_RXD * MTD_RXBUF_SIZE + index * MTD_TXBUF_SIZE; struct mbuf *n; @@ -463,7 +463,7 @@ mtd_put(sc, index, m) MFREE(m, n); continue; } - memcpy(buf, mtod(m, caddr_t), len); + memcpy(buf, mtod(m, void *), len); buf += len; tlen += len; MFREE(m, n); @@ -580,7 +580,7 @@ int mtd_ioctl(ifp, cmd, data) struct ifnet * ifp; u_long cmd; - caddr_t data; + void *data; { struct mtd_softc *sc = ifp->if_softc; struct ifreq *ifr = (struct ifreq *)data; @@ -626,7 +626,7 @@ mtd_get(sc, index, totlen) struct ifnet *ifp = &sc->ethercom.ec_if; struct mbuf *m, *m0, *newm; int len; - caddr_t buf = sc->buf + index * MTD_RXBUF_SIZE; + char *buf = (char *)sc->buf + index * MTD_RXBUF_SIZE; MGETHDR(m0, M_DONTWAIT, MT_DATA); if (m0 == NULL) @@ -648,7 +648,7 @@ mtd_get(sc, index, totlen) } if (m == m0) { - caddr_t newdata = (caddr_t) + char *newdata = (char *) ALIGN(m->m_data + sizeof(struct ether_header)) - sizeof(struct ether_header); len -= newdata - m->m_data; @@ -656,7 +656,7 @@ mtd_get(sc, index, totlen) } m->m_len = len = min(totlen, len); - memcpy(mtod(m, caddr_t), buf, len); + memcpy(mtod(m, void *), buf, len); buf += len; totlen -= len; diff --git a/sys/dev/ic/mtd803var.h b/sys/dev/ic/mtd803var.h index b204a308067..d38e5df158c 100644 --- a/sys/dev/ic/mtd803var.h +++ b/sys/dev/ic/mtd803var.h @@ -1,4 +1,4 @@ -/* $NetBSD: mtd803var.h,v 1.4 2005/12/11 12:21:28 christos Exp $ */ +/* $NetBSD: mtd803var.h,v 1.5 2007/03/04 06:01:59 christos Exp $ */ /*- * Copyright (c) 2002 The NetBSD Foundation, Inc. @@ -78,7 +78,7 @@ struct mtd_softc { bus_dma_tag_t dma_tag; struct mtd_desc * desc; bus_dmamap_t desc_dma_map; - caddr_t buf; + void * buf; bus_dmamap_t buf_dma_map; #if NRND > 0 diff --git a/sys/dev/ic/mx98905.c b/sys/dev/ic/mx98905.c index 1d95d93ddd8..c17dd49af28 100644 --- a/sys/dev/ic/mx98905.c +++ b/sys/dev/ic/mx98905.c @@ -1,4 +1,4 @@ -/* $NetBSD: mx98905.c,v 1.8 2005/12/24 20:27:30 perry Exp $ */ +/* $NetBSD: mx98905.c,v 1.9 2007/03/04 06:01:59 christos Exp $ */ /*- * Copyright (c) 1997, 1998 The NetBSD Foundation, Inc. @@ -66,7 +66,7 @@ #include <sys/param.h> -__KERNEL_RCSID(0, "$NetBSD: mx98905.c,v 1.8 2005/12/24 20:27:30 perry Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mx98905.c,v 1.9 2007/03/04 06:01:59 christos Exp $"); #include <sys/device.h> #include <sys/mbuf.h> @@ -303,7 +303,7 @@ int mx98905_ring_copy(sc, src, dst, amount) struct dp8390_softc *sc; int src; - caddr_t dst; + void *dst; u_short amount; { struct ne2000_softc *nsc = (struct ne2000_softc *)sc; diff --git a/sys/dev/ic/mx98905var.h b/sys/dev/ic/mx98905var.h index 24066d09205..bbda4156d6d 100644 --- a/sys/dev/ic/mx98905var.h +++ b/sys/dev/ic/mx98905var.h @@ -1,4 +1,4 @@ -/* $NetBSD: mx98905var.h,v 1.1 2001/12/15 17:47:35 bjh21 Exp $ */ +/* $NetBSD: mx98905var.h,v 1.2 2007/03/04 06:01:59 christos Exp $ */ /*- * Copyright (c) 1997, 1998 The NetBSD Foundation, Inc. @@ -52,7 +52,7 @@ void mx98905_attach(struct dp8390_softc *); int mx98905_write_mbuf(struct dp8390_softc *, struct mbuf *, int); -int mx98905_ring_copy(struct dp8390_softc *, int, caddr_t, u_short); +int mx98905_ring_copy(struct dp8390_softc *, int, void *, u_short); void mx98905_read_hdr(struct dp8390_softc *, int, struct dp8390_ring *); void mx98905_readmem(bus_space_tag_t, bus_space_handle_t, bus_space_tag_t, bus_space_handle_t, int, u_int8_t *, size_t, int); diff --git a/sys/dev/ic/ncr53c9x.c b/sys/dev/ic/ncr53c9x.c index 57207dd4c3e..fbd5ea1c4fc 100644 --- a/sys/dev/ic/ncr53c9x.c +++ b/sys/dev/ic/ncr53c9x.c @@ -1,4 +1,4 @@ -/* $NetBSD: ncr53c9x.c,v 1.125 2007/01/09 12:53:12 itohy Exp $ */ +/* $NetBSD: ncr53c9x.c,v 1.126 2007/03/04 06:01:59 christos Exp $ */ /*- * Copyright (c) 1998, 2002 The NetBSD Foundation, Inc. @@ -77,7 +77,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ncr53c9x.c,v 1.125 2007/01/09 12:53:12 itohy Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ncr53c9x.c,v 1.126 2007/03/04 06:01:59 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -124,7 +124,7 @@ int ncr53c9x_notag = 0; /*static*/ void ncr53c9x_dequeue(struct ncr53c9x_softc *, struct ncr53c9x_ecb *); /*static*/ int ncr53c9x_ioctl(struct scsipi_channel *, u_long, - caddr_t, int, struct proc *); + void *, int, struct proc *); void ncr53c9x_sense(struct ncr53c9x_softc *, struct ncr53c9x_ecb *); void ncr53c9x_free_ecb(struct ncr53c9x_softc *, struct ncr53c9x_ecb *); @@ -726,7 +726,7 @@ ncr53c9x_select(sc, ecb) /* setup DMA transfer for command */ dmasize = clen = ecb->clen; sc->sc_cmdlen = clen; - sc->sc_cmdp = (caddr_t)&ecb->cmd.cmd; + sc->sc_cmdp = (void *)&ecb->cmd.cmd; NCRDMA_SETUP(sc, &sc->sc_cmdp, &sc->sc_cmdlen, 0, &dmasize); @@ -1052,7 +1052,7 @@ ncr53c9x_poll(sc, xs, count) } int -ncr53c9x_ioctl(struct scsipi_channel *chan, u_long cmd, caddr_t arg, +ncr53c9x_ioctl(struct scsipi_channel *chan, u_long cmd, void *arg, int flag, struct proc *p) { struct ncr53c9x_softc *sc = (void *)chan->chan_adapter->adapt_dev; @@ -2757,7 +2757,7 @@ msgin: /* setup DMA transfer for command */ size = ecb->clen; sc->sc_cmdlen = size; - sc->sc_cmdp = (caddr_t)&ecb->cmd.cmd; + sc->sc_cmdp = (void *)&ecb->cmd.cmd; NCRDMA_SETUP(sc, &sc->sc_cmdp, &sc->sc_cmdlen, 0, &size); /* Program the SCSI counter */ diff --git a/sys/dev/ic/ncr53c9xvar.h b/sys/dev/ic/ncr53c9xvar.h index b0e8b151adb..72f8ada21d2 100644 --- a/sys/dev/ic/ncr53c9xvar.h +++ b/sys/dev/ic/ncr53c9xvar.h @@ -1,4 +1,4 @@ -/* $NetBSD: ncr53c9xvar.h,v 1.47 2005/12/11 12:21:28 christos Exp $ */ +/* $NetBSD: ncr53c9xvar.h,v 1.48 2007/03/04 06:01:59 christos Exp $ */ /*- * Copyright (c) 1997 The NetBSD Foundation, Inc. @@ -259,7 +259,7 @@ struct ncr53c9x_glue { void (*gl_dma_reset)(struct ncr53c9x_softc *); int (*gl_dma_intr)(struct ncr53c9x_softc *); int (*gl_dma_setup)(struct ncr53c9x_softc *, - caddr_t *, size_t *, int, size_t *); + void **, size_t *, int, size_t *); void (*gl_dma_go)(struct ncr53c9x_softc *); void (*gl_dma_stop)(struct ncr53c9x_softc *); int (*gl_dma_isactive)(struct ncr53c9x_softc *); @@ -307,7 +307,7 @@ struct ncr53c9x_softc { struct ncr53c9x_tinfo *sc_tinfo; /* Data about the current nexus (updated for every cmd switch) */ - caddr_t sc_dp; /* Current data pointer */ + void * sc_dp; /* Current data pointer */ ssize_t sc_dleft; /* Data left to transfer */ /* Adapter state */ @@ -325,13 +325,13 @@ struct ncr53c9x_softc { u_short sc_msgoutq; /* What messages have been sent so far? */ u_char *sc_omess; /* MSGOUT buffer */ - caddr_t sc_omp; /* Message pointer (for multibyte messages) */ + void * sc_omp; /* Message pointer (for multibyte messages) */ size_t sc_omlen; u_char *sc_imess; /* MSGIN buffer */ - caddr_t sc_imp; /* Message pointer (for multibyte messages) */ + void * sc_imp; /* Message pointer (for multibyte messages) */ size_t sc_imlen; - caddr_t sc_cmdp; /* Command pointer (for DMAed commands) */ + void * sc_cmdp; /* Command pointer (for DMAed commands) */ size_t sc_cmdlen; /* Size of command in transit */ /* Hardware attributes */ diff --git a/sys/dev/ic/ne2000.c b/sys/dev/ic/ne2000.c index 7fa30c64149..764735a09da 100644 --- a/sys/dev/ic/ne2000.c +++ b/sys/dev/ic/ne2000.c @@ -1,4 +1,4 @@ -/* $NetBSD: ne2000.c,v 1.53 2007/01/13 19:46:21 cube Exp $ */ +/* $NetBSD: ne2000.c,v 1.54 2007/03/04 06:01:59 christos Exp $ */ /*- * Copyright (c) 1997, 1998 The NetBSD Foundation, Inc. @@ -55,7 +55,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ne2000.c,v 1.53 2007/01/13 19:46:21 cube Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ne2000.c,v 1.54 2007/03/04 06:01:59 christos Exp $"); #include "opt_ipkdb.h" @@ -95,7 +95,7 @@ __KERNEL_RCSID(0, "$NetBSD: ne2000.c,v 1.53 2007/01/13 19:46:21 cube Exp $"); #include <dev/ic/ax88190reg.h> int ne2000_write_mbuf(struct dp8390_softc *, struct mbuf *, int); -int ne2000_ring_copy(struct dp8390_softc *, int, caddr_t, u_short); +int ne2000_ring_copy(struct dp8390_softc *, int, void *, u_short); void ne2000_read_hdr(struct dp8390_softc *, int, struct dp8390_ring *); int ne2000_test_mem(struct dp8390_softc *); @@ -655,12 +655,13 @@ ne2000_write_mbuf(sc, m, buf) * ring-wrap. */ int -ne2000_ring_copy(sc, src, dst, amount) +ne2000_ring_copy(sc, src, dstv, amount) struct dp8390_softc *sc; int src; - caddr_t dst; + void *dstv; u_short amount; { + char *dst = dstv; struct ne2000_softc *nsc = (struct ne2000_softc *)sc; bus_space_tag_t nict = sc->sc_regt; bus_space_handle_t nich = sc->sc_regh; diff --git a/sys/dev/ic/ninjaata32.c b/sys/dev/ic/ninjaata32.c index 86124309315..294ea451ac8 100644 --- a/sys/dev/ic/ninjaata32.c +++ b/sys/dev/ic/ninjaata32.c @@ -1,4 +1,4 @@ -/* $NetBSD: ninjaata32.c,v 1.6 2006/12/19 14:12:26 itohy Exp $ */ +/* $NetBSD: ninjaata32.c,v 1.7 2007/03/04 06:01:59 christos Exp $ */ /* * Copyright (c) 2006 ITOH Yasufumi <itohy@NetBSD.org>. @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ninjaata32.c,v 1.6 2006/12/19 14:12:26 itohy Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ninjaata32.c,v 1.7 2007/03/04 06:01:59 christos Exp $"); #include <sys/param.h> #include <sys/kernel.h> @@ -125,7 +125,7 @@ njata32_attach(sc) } if ((error = bus_dmamem_map(sc->sc_dmat, &sc->sc_sgt_seg, sc->sc_sgt_nsegs, sizeof(struct njata32_dma_page), - (caddr_t *)&sc->sc_sgtpg, + (void **)&sc->sc_sgtpg, BUS_DMA_NOWAIT | BUS_DMA_COHERENT)) != 0) { printf("%s: unable to map sgt page, error = %d\n", NJATA32NAME(sc), error); @@ -244,7 +244,7 @@ fail4: while (--devno >= 0) { } bus_dmamap_unload(sc->sc_dmat, sc->sc_dmamap_sgt); fail3: bus_dmamap_destroy(sc->sc_dmat, sc->sc_dmamap_sgt); -fail2: bus_dmamem_unmap(sc->sc_dmat, (caddr_t)sc->sc_sgtpg, +fail2: bus_dmamem_unmap(sc->sc_dmat, (void *)sc->sc_sgtpg, sizeof(struct njata32_dma_page)); fail1: bus_dmamem_free(sc->sc_dmat, &sc->sc_sgt_seg, sc->sc_sgt_nsegs); } @@ -267,7 +267,7 @@ njata32_detach(sc, flags) } bus_dmamap_unload(sc->sc_dmat, sc->sc_dmamap_sgt); bus_dmamap_destroy(sc->sc_dmat, sc->sc_dmamap_sgt); - bus_dmamem_unmap(sc->sc_dmat, (caddr_t)sc->sc_sgtpg, + bus_dmamem_unmap(sc->sc_dmat, (void *)sc->sc_sgtpg, sizeof(struct njata32_dma_page)); bus_dmamem_free(sc->sc_dmat, &sc->sc_sgt_seg, sc->sc_sgt_nsegs); } diff --git a/sys/dev/ic/ninjascsi32.c b/sys/dev/ic/ninjascsi32.c index 2d75b4b6b75..da1543af468 100644 --- a/sys/dev/ic/ninjascsi32.c +++ b/sys/dev/ic/ninjascsi32.c @@ -1,4 +1,4 @@ -/* $NetBSD: ninjascsi32.c,v 1.9 2007/02/21 22:59:59 thorpej Exp $ */ +/* $NetBSD: ninjascsi32.c,v 1.10 2007/03/04 06:01:59 christos Exp $ */ /*- * Copyright (c) 2004, 2006 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ninjascsi32.c,v 1.9 2007/02/21 22:59:59 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ninjascsi32.c,v 1.10 2007/03/04 06:01:59 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -99,7 +99,7 @@ __KERNEL_RCSID(0, "$NetBSD: ninjascsi32.c,v 1.9 2007/02/21 22:59:59 thorpej Exp static void njsc32_scsipi_request(struct scsipi_channel *, scsipi_adapter_req_t, void *); static void njsc32_scsipi_minphys(struct buf *); -static int njsc32_scsipi_ioctl(struct scsipi_channel *, u_long, caddr_t, +static int njsc32_scsipi_ioctl(struct scsipi_channel *, u_long, void *, int, struct proc *); static void njsc32_init(struct njsc32_softc *, int nosleep); @@ -472,7 +472,7 @@ njsc32_init_cmds(struct njsc32_softc *sc) } if ((error = bus_dmamem_map(sc->sc_dmat, &sc->sc_cmdpg_seg, sc->sc_cmdpg_nsegs, sizeof(struct njsc32_dma_page), - (caddr_t *)&sc->sc_cmdpg, + (void **)&sc->sc_cmdpg, BUS_DMA_NOWAIT | BUS_DMA_COHERENT)) != 0) { printf("%s: unable to map cmd page, error = %d\n", sc->sc_dev.dv_xname, error); @@ -528,7 +528,7 @@ njsc32_init_cmds(struct njsc32_softc *sc) bus_dmamap_unload(sc->sc_dmat, sc->sc_dmamap_cmdpg); fail3: bus_dmamap_destroy(sc->sc_dmat, sc->sc_dmamap_cmdpg); -fail2: bus_dmamem_unmap(sc->sc_dmat, (caddr_t)sc->sc_cmdpg, +fail2: bus_dmamem_unmap(sc->sc_dmat, (void *)sc->sc_cmdpg, sizeof(struct njsc32_dma_page)); fail1: bus_dmamem_free(sc->sc_dmat, &sc->sc_cmdpg_seg, sc->sc_cmdpg_nsegs); @@ -743,7 +743,7 @@ njsc32_detach(struct njsc32_softc *sc, int flags) bus_dmamap_unload(sc->sc_dmat, sc->sc_dmamap_cmdpg); bus_dmamap_destroy(sc->sc_dmat, sc->sc_dmamap_cmdpg); - bus_dmamem_unmap(sc->sc_dmat, (caddr_t)sc->sc_cmdpg, + bus_dmamem_unmap(sc->sc_dmat, (void *)sc->sc_cmdpg, sizeof(struct njsc32_dma_page)); bus_dmamem_free(sc->sc_dmat, &sc->sc_cmdpg_seg, sc->sc_cmdpg_nsegs); @@ -1400,7 +1400,7 @@ njsc32_reset_detected(struct njsc32_softc *sc) static int njsc32_scsipi_ioctl(struct scsipi_channel *chan, u_long cmd, - caddr_t addr, int flag, struct proc *p) + void *addr, int flag, struct proc *p) { struct njsc32_softc *sc = (void *)chan->chan_adapter->adapt_dev; diff --git a/sys/dev/ic/oosiop.c b/sys/dev/ic/oosiop.c index a8a247416bb..a498ee650bf 100644 --- a/sys/dev/ic/oosiop.c +++ b/sys/dev/ic/oosiop.c @@ -1,4 +1,4 @@ -/* $NetBSD: oosiop.c,v 1.9 2005/12/24 20:27:30 perry Exp $ */ +/* $NetBSD: oosiop.c,v 1.10 2007/03/04 06:01:59 christos Exp $ */ /* * Copyright (c) 2001 Shuichiro URATA. All rights reserved. @@ -35,7 +35,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: oosiop.c,v 1.9 2005/12/24 20:27:30 perry Exp $"); +__KERNEL_RCSID(0, "$NetBSD: oosiop.c,v 1.10 2007/03/04 06:01:59 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -142,7 +142,7 @@ oosiop_attach(struct oosiop_softc *sc) return; } err = bus_dmamem_map(sc->sc_dmat, &seg, nseg, scrsize, - (caddr_t *)&sc->sc_scr, BUS_DMA_NOWAIT | BUS_DMA_COHERENT); + (void **)&sc->sc_scr, BUS_DMA_NOWAIT | BUS_DMA_COHERENT); if (err) { printf(": failed to map script memory, err=%d\n", err); return; @@ -273,7 +273,7 @@ oosiop_alloc_cb(struct oosiop_softc *sc, int ncb) return (err); } err = bus_dmamem_map(sc->sc_dmat, &seg, nseg, xfersize, - (caddr_t *)(void *)&xfer, BUS_DMA_NOWAIT | BUS_DMA_COHERENT); + (void **)(void *)&xfer, BUS_DMA_NOWAIT | BUS_DMA_COHERENT); if (err) { printf(": failed to map xfer block memory, err=%d\n", err); return (err); diff --git a/sys/dev/ic/osiop.c b/sys/dev/ic/osiop.c index 5333326db52..9e5ccece967 100644 --- a/sys/dev/ic/osiop.c +++ b/sys/dev/ic/osiop.c @@ -1,4 +1,4 @@ -/* $NetBSD: osiop.c,v 1.26 2006/03/29 04:16:49 thorpej Exp $ */ +/* $NetBSD: osiop.c,v 1.27 2007/03/04 06:01:59 christos Exp $ */ /* * Copyright (c) 2001 Izumi Tsutsui. All rights reserved. @@ -100,7 +100,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: osiop.c,v 1.26 2006/03/29 04:16:49 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: osiop.c,v 1.27 2007/03/04 06:01:59 christos Exp $"); /* #define OSIOP_DEBUG */ @@ -199,7 +199,7 @@ osiop_attach(struct osiop_softc *sc) return; } err = bus_dmamem_map(sc->sc_dmat, &seg, nseg, PAGE_SIZE, - (caddr_t *)&sc->sc_script, BUS_DMA_NOWAIT | BUS_DMA_COHERENT); + (void **)&sc->sc_script, BUS_DMA_NOWAIT | BUS_DMA_COHERENT); if (err) { printf(": failed to map script memory, err=%d\n", err); return; @@ -235,7 +235,7 @@ osiop_attach(struct osiop_softc *sc) return; } err = bus_dmamem_map(sc->sc_dmat, &seg, nseg, - sizeof(struct osiop_ds) * OSIOP_NACB, (caddr_t *)&sc->sc_ds, + sizeof(struct osiop_ds) * OSIOP_NACB, (void **)&sc->sc_ds, BUS_DMA_NOWAIT | BUS_DMA_COHERENT); if (err) { printf(": failed to map ds memory, err=%d\n", err); diff --git a/sys/dev/ic/pdq_ifsubr.c b/sys/dev/ic/pdq_ifsubr.c index 3b03aaf23f0..91eabd725d1 100644 --- a/sys/dev/ic/pdq_ifsubr.c +++ b/sys/dev/ic/pdq_ifsubr.c @@ -1,4 +1,4 @@ -/* $NetBSD: pdq_ifsubr.c,v 1.47 2006/11/16 01:32:52 christos Exp $ */ +/* $NetBSD: pdq_ifsubr.c,v 1.48 2007/03/04 06:01:59 christos Exp $ */ /*- * Copyright (c) 1995, 1996 Matt Thomas <matt@3am-software.com> @@ -35,7 +35,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: pdq_ifsubr.c,v 1.47 2006/11/16 01:32:52 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pdq_ifsubr.c,v 1.48 2007/03/04 06:01:59 christos Exp $"); #ifdef __NetBSD__ #include "opt_inet.h" @@ -417,7 +417,7 @@ int pdq_ifioctl( struct ifnet *ifp, ioctl_cmd_t cmd, - caddr_t data) + void *data) { pdq_softc_t *sc = PDQ_OS_IFP_TO_SOFTC(ifp); int s, error = 0; @@ -448,8 +448,8 @@ pdq_ifioctl( } case SIOCGIFADDR: { struct ifreq *ifr = (struct ifreq *)data; - memcpy((caddr_t) ((struct sockaddr *)&ifr->ifr_data)->sa_data, - (caddr_t) PDQ_LANADDR(sc), 6); + memcpy((void *) ((struct sockaddr *)&ifr->ifr_data)->sa_data, + (void *) PDQ_LANADDR(sc), 6); break; } @@ -551,7 +551,7 @@ pdq_ifattach( if_attach(ifp); #if defined(__NetBSD__) - fddi_ifattach(ifp, (caddr_t)&sc->sc_pdq->pdq_hwaddr); + fddi_ifattach(ifp, (void *)&sc->sc_pdq->pdq_hwaddr); #else fddi_ifattach(ifp); #endif @@ -579,7 +579,7 @@ pdq_os_memalloc_contig( if (!not_ok) { steps = 1; not_ok = bus_dmamem_map(sc->sc_dmatag, db_segs, db_nsegs, - sizeof(*pdq->pdq_dbp), (caddr_t *) &pdq->pdq_dbp, + sizeof(*pdq->pdq_dbp), (void **) &pdq->pdq_dbp, BUS_DMA_NOWAIT); } if (!not_ok) { @@ -604,7 +604,7 @@ pdq_os_memalloc_contig( steps = 5; not_ok = bus_dmamem_map(sc->sc_dmatag, ui_segs, ui_nsegs, PDQ_OS_PAGESIZE, - (caddr_t *) &pdq->pdq_unsolicited_info.ui_events, + (void **) &pdq->pdq_unsolicited_info.ui_events, BUS_DMA_NOWAIT); } if (!not_ok) { @@ -631,7 +631,7 @@ pdq_os_memalloc_contig( #else not_ok = bus_dmamem_map(sc->sc_dmatag, cb_segs, 1, sizeof(*pdq->pdq_cbp), - (caddr_t *)&pdq->pdq_cbp, + (void **)&pdq->pdq_cbp, BUS_DMA_NOWAIT|BUS_DMA_COHERENT); #endif } @@ -662,7 +662,7 @@ pdq_os_memalloc_contig( } case 9: { bus_dmamem_unmap(sc->sc_dmatag, - (caddr_t)pdq->pdq_cbp, sizeof(*pdq->pdq_cbp)); + (void *)pdq->pdq_cbp, sizeof(*pdq->pdq_cbp)); /* FALL THROUGH */ } case 8: { @@ -675,7 +675,7 @@ pdq_os_memalloc_contig( } case 6: { bus_dmamem_unmap(sc->sc_dmatag, - (caddr_t) pdq->pdq_unsolicited_info.ui_events, + (void *) pdq->pdq_unsolicited_info.ui_events, PDQ_OS_PAGESIZE); /* FALL THROUGH */ } @@ -693,7 +693,7 @@ pdq_os_memalloc_contig( } case 2: { bus_dmamem_unmap(sc->sc_dmatag, - (caddr_t) pdq->pdq_dbp, + (void *) pdq->pdq_dbp, sizeof(*pdq->pdq_dbp)); /* FALL THROUGH */ } diff --git a/sys/dev/ic/pdqvar.h b/sys/dev/ic/pdqvar.h index 117ceea77ff..429eae82ff1 100644 --- a/sys/dev/ic/pdqvar.h +++ b/sys/dev/ic/pdqvar.h @@ -1,4 +1,4 @@ -/* $NetBSD: pdqvar.h,v 1.36 2005/12/11 12:21:28 christos Exp $ */ +/* $NetBSD: pdqvar.h,v 1.37 2007/03/04 06:02:00 christos Exp $ */ /*- * Copyright (c) 1995, 1996 Matt Thomas <matt@3am-software.com> @@ -85,7 +85,7 @@ enum _pdq_type_t { #define PDQ_OS_PAGESIZE NBPG #endif #define PDQ_OS_USEC_DELAY(n) DELAY(n) -#define PDQ_OS_MEMZERO(p, n) memset((caddr_t)(p), 0, (n)) +#define PDQ_OS_MEMZERO(p, n) memset((void *)(p), 0, (n)) #if defined(__NetBSD__) && !defined(PDQ_NO_BUS_DMA) #define PDQ_BUS_DMA #endif @@ -287,7 +287,7 @@ extern void pdq_os_databuf_free(struct _pdq_os_ctx_t *, struct mbuf *); #endif #ifndef PDQ_OS_IFP_TO_SOFTC -#define PDQ_OS_IFP_TO_SOFTC(ifp) ((pdq_softc_t *) ((caddr_t) ifp - offsetof(pdq_softc_t, sc_ac.ac_if))) +#define PDQ_OS_IFP_TO_SOFTC(ifp) ((pdq_softc_t *) ((void *) ifp - offsetof(pdq_softc_t, sc_ac.ac_if))) #endif @@ -332,7 +332,7 @@ typedef struct _pdq_os_ctx_t { #if !defined(__bsdi__) || _BSDI_VERSION >= 199401 #define sc_bpf sc_if.if_bpf #else - caddr_t sc_bpf; + void *sc_bpf; #endif #if defined(PDQ_BUS_DMA) #if !defined(__NetBSD__) @@ -349,7 +349,7 @@ extern void pdq_ifreset(pdq_softc_t *); extern void pdq_ifinit(pdq_softc_t *); extern void pdq_ifwatchdog(struct ifnet *); extern ifnet_ret_t pdq_ifstart(struct ifnet *); -extern int pdq_ifioctl(struct ifnet *, ioctl_cmd_t, caddr_t); +extern int pdq_ifioctl(struct ifnet *, ioctl_cmd_t, void *); extern void pdq_ifattach(pdq_softc_t *, ifnet_ret_t (*ifwatchdog)(int)); #endif /* !PDQ_HWSUPPORT */ @@ -366,10 +366,10 @@ extern void pdq_ifattach(pdq_softc_t *, ifnet_ret_t (*ifwatchdog)(int)); #define PDQ_OS_PAGESIZE PAGESIZE #define PDQ_OS_USEC_DELAY(n) drv_usecwait(n) -#define PDQ_OS_MEMZERO(p, n) bzero((caddr_t)(p), (n)) -#define PDQ_OS_VA_TO_BUSPA(pdq, p) vtop((caddr_t)p, NULL) +#define PDQ_OS_MEMZERO(p, n) bzero((void *)(p), (n)) +#define PDQ_OS_VA_TO_BUSPA(pdq, p) vtop((void *)p, NULL) #define PDQ_OS_MEMALLOC(n) kmem_zalloc(n, KM_NOSLEEP) -#define PDQ_OS_MEMFREE(p, n) kmem_free((caddr_t) p, n) +#define PDQ_OS_MEMFREE(p, n) kmem_free((void *) p, n) #define PDQ_OS_MEMALLOC_CONTIG(n) kmem_zalloc_physreq(n, decfddiphysreq_db, KM_NOSLEEP) #define PDQ_OS_MEMFREE_CONTIG(p, n) PDQ_OS_MEMFREE(p, n) diff --git a/sys/dev/ic/rrunner.c b/sys/dev/ic/rrunner.c index de71a74b049..ee55f101e04 100644 --- a/sys/dev/ic/rrunner.c +++ b/sys/dev/ic/rrunner.c @@ -1,4 +1,4 @@ -/* $NetBSD: rrunner.c,v 1.60 2007/01/04 18:44:45 elad Exp $ */ +/* $NetBSD: rrunner.c,v 1.61 2007/03/04 06:02:00 christos Exp $ */ /* * Copyright (c) 1997, 1998 The NetBSD Foundation, Inc. @@ -42,7 +42,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: rrunner.c,v 1.60 2007/01/04 18:44:45 elad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rrunner.c,v 1.61 2007/03/04 06:02:00 christos Exp $"); #include "opt_inet.h" @@ -111,7 +111,7 @@ u_int32_t max_write_len; /* Network device driver and initialization framework routines */ void eshinit(struct esh_softc *); -int eshioctl(struct ifnet *, u_long, caddr_t); +int eshioctl(struct ifnet *, u_long, void *); void eshreset(struct esh_softc *); void eshstart(struct ifnet *); static int eshstatus(struct esh_softc *); @@ -167,7 +167,7 @@ static void eshstart_cleanup(struct esh_softc *, u_int16_t, int); static struct esh_dmainfo *esh_new_dmainfo(struct esh_softc *); static void esh_free_dmainfo(struct esh_softc *, struct esh_dmainfo *); -static int esh_generic_ioctl(struct esh_softc *, u_long, caddr_t, u_long, +static int esh_generic_ioctl(struct esh_softc *, u_long, void *, u_long, struct lwp *); #ifdef ESH_PRINTF @@ -232,7 +232,7 @@ eshconfig(sc) } error = bus_dmamem_map(sc->sc_dmat, &sc->sc_dmaseg, rseg, - sc->sc_dma_size, &sc->sc_dma_addr, + sc->sc_dma_size, (void **)&sc->sc_dma_addr, BUS_DMA_NOWAIT | BUS_DMA_COHERENT); if (error) { aprint_error( @@ -779,7 +779,7 @@ esh_fpopen(dev_t dev, int oflags, int devtype, ring_ctl = &sc->sc_recv_ring_table[ulp]; bus_dmamap_sync(sc->sc_dmat, sc->sc_dma, - (caddr_t) ring_ctl - (caddr_t) sc->sc_dma_addr, + (char *) ring_ctl - (char *) sc->sc_dma_addr, sizeof(*ring_ctl), BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE); if (ring_ctl->rr_entry_size != 0) { @@ -820,7 +820,7 @@ esh_fpopen(dev_t dev, int oflags, int devtype, } error = bus_dmamem_map(sc->sc_dmat, &recv->ec_dmaseg, rseg, - size, (caddr_t *) &recv->ec_descr, + size, (void **) &recv->ec_descr, BUS_DMA_WAITOK | BUS_DMA_COHERENT); if (error) { printf("%s: couldn't map memory for FP receive ring\n", @@ -867,7 +867,7 @@ esh_fpopen(dev_t dev, int oflags, int devtype, sc->sc_fp_recv[ulp] = recv; bus_dmamap_sync(sc->sc_dmat, sc->sc_dma, - (caddr_t) ring_ctl - (caddr_t) sc->sc_dma_addr, + (char *) ring_ctl - (char *) sc->sc_dma_addr, sizeof(*ring_ctl), BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); @@ -911,7 +911,7 @@ bad_fp_ring_create: bad_fp_dmamap_load: bus_dmamap_destroy(sc->sc_dmat, recv->ec_dma); bad_fp_dmamap_create: - bus_dmamem_unmap(sc->sc_dmat, (caddr_t) recv->ec_descr, size); + bus_dmamem_unmap(sc->sc_dmat, (void *) recv->ec_descr, size); bad_fp_dmamem_map: bus_dmamem_free(sc->sc_dmat, &recv->ec_dmaseg, rseg); bad_fp_dmamem_alloc: @@ -979,7 +979,7 @@ esh_fpclose(dev_t dev, int fflag, int devtype, bus_dmamap_unload(sc->sc_dmat, ring->ec_dma); bus_dmamap_destroy(sc->sc_dmat, ring->ec_dma); - bus_dmamem_unmap(sc->sc_dmat, (caddr_t) ring->ec_descr, + bus_dmamem_unmap(sc->sc_dmat, (void *) ring->ec_descr, RR_FP_RECV_RING_SIZE * sizeof(struct rr_descr)); bus_dmamem_free(sc->sc_dmat, &ring->ec_dmaseg, ring->ec_dma->dm_nsegs); free(ring, M_DEVBUF); @@ -2475,7 +2475,7 @@ esh_init_snap_ring(sc) if (ring->rr_entry_size == 0) { bus_dmamap_sync(sc->sc_dmat, sc->sc_dma, - (caddr_t) ring - (caddr_t) sc->sc_dma_addr, + (char *) ring - (char *) sc->sc_dma_addr, sizeof(*ring), BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE); @@ -2489,7 +2489,7 @@ esh_init_snap_ring(sc) ring->rr_mode = RR_RR_IP; bus_dmamap_sync(sc->sc_dmat, sc->sc_dma, - (caddr_t) ring - (caddr_t) sc->sc_dma_addr, + (char *) ring - (char *) sc->sc_dma_addr, sizeof(ring), BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); esh_send_cmd(sc, RR_CC_ENABLE_RING, HIPPI_ULP_802, @@ -2946,7 +2946,7 @@ int eshioctl(ifp, cmd, data) struct ifnet *ifp; u_long cmd; - caddr_t data; + void *data; { int error = 0; struct esh_softc *sc = ifp->if_softc; @@ -3059,7 +3059,7 @@ ioctl_done: static int -esh_generic_ioctl(struct esh_softc *sc, u_long cmd, caddr_t data, +esh_generic_ioctl(struct esh_softc *sc, u_long cmd, void *data, u_long len, struct lwp *l) { struct ifnet *ifp = &sc->sc_if; @@ -3100,7 +3100,7 @@ esh_generic_ioctl(struct esh_softc *sc, u_long cmd, caddr_t data, if (len != sizeof(struct rr_tuning)) error = EMSGSIZE; else { - error = copyout((caddr_t) &sc->sc_tune, data, + error = copyout((void *) &sc->sc_tune, data, sizeof(struct rr_tuning)); } break; @@ -3110,7 +3110,7 @@ esh_generic_ioctl(struct esh_softc *sc, u_long cmd, caddr_t data, if (len != sizeof(struct rr_tuning)) { error = EMSGSIZE; } else { - error = copyin(data, (caddr_t) &sc->sc_tune, + error = copyin(data, (void *) &sc->sc_tune, sizeof(struct rr_tuning)); } } else { @@ -3122,7 +3122,7 @@ esh_generic_ioctl(struct esh_softc *sc, u_long cmd, caddr_t data, if (len != sizeof(struct rr_stats)) error = EMSGSIZE; else - error = copyout((caddr_t) &sc->sc_gen_info->ri_stats, + error = copyout((void *) &sc->sc_gen_info->ri_stats, data, sizeof(struct rr_stats)); break; @@ -3138,7 +3138,7 @@ esh_generic_ioctl(struct esh_softc *sc, u_long cmd, caddr_t data, break; } - error = copyin(data, (caddr_t) &rr_eeprom, sizeof(rr_eeprom)); + error = copyin(data, (void *) &rr_eeprom, sizeof(rr_eeprom)); if (error != 0) break; @@ -3189,13 +3189,13 @@ esh_generic_ioctl(struct esh_softc *sc, u_long cmd, caddr_t data, value = esh_read_eeprom(sc, address); address += RR_EE_WORD_LEN; if (copyout(&value, - (caddr_t) rr_eeprom.ifr_buffer + i, + (char *) rr_eeprom.ifr_buffer + i, sizeof(u_int32_t)) != 0) { error = EFAULT; break; } } else { - if (copyin((caddr_t) rr_eeprom.ifr_buffer + i, + if (copyin((char *) rr_eeprom.ifr_buffer + i, &value, sizeof(u_int32_t)) != 0) { error = EFAULT; break; diff --git a/sys/dev/ic/rrunnervar.h b/sys/dev/ic/rrunnervar.h index 7c343314171..d96f522e9db 100644 --- a/sys/dev/ic/rrunnervar.h +++ b/sys/dev/ic/rrunnervar.h @@ -1,4 +1,4 @@ -/* $NetBSD: rrunnervar.h,v 1.11 2005/12/11 12:21:28 christos Exp $ */ +/* $NetBSD: rrunnervar.h,v 1.12 2007/03/04 06:02:00 christos Exp $ */ /* Copyright (c) 1997, 1998 The NetBSD Foundation, Inc. * All rights reserved. @@ -169,7 +169,7 @@ struct esh_softc { data structures in host memory that are DMA'ed to the NIC */ bus_dmamap_t sc_dma; /* dma map for the segment */ - caddr_t sc_dma_addr; /* address in kernel of DMA mem */ + char *sc_dma_addr; /* address in kernel of DMA mem */ bus_size_t sc_dma_size; /* size of dma-able region */ u_int8_t (*sc_bist_read)(struct esh_softc *); diff --git a/sys/dev/ic/rt2560.c b/sys/dev/ic/rt2560.c index 707b5105dd5..33fab93a0c5 100644 --- a/sys/dev/ic/rt2560.c +++ b/sys/dev/ic/rt2560.c @@ -1,4 +1,4 @@ -/* $NetBSD: rt2560.c,v 1.7 2006/11/16 01:32:52 christos Exp $ */ +/* $NetBSD: rt2560.c,v 1.8 2007/03/04 06:02:00 christos Exp $ */ /* $OpenBSD: rt2560.c,v 1.15 2006/04/20 20:31:12 miod Exp $ */ /* $FreeBSD: rt2560.c,v 1.3 2006/03/21 21:15:43 damien Exp $*/ @@ -24,7 +24,7 @@ * http://www.ralinktech.com/ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: rt2560.c,v 1.7 2006/11/16 01:32:52 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rt2560.c,v 1.8 2007/03/04 06:02:00 christos Exp $"); #include "bpfilter.h" @@ -126,7 +126,7 @@ static int rt2560_tx_data(struct rt2560_softc *, struct mbuf *, static void rt2560_start(struct ifnet *); static void rt2560_watchdog(struct ifnet *); static int rt2560_reset(struct ifnet *); -static int rt2560_ioctl(struct ifnet *, u_long, caddr_t); +static int rt2560_ioctl(struct ifnet *, u_long, void *); static void rt2560_bbp_write(struct rt2560_softc *, uint8_t, uint8_t); static uint8_t rt2560_bbp_read(struct rt2560_softc *, uint8_t); static void rt2560_rf_write(struct rt2560_softc *, uint8_t, uint32_t); @@ -561,7 +561,7 @@ rt2560_alloc_tx_ring(struct rt2560_softc *sc, struct rt2560_tx_ring *ring, } error = bus_dmamem_map(sc->sc_dmat, &ring->seg, nsegs, - count * RT2560_TX_DESC_SIZE, (caddr_t *)&ring->desc, + count * RT2560_TX_DESC_SIZE, (void **)&ring->desc, BUS_DMA_NOWAIT); if (error != 0) { printf("%s: could not map desc DMA memory\n", @@ -652,7 +652,7 @@ rt2560_free_tx_ring(struct rt2560_softc *sc, struct rt2560_tx_ring *ring) bus_dmamap_sync(sc->sc_dmat, ring->map, 0, ring->map->dm_mapsize, BUS_DMASYNC_POSTWRITE); bus_dmamap_unload(sc->sc_dmat, ring->map); - bus_dmamem_unmap(sc->sc_dmat, (caddr_t)ring->desc, + bus_dmamem_unmap(sc->sc_dmat, (void *)ring->desc, ring->count * RT2560_TX_DESC_SIZE); bus_dmamem_free(sc->sc_dmat, &ring->seg, 1); } @@ -709,7 +709,7 @@ rt2560_alloc_rx_ring(struct rt2560_softc *sc, struct rt2560_rx_ring *ring, } error = bus_dmamem_map(sc->sc_dmat, &ring->seg, nsegs, - count * RT2560_RX_DESC_SIZE, (caddr_t *)&ring->desc, + count * RT2560_RX_DESC_SIZE, (void **)&ring->desc, BUS_DMA_NOWAIT); if (error != 0) { printf("%s: could not map desc DMA memory\n", @@ -817,7 +817,7 @@ rt2560_free_rx_ring(struct rt2560_softc *sc, struct rt2560_rx_ring *ring) bus_dmamap_sync(sc->sc_dmat, ring->map, 0, ring->map->dm_mapsize, BUS_DMASYNC_POSTWRITE); bus_dmamap_unload(sc->sc_dmat, ring->map); - bus_dmamem_unmap(sc->sc_dmat, (caddr_t)ring->desc, + bus_dmamem_unmap(sc->sc_dmat, (void *)ring->desc, ring->count * RT2560_RX_DESC_SIZE); bus_dmamem_free(sc->sc_dmat, &ring->seg, 1); } @@ -1365,7 +1365,7 @@ rt2560_decryption_intr(struct rt2560_softc *sc) tap->wr_antsignal = desc->rssi; M_COPY_PKTHDR(&mb, m); - mb.m_data = (caddr_t)tap; + mb.m_data = (void *)tap; mb.m_len = sc->sc_txtap_len; mb.m_next = m; mb.m_pkthdr.len += mb.m_len; @@ -1830,7 +1830,7 @@ rt2560_tx_mgt(struct rt2560_softc *sc, struct mbuf *m0, tap->wt_antenna = sc->tx_ant; M_COPY_PKTHDR(&mb, m0); - mb.m_data = (caddr_t)tap; + mb.m_data = (void *)tap; mb.m_len = sc->sc_txtap_len; mb.m_next = m0; mb.m_pkthdr.len += mb.m_len; @@ -2044,7 +2044,7 @@ rt2560_tx_data(struct rt2560_softc *sc, struct mbuf *m0, } } - m_copydata(m0, 0, m0->m_pkthdr.len, mtod(mnew, caddr_t)); + m_copydata(m0, 0, m0->m_pkthdr.len, mtod(mnew, void *)); m_freem(m0); mnew->m_len = mnew->m_pkthdr.len; m0 = mnew; @@ -2074,7 +2074,7 @@ rt2560_tx_data(struct rt2560_softc *sc, struct mbuf *m0, tap->wt_antenna = sc->tx_ant; M_COPY_PKTHDR(&mb, m0); - mb.m_data = (caddr_t)tap; + mb.m_data = (void *)tap; mb.m_len = sc->sc_txtap_len; mb.m_next = m0; mb.m_pkthdr.len += mb.m_len; @@ -2248,7 +2248,7 @@ rt2560_reset(struct ifnet *ifp) } int -rt2560_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) +rt2560_ioctl(struct ifnet *ifp, u_long cmd, void *data) { struct rt2560_softc *sc = ifp->if_softc; struct ieee80211com *ic = &sc->sc_ic; diff --git a/sys/dev/ic/rt2560var.h b/sys/dev/ic/rt2560var.h index 7f7d0b62e57..a4183608eab 100644 --- a/sys/dev/ic/rt2560var.h +++ b/sys/dev/ic/rt2560var.h @@ -1,4 +1,4 @@ -/* $NetBSD: rt2560var.h,v 1.4 2006/09/25 22:14:01 jmcneill Exp $ */ +/* $NetBSD: rt2560var.h,v 1.5 2007/03/04 06:02:00 christos Exp $ */ /* $OpenBSD: rt2560var.h,v 1.2 2006/01/14 12:43:27 damien Exp $ */ /*- @@ -151,7 +151,7 @@ struct rt2560_softc { int dwelltime; #if NBPFILTER > 0 - caddr_t sc_drvbpf; + void * sc_drvbpf; union { struct rt2560_rx_radiotap_header th; diff --git a/sys/dev/ic/rt2661.c b/sys/dev/ic/rt2661.c index 092c30cb6c5..136f3bffa06 100644 --- a/sys/dev/ic/rt2661.c +++ b/sys/dev/ic/rt2661.c @@ -1,4 +1,4 @@ -/* $NetBSD: rt2661.c,v 1.13 2006/11/16 01:32:52 christos Exp $ */ +/* $NetBSD: rt2661.c,v 1.14 2007/03/04 06:02:00 christos Exp $ */ /* $OpenBSD: rt2661.c,v 1.17 2006/05/01 08:41:11 damien Exp $ */ /* $FreeBSD: rt2560.c,v 1.5 2006/06/02 19:59:31 csjp Exp $ */ @@ -25,7 +25,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: rt2661.c,v 1.13 2006/11/16 01:32:52 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rt2661.c,v 1.14 2007/03/04 06:02:00 christos Exp $"); #include "bpfilter.h" @@ -130,7 +130,7 @@ static int rt2661_tx_data(struct rt2661_softc *, struct mbuf *, static void rt2661_start(struct ifnet *); static void rt2661_watchdog(struct ifnet *); static int rt2661_reset(struct ifnet *); -static int rt2661_ioctl(struct ifnet *, u_long, caddr_t); +static int rt2661_ioctl(struct ifnet *, u_long, void *); static void rt2661_bbp_write(struct rt2661_softc *, uint8_t, uint8_t); static uint8_t rt2661_bbp_read(struct rt2661_softc *, uint8_t); static void rt2661_rf_write(struct rt2661_softc *, uint8_t, uint32_t); @@ -568,7 +568,7 @@ rt2661_alloc_tx_ring(struct rt2661_softc *sc, struct rt2661_tx_ring *ring, } error = bus_dmamem_map(sc->sc_dmat, &ring->seg, nsegs, - count * RT2661_TX_DESC_SIZE, (caddr_t *)&ring->desc, + count * RT2661_TX_DESC_SIZE, (void **)&ring->desc, BUS_DMA_NOWAIT); if (error != 0) { aprint_error("%s: could not map desc DMA memory\n", @@ -659,7 +659,7 @@ rt2661_free_tx_ring(struct rt2661_softc *sc, struct rt2661_tx_ring *ring) bus_dmamap_sync(sc->sc_dmat, ring->map, 0, ring->map->dm_mapsize, BUS_DMASYNC_POSTWRITE); bus_dmamap_unload(sc->sc_dmat, ring->map); - bus_dmamem_unmap(sc->sc_dmat, (caddr_t)ring->desc, + bus_dmamem_unmap(sc->sc_dmat, (void *)ring->desc, ring->count * RT2661_TX_DESC_SIZE); bus_dmamem_free(sc->sc_dmat, &ring->seg, 1); } @@ -714,7 +714,7 @@ rt2661_alloc_rx_ring(struct rt2661_softc *sc, struct rt2661_rx_ring *ring, } error = bus_dmamem_map(sc->sc_dmat, &ring->seg, nsegs, - count * RT2661_RX_DESC_SIZE, (caddr_t *)&ring->desc, + count * RT2661_RX_DESC_SIZE, (void **)&ring->desc, BUS_DMA_NOWAIT); if (error != 0) { aprint_error("%s: could not map desc DMA memory\n", @@ -819,7 +819,7 @@ rt2661_free_rx_ring(struct rt2661_softc *sc, struct rt2661_rx_ring *ring) bus_dmamap_sync(sc->sc_dmat, ring->map, 0, ring->map->dm_mapsize, BUS_DMASYNC_POSTWRITE); bus_dmamap_unload(sc->sc_dmat, ring->map); - bus_dmamem_unmap(sc->sc_dmat, (caddr_t)ring->desc, + bus_dmamem_unmap(sc->sc_dmat, (void *)ring->desc, ring->count * RT2661_RX_DESC_SIZE); bus_dmamem_free(sc->sc_dmat, &ring->seg, 1); } @@ -1813,7 +1813,7 @@ rt2661_tx_data(struct rt2661_softc *sc, struct mbuf *m0, } } - m_copydata(m0, 0, m0->m_pkthdr.len, mtod(mnew, caddr_t)); + m_copydata(m0, 0, m0->m_pkthdr.len, mtod(mnew, void *)); m_freem(m0); mnew->m_len = mnew->m_pkthdr.len; m0 = mnew; @@ -2024,7 +2024,7 @@ rt2661_reset(struct ifnet *ifp) } static int -rt2661_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) +rt2661_ioctl(struct ifnet *ifp, u_long cmd, void *data) { struct rt2661_softc *sc = ifp->if_softc; struct ieee80211com *ic = &sc->sc_ic; diff --git a/sys/dev/ic/rt2661var.h b/sys/dev/ic/rt2661var.h index 526fb35bdba..0e7221432f6 100644 --- a/sys/dev/ic/rt2661var.h +++ b/sys/dev/ic/rt2661var.h @@ -1,4 +1,4 @@ -/* $NetBSD: rt2661var.h,v 1.5 2006/06/09 19:17:46 drochner Exp $ */ +/* $NetBSD: rt2661var.h,v 1.6 2007/03/04 06:02:00 christos Exp $ */ /* $OpenBSD: rt2661var.h,v 1.4 2006/02/25 12:56:47 damien Exp $ */ /*- @@ -152,7 +152,7 @@ struct rt2661_softc { uint8_t bbp64; #if NBPFILTER > 0 - caddr_t sc_drvbpf; + void * sc_drvbpf; union { struct rt2661_rx_radiotap_header th; diff --git a/sys/dev/ic/rtl8169.c b/sys/dev/ic/rtl8169.c index 28932856720..fad50eed39e 100644 --- a/sys/dev/ic/rtl8169.c +++ b/sys/dev/ic/rtl8169.c @@ -1,4 +1,4 @@ -/* $NetBSD: rtl8169.c,v 1.82 2007/02/21 22:59:59 thorpej Exp $ */ +/* $NetBSD: rtl8169.c,v 1.83 2007/03/04 06:02:00 christos Exp $ */ /* * Copyright (c) 1997, 1998-2003 @@ -157,7 +157,7 @@ static void re_rxeof(struct rtk_softc *); static void re_txeof(struct rtk_softc *); static void re_tick(void *); static void re_start(struct ifnet *); -static int re_ioctl(struct ifnet *, u_long, caddr_t); +static int re_ioctl(struct ifnet *, u_long, void *); static int re_init(struct ifnet *); static void re_stop(struct ifnet *, int); static void re_watchdog(struct ifnet *); @@ -649,7 +649,7 @@ re_attach(struct rtk_softc *sc) /* Load the map for the TX ring. */ if ((error = bus_dmamem_map(sc->sc_dmat, &sc->re_ldata.re_tx_listseg, sc->re_ldata.re_tx_listnseg, RE_TX_LIST_SZ(sc), - (caddr_t *)&sc->re_ldata.re_tx_list, + (void **)&sc->re_ldata.re_tx_list, BUS_DMA_COHERENT | BUS_DMA_NOWAIT)) != 0) { aprint_error("%s: can't map tx list, error = %d\n", sc->sc_dev.dv_xname, error); @@ -700,7 +700,7 @@ re_attach(struct rtk_softc *sc) /* Load the map for the RX ring. */ if ((error = bus_dmamem_map(sc->sc_dmat, &sc->re_ldata.re_rx_listseg, sc->re_ldata.re_rx_listnseg, RE_RX_DMAMEM_SZ, - (caddr_t *)&sc->re_ldata.re_rx_list, + (void **)&sc->re_ldata.re_rx_list, BUS_DMA_COHERENT | BUS_DMA_NOWAIT)) != 0) { aprint_error("%s: can't map rx list, error = %d\n", sc->sc_dev.dv_xname, error); @@ -824,7 +824,7 @@ re_attach(struct rtk_softc *sc) bus_dmamap_destroy(sc->sc_dmat, sc->re_ldata.re_rx_list_map); fail_6: bus_dmamem_unmap(sc->sc_dmat, - (caddr_t)sc->re_ldata.re_rx_list, RE_RX_DMAMEM_SZ); + (void *)sc->re_ldata.re_rx_list, RE_RX_DMAMEM_SZ); fail_5: bus_dmamem_free(sc->sc_dmat, &sc->re_ldata.re_rx_listseg, sc->re_ldata.re_rx_listnseg); @@ -842,7 +842,7 @@ re_attach(struct rtk_softc *sc) bus_dmamap_destroy(sc->sc_dmat, sc->re_ldata.re_tx_list_map); fail_2: bus_dmamem_unmap(sc->sc_dmat, - (caddr_t)sc->re_ldata.re_tx_list, RE_TX_LIST_SZ(sc)); + (void *)sc->re_ldata.re_tx_list, RE_TX_LIST_SZ(sc)); fail_1: bus_dmamem_free(sc->sc_dmat, &sc->re_ldata.re_tx_listseg, sc->re_ldata.re_tx_listnseg); @@ -914,7 +914,7 @@ re_detach(struct rtk_softc *sc) bus_dmamap_unload(sc->sc_dmat, sc->re_ldata.re_rx_list_map); bus_dmamap_destroy(sc->sc_dmat, sc->re_ldata.re_rx_list_map); bus_dmamem_unmap(sc->sc_dmat, - (caddr_t)sc->re_ldata.re_rx_list, RE_RX_DMAMEM_SZ); + (void *)sc->re_ldata.re_rx_list, RE_RX_DMAMEM_SZ); bus_dmamem_free(sc->sc_dmat, &sc->re_ldata.re_rx_listseg, sc->re_ldata.re_rx_listnseg); @@ -928,7 +928,7 @@ re_detach(struct rtk_softc *sc) bus_dmamap_unload(sc->sc_dmat, sc->re_ldata.re_tx_list_map); bus_dmamap_destroy(sc->sc_dmat, sc->re_ldata.re_tx_list_map); bus_dmamem_unmap(sc->sc_dmat, - (caddr_t)sc->re_ldata.re_tx_list, RE_TX_LIST_SZ(sc)); + (void *)sc->re_ldata.re_tx_list, RE_TX_LIST_SZ(sc)); bus_dmamem_free(sc->sc_dmat, &sc->re_ldata.re_tx_listseg, sc->re_ldata.re_tx_listnseg); @@ -1977,7 +1977,7 @@ re_ifmedia_sts(struct ifnet *ifp, struct ifmediareq *ifmr) } static int -re_ioctl(struct ifnet *ifp, u_long command, caddr_t data) +re_ioctl(struct ifnet *ifp, u_long command, void *data) { struct rtk_softc *sc = ifp->if_softc; struct ifreq *ifr = (struct ifreq *) data; diff --git a/sys/dev/ic/rtl81x9.c b/sys/dev/ic/rtl81x9.c index 0cae2770387..0d4f11d0b0f 100644 --- a/sys/dev/ic/rtl81x9.c +++ b/sys/dev/ic/rtl81x9.c @@ -1,4 +1,4 @@ -/* $NetBSD: rtl81x9.c,v 1.70 2007/02/16 13:01:48 tsutsui Exp $ */ +/* $NetBSD: rtl81x9.c,v 1.71 2007/03/04 06:02:00 christos Exp $ */ /* * Copyright (c) 1997, 1998 @@ -86,7 +86,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: rtl81x9.c,v 1.70 2007/02/16 13:01:48 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rtl81x9.c,v 1.71 2007/03/04 06:02:00 christos Exp $"); #include "bpfilter.h" #include "rnd.h" @@ -135,7 +135,7 @@ STATIC void rtk_reset(struct rtk_softc *); STATIC void rtk_rxeof(struct rtk_softc *); STATIC void rtk_txeof(struct rtk_softc *); STATIC void rtk_start(struct ifnet *); -STATIC int rtk_ioctl(struct ifnet *, u_long, caddr_t); +STATIC int rtk_ioctl(struct ifnet *, u_long, void *); STATIC int rtk_init(struct ifnet *); STATIC void rtk_stop(struct ifnet *, int); @@ -668,7 +668,7 @@ rtk_attach(struct rtk_softc *sc) } if ((error = bus_dmamem_map(sc->sc_dmat, &sc->sc_dmaseg, sc->sc_dmanseg, - RTK_RXBUFLEN + 16, (caddr_t *)&sc->rtk_rx_buf, + RTK_RXBUFLEN + 16, (void **)&sc->rtk_rx_buf, BUS_DMA_NOWAIT|BUS_DMA_COHERENT)) != 0) { printf("%s: can't map recv buffer, error = %d\n", sc->sc_dev.dv_xname, error); @@ -789,7 +789,7 @@ rtk_attach(struct rtk_softc *sc) fail_3: bus_dmamap_destroy(sc->sc_dmat, sc->recv_dmamap); fail_2: - bus_dmamem_unmap(sc->sc_dmat, (caddr_t)sc->rtk_rx_buf, + bus_dmamem_unmap(sc->sc_dmat, (void *)sc->rtk_rx_buf, RTK_RXBUFLEN + 16); fail_1: bus_dmamem_free(sc->sc_dmat, &sc->sc_dmaseg, sc->sc_dmanseg); @@ -885,7 +885,7 @@ rtk_detach(struct rtk_softc *sc) bus_dmamap_destroy(sc->sc_dmat, txd->txd_dmamap); } bus_dmamap_destroy(sc->sc_dmat, sc->recv_dmamap); - bus_dmamem_unmap(sc->sc_dmat, (caddr_t)sc->rtk_rx_buf, + bus_dmamem_unmap(sc->sc_dmat, (void *)sc->rtk_rx_buf, RTK_RXBUFLEN + 16); bus_dmamem_free(sc->sc_dmat, &sc->sc_dmaseg, sc->sc_dmanseg); @@ -987,7 +987,7 @@ rtk_rxeof(struct rtk_softc *sc) { struct mbuf *m; struct ifnet *ifp; - caddr_t rxbufpos, dst; + char *rxbufpos, *dst; u_int total_len, wrap; uint32_t rxstat; uint16_t cur_rx, new_rx; @@ -1008,7 +1008,7 @@ rtk_rxeof(struct rtk_softc *sc) rx_bytes = 0; while ((CSR_READ_1(sc, RTK_COMMAND) & RTK_CMD_EMPTY_RXBUF) == 0) { - rxbufpos = sc->rtk_rx_buf + cur_rx; + rxbufpos = (char *)sc->rtk_rx_buf + cur_rx; bus_dmamap_sync(sc->sc_dmat, sc->recv_dmamap, cur_rx, RTK_RXSTAT_LEN, BUS_DMASYNC_POSTREAD); rxstat = le32toh(*(uint32_t *)rxbufpos); @@ -1073,7 +1073,7 @@ rtk_rxeof(struct rtk_softc *sc) * of the Rx area, if necessary. */ cur_rx = (cur_rx + RTK_RXSTAT_LEN) % RTK_RXBUFLEN; - rxbufpos = sc->rtk_rx_buf + cur_rx; + rxbufpos = (char *)sc->rtk_rx_buf + cur_rx; /* * Compute the number of bytes at which the packet @@ -1123,7 +1123,7 @@ rtk_rxeof(struct rtk_softc *sc) m->m_data += RTK_ETHER_ALIGN; /* for alignment */ m->m_pkthdr.rcvif = ifp; m->m_pkthdr.len = m->m_len = total_len; - dst = mtod(m, caddr_t); + dst = mtod(m, void *); /* * If the packet wraps, copy up to the wrapping point. @@ -1338,12 +1338,12 @@ rtk_start(struct ifnet *ifp) } } m_copydata(m_head, 0, m_head->m_pkthdr.len, - mtod(m_new, caddr_t)); + mtod(m_new, void *)); m_new->m_pkthdr.len = m_new->m_len = m_head->m_pkthdr.len; if (m_head->m_pkthdr.len < ETHER_PAD_LEN) { memset( - mtod(m_new, caddr_t) + m_head->m_pkthdr.len, + mtod(m_new, char *) + m_head->m_pkthdr.len, 0, ETHER_PAD_LEN - m_head->m_pkthdr.len); m_new->m_pkthdr.len = m_new->m_len = ETHER_PAD_LEN; @@ -1535,7 +1535,7 @@ rtk_ifmedia_sts(struct ifnet *ifp, struct ifmediareq *ifmr) } STATIC int -rtk_ioctl(struct ifnet *ifp, u_long command, caddr_t data) +rtk_ioctl(struct ifnet *ifp, u_long command, void *data) { struct rtk_softc *sc = ifp->if_softc; struct ifreq *ifr = (struct ifreq *)data; diff --git a/sys/dev/ic/rtl81x9var.h b/sys/dev/ic/rtl81x9var.h index a5aa9060ebc..cbe0897f637 100644 --- a/sys/dev/ic/rtl81x9var.h +++ b/sys/dev/ic/rtl81x9var.h @@ -1,4 +1,4 @@ -/* $NetBSD: rtl81x9var.h,v 1.37 2006/11/25 02:42:18 tsutsui Exp $ */ +/* $NetBSD: rtl81x9var.h,v 1.38 2007/03/04 06:02:00 christos Exp $ */ /* * Copyright (c) 1997, 1998 @@ -199,7 +199,7 @@ struct rtk_softc { int sc_dmanseg; /* for rtk(4) */ bus_dmamap_t recv_dmamap; /* for rtk(4) */ - caddr_t rtk_rx_buf; + void * rtk_rx_buf; struct rtk_tx_desc rtk_tx_descs[RTK_TX_LIST_CNT]; SIMPLEQ_HEAD(, rtk_tx_desc) rtk_tx_free; diff --git a/sys/dev/ic/rtw.c b/sys/dev/ic/rtw.c index b5cda60b943..45cfc29e16e 100644 --- a/sys/dev/ic/rtw.c +++ b/sys/dev/ic/rtw.c @@ -1,4 +1,4 @@ -/* $NetBSD: rtw.c,v 1.84 2007/01/29 07:08:09 dyoung Exp $ */ +/* $NetBSD: rtw.c,v 1.85 2007/03/04 06:02:00 christos Exp $ */ /*- * Copyright (c) 2004, 2005 David Young. All rights reserved. * @@ -34,7 +34,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: rtw.c,v 1.84 2007/01/29 07:08:09 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rtw.c,v 1.85 2007/03/04 06:02:00 christos Exp $"); #include "bpfilter.h" @@ -1619,7 +1619,7 @@ rtw_intr_rx(struct rtw_softc *sc, uint16_t isr) rr->rr_antsignal = rssi; rr->rr_barker_lock = htole16(sq); - bpf_mtap2(sc->sc_radiobpf, (caddr_t)rr, + bpf_mtap2(sc->sc_radiobpf, (void *)rr, sizeof(sc->sc_rxtapu), m); } #endif /* NPBFILTER > 0 */ @@ -2913,7 +2913,7 @@ rtw_led_attach(struct rtw_led_state *ls, void *arg) } static int -rtw_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) +rtw_ioctl(struct ifnet *ifp, u_long cmd, void *data) { int rc = 0, s; struct rtw_softc *sc = ifp->if_softc; @@ -3153,7 +3153,7 @@ rtw_dmamap_load_txbuf(bus_dma_tag_t dmat, bus_dmamap_t dmam, struct mbuf *chain, break; } } - m_copydata(m0, 0, m0->m_pkthdr.len, mtod(m, caddr_t)); + m_copydata(m0, 0, m0->m_pkthdr.len, mtod(m, void *)); m->m_pkthdr.len = m->m_len = m0->m_pkthdr.len; m_freem(m0); m0 = m; @@ -3347,7 +3347,7 @@ rtw_start(struct ifnet *ifp) #if NBPFILTER > 0 if (ic->ic_rawbpf != NULL) - bpf_mtap((caddr_t)ic->ic_rawbpf, m0); + bpf_mtap((void *)ic->ic_rawbpf, m0); if (sc->sc_radiobpf != NULL) { struct rtw_tx_radiotap_header *rt = &sc->sc_txtap; @@ -3355,7 +3355,7 @@ rtw_start(struct ifnet *ifp) rt->rt_flags = 0; rt->rt_rate = rate; - bpf_mtap2(sc->sc_radiobpf, (caddr_t)rt, + bpf_mtap2(sc->sc_radiobpf, (void *)rt, sizeof(sc->sc_txtapu), m0); } #endif /* NPBFILTER > 0 */ @@ -4039,7 +4039,7 @@ rtw_attach(struct rtw_softc *sc) rc = bus_dmamem_map(sc->sc_dmat, &sc->sc_desc_segs, sc->sc_desc_nsegs, sizeof(struct rtw_descs), - (caddr_t*)&sc->sc_descs, BUS_DMA_COHERENT); + (void **)&sc->sc_descs, BUS_DMA_COHERENT); if (rc != 0) { printf("%s: could not map hw descriptors, error %d\n", @@ -4259,7 +4259,7 @@ rtw_detach(struct rtw_softc *sc) bus_dmamap_destroy(sc->sc_dmat, sc->sc_desc_dmamap); /*FALLTHROUGH*/ case FINISH_DESC_MAP: - bus_dmamem_unmap(sc->sc_dmat, (caddr_t)sc->sc_descs, + bus_dmamem_unmap(sc->sc_dmat, (void *)sc->sc_descs, sizeof(struct rtw_descs)); /*FALLTHROUGH*/ case FINISH_DESC_ALLOC: diff --git a/sys/dev/ic/rtwvar.h b/sys/dev/ic/rtwvar.h index e214d5ce733..e38b45a6fb9 100644 --- a/sys/dev/ic/rtwvar.h +++ b/sys/dev/ic/rtwvar.h @@ -1,4 +1,4 @@ -/* $NetBSD: rtwvar.h,v 1.30 2007/01/06 08:27:53 dyoung Exp $ */ +/* $NetBSD: rtwvar.h,v 1.31 2007/03/04 06:02:01 christos Exp $ */ /*- * Copyright (c) 2004, 2005 David Young. All rights reserved. * @@ -456,7 +456,7 @@ struct rtw_softc { struct rtw_mtbl sc_mtbl; struct rtw_hooks sc_hooks; - caddr_t sc_radiobpf; + void * sc_radiobpf; struct callout sc_scan_ch; u_int sc_cur_chan; diff --git a/sys/dev/ic/seeq8005.c b/sys/dev/ic/seeq8005.c index 92897f5aeb5..803cb6c45b8 100644 --- a/sys/dev/ic/seeq8005.c +++ b/sys/dev/ic/seeq8005.c @@ -1,4 +1,4 @@ -/* $NetBSD: seeq8005.c,v 1.38 2005/12/11 12:21:28 christos Exp $ */ +/* $NetBSD: seeq8005.c,v 1.39 2007/03/04 06:02:01 christos Exp $ */ /* * Copyright (c) 2000, 2001 Ben Harris @@ -61,7 +61,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: seeq8005.c,v 1.38 2005/12/11 12:21:28 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: seeq8005.c,v 1.39 2007/03/04 06:02:01 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -133,7 +133,7 @@ int seeq8005_debug = 0; */ static int ea_init(struct ifnet *); -static int ea_ioctl(struct ifnet *, u_long, caddr_t); +static int ea_ioctl(struct ifnet *, u_long, void *); static void ea_start(struct ifnet *); static void ea_watchdog(struct ifnet *); static void ea_chipreset(struct seeq8005_softc *); @@ -1321,7 +1321,7 @@ ea_get(struct seeq8005_softc *sc, int addr, int totlen, struct ifnet *ifp) } if (top == 0) { /* Make sure the payload is aligned */ - caddr_t newdata = (caddr_t) + void *newdata = (void *) ALIGN(m->m_data + sizeof(struct ether_header)) - sizeof(struct ether_header); len -= newdata - m->m_data; @@ -1346,7 +1346,7 @@ ea_get(struct seeq8005_softc *sc, int addr, int totlen, struct ifnet *ifp) * Process an ioctl request. Mostly boilerplate. */ static int -ea_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) +ea_ioctl(struct ifnet *ifp, u_long cmd, void *data) { struct seeq8005_softc *sc = ifp->if_softc; int s, error = 0; diff --git a/sys/dev/ic/sgec.c b/sys/dev/ic/sgec.c index 5c251c3e69d..e9d3b17e55f 100644 --- a/sys/dev/ic/sgec.c +++ b/sys/dev/ic/sgec.c @@ -1,4 +1,4 @@ -/* $NetBSD: sgec.c,v 1.27 2005/12/11 12:21:28 christos Exp $ */ +/* $NetBSD: sgec.c,v 1.28 2007/03/04 06:02:01 christos Exp $ */ /* * Copyright (c) 1999 Ludd, University of Lule}, Sweden. All rights reserved. * @@ -45,7 +45,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: sgec.c,v 1.27 2005/12/11 12:21:28 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sgec.c,v 1.28 2007/03/04 06:02:01 christos Exp $"); #include "opt_inet.h" #include "bpfilter.h" @@ -78,7 +78,7 @@ __KERNEL_RCSID(0, "$NetBSD: sgec.c,v 1.27 2005/12/11 12:21:28 christos Exp $"); static void zeinit(struct ze_softc *); static void zestart(struct ifnet *); -static int zeioctl(struct ifnet *, u_long, caddr_t); +static int zeioctl(struct ifnet *, u_long, void *); static int ze_add_rxbuf(struct ze_softc *, int); static void ze_setup(struct ze_softc *); static void zetimeout(struct ifnet *); @@ -116,7 +116,7 @@ sgec_attach(sc) } if ((error = bus_dmamem_map(sc->sc_dmat, &seg, rseg, - sizeof(struct ze_cdata), (caddr_t *)&sc->sc_zedata, + sizeof(struct ze_cdata), (void **)&sc->sc_zedata, BUS_DMA_NOWAIT|BUS_DMA_COHERENT)) != 0) { printf(": unable to map control data, error = %d\n", error); goto fail_1; @@ -246,7 +246,7 @@ sgec_attach(sc) fail_3: bus_dmamap_destroy(sc->sc_dmat, sc->sc_cmap); fail_2: - bus_dmamem_unmap(sc->sc_dmat, (caddr_t)sc->sc_zedata, + bus_dmamem_unmap(sc->sc_dmat, (void *)sc->sc_zedata, sizeof(struct ze_cdata)); fail_1: bus_dmamem_free(sc->sc_dmat, &seg, rseg); @@ -479,7 +479,7 @@ int zeioctl(ifp, cmd, data) struct ifnet *ifp; u_long cmd; - caddr_t data; + void *data; { struct ze_softc *sc = ifp->if_softc; struct ifreq *ifr = (struct ifreq *)data; diff --git a/sys/dev/ic/siop.c b/sys/dev/ic/siop.c index 061ed220d5a..b9484e5bcc1 100644 --- a/sys/dev/ic/siop.c +++ b/sys/dev/ic/siop.c @@ -1,4 +1,4 @@ -/* $NetBSD: siop.c,v 1.82 2006/11/02 15:08:30 garbled Exp $ */ +/* $NetBSD: siop.c,v 1.83 2007/03/04 06:02:01 christos Exp $ */ /* * Copyright (c) 2000 Manuel Bouyer. @@ -33,7 +33,7 @@ /* SYM53c7/8xx PCI-SCSI I/O Processors driver */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: siop.c,v 1.82 2006/11/02 15:08:30 garbled Exp $"); +__KERNEL_RCSID(0, "$NetBSD: siop.c,v 1.83 2007/03/04 06:02:01 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -1645,7 +1645,7 @@ siop_morecbd(sc) goto bad2; } error = bus_dmamem_map(sc->sc_c.sc_dmat, &seg, rseg, PAGE_SIZE, - (caddr_t *)&newcbd->xfers, BUS_DMA_NOWAIT|BUS_DMA_COHERENT); + (void **)&newcbd->xfers, BUS_DMA_NOWAIT|BUS_DMA_COHERENT); if (error) { printf("%s: unable to map cbd DMA memory, error = %d\n", sc->sc_c.sc_dev.dv_xname, error); @@ -1742,7 +1742,7 @@ siop_morecbd(sc) TAILQ_INSERT_TAIL(&sc->free_list, &newcbd->cmds[i], next); splx(s); #ifdef SIOP_DEBUG - printf("tables[%d]: in=0x%x out=0x%x status=0x%x\n", i + printf("tables[%d]: in=0x%x out=0x%x status=0x%x\n", i, le32toh(newcbd->cmds[i].cmd_tables->t_msgin.addr), le32toh(newcbd->cmds[i].cmd_tables->t_msgout.addr), le32toh(newcbd->cmds[i].cmd_tables->t_status.addr)); @@ -2005,7 +2005,7 @@ siop_del_dev(sc, target, lun) #ifdef SIOP_DEBUG printf("%s: free siop_target for target %d lun %d lunsw offset %d\n", sc->sc_c.sc_dev.dv_xname, target, lun, - sc->sc_c.targets[target]->lunsw->lunsw_off); + siop_target->lunsw->lunsw_off); #endif /* * nothing here, free the target struct and resel diff --git a/sys/dev/ic/siop_common.c b/sys/dev/ic/siop_common.c index 0bcda60c1f2..74ea16a13bc 100644 --- a/sys/dev/ic/siop_common.c +++ b/sys/dev/ic/siop_common.c @@ -1,4 +1,4 @@ -/* $NetBSD: siop_common.c,v 1.41 2006/11/16 01:32:52 christos Exp $ */ +/* $NetBSD: siop_common.c,v 1.42 2007/03/04 06:02:01 christos Exp $ */ /* * Copyright (c) 2000, 2002 Manuel Bouyer. @@ -33,7 +33,7 @@ /* SYM53c7/8xx PCI-SCSI I/O Processors driver */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: siop_common.c,v 1.41 2006/11/16 01:32:52 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: siop_common.c,v 1.42 2007/03/04 06:02:01 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -84,7 +84,7 @@ siop_common_attach(sc) return error; } error = bus_dmamem_map(sc->sc_dmat, &seg, rseg, PAGE_SIZE, - (caddr_t *)&sc->sc_script, + (void **)&sc->sc_script, BUS_DMA_NOWAIT|BUS_DMA_COHERENT); if (error) { aprint_error("%s: unable to map script DMA memory, " @@ -708,7 +708,7 @@ siop_minphys(bp) } int -siop_ioctl(struct scsipi_channel *chan, u_long cmd, caddr_t arg, +siop_ioctl(struct scsipi_channel *chan, u_long cmd, void *arg, int flag, struct proc *p) { struct siop_common_softc *sc = (void *)chan->chan_adapter->adapt_dev; diff --git a/sys/dev/ic/siopvar_common.h b/sys/dev/ic/siopvar_common.h index 9083e44330a..7e042053782 100644 --- a/sys/dev/ic/siopvar_common.h +++ b/sys/dev/ic/siopvar_common.h @@ -1,4 +1,4 @@ -/* $NetBSD: siopvar_common.h,v 1.33 2005/11/18 23:10:32 bouyer Exp $ */ +/* $NetBSD: siopvar_common.h,v 1.34 2007/03/04 06:02:01 christos Exp $ */ /* * Copyright (c) 2000 Manuel Bouyer. @@ -203,7 +203,7 @@ int siop_iwr(struct siop_common_cmd *); void siop_minphys(struct buf *); int siop_ioctl(struct scsipi_channel *, u_long, - caddr_t, int, struct proc *); + void *, int, struct proc *); void siop_ma (struct siop_common_cmd *); void siop_sdp(struct siop_common_cmd *, int); void siop_update_resid(struct siop_common_cmd *, int); diff --git a/sys/dev/ic/smc83c170.c b/sys/dev/ic/smc83c170.c index 76667856540..3dde283007a 100644 --- a/sys/dev/ic/smc83c170.c +++ b/sys/dev/ic/smc83c170.c @@ -1,4 +1,4 @@ -/* $NetBSD: smc83c170.c,v 1.63 2006/04/16 00:38:59 tsutsui Exp $ */ +/* $NetBSD: smc83c170.c,v 1.64 2007/03/04 06:02:01 christos Exp $ */ /*- * Copyright (c) 1998, 1999 The NetBSD Foundation, Inc. @@ -43,7 +43,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: smc83c170.c,v 1.63 2006/04/16 00:38:59 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: smc83c170.c,v 1.64 2007/03/04 06:02:01 christos Exp $"); #include "bpfilter.h" @@ -80,7 +80,7 @@ __KERNEL_RCSID(0, "$NetBSD: smc83c170.c,v 1.63 2006/04/16 00:38:59 tsutsui Exp $ void epic_start(struct ifnet *); void epic_watchdog(struct ifnet *); -int epic_ioctl(struct ifnet *, u_long, caddr_t); +int epic_ioctl(struct ifnet *, u_long, void *); int epic_init(struct ifnet *); void epic_stop(struct ifnet *, int); @@ -142,7 +142,7 @@ epic_attach(sc) if ((error = bus_dmamem_map(sc->sc_dmat, &seg, rseg, sizeof(struct epic_control_data) + ETHER_PAD_LEN, - (caddr_t *)&sc->sc_control_data, + (void **)&sc->sc_control_data, BUS_DMA_NOWAIT|BUS_DMA_COHERENT)) != 0) { aprint_error("%s: unable to map control data, error = %d\n", sc->sc_dev.dv_xname, error); @@ -335,7 +335,7 @@ epic_attach(sc) fail_3: bus_dmamap_destroy(sc->sc_dmat, sc->sc_cddmamap); fail_2: - bus_dmamem_unmap(sc->sc_dmat, (caddr_t)sc->sc_control_data, + bus_dmamem_unmap(sc->sc_dmat, (void *)sc->sc_control_data, sizeof(struct epic_control_data)); fail_1: bus_dmamem_free(sc->sc_dmat, &seg, rseg); @@ -430,7 +430,7 @@ epic_start(ifp) break; } } - m_copydata(m0, 0, m0->m_pkthdr.len, mtod(m, caddr_t)); + m_copydata(m0, 0, m0->m_pkthdr.len, mtod(m, void *)); m->m_pkthdr.len = m->m_len = m0->m_pkthdr.len; error = bus_dmamap_load_mbuf(sc->sc_dmat, dmamap, m, BUS_DMA_WRITE|BUS_DMA_NOWAIT); @@ -567,7 +567,7 @@ int epic_ioctl(ifp, cmd, data) struct ifnet *ifp; u_long cmd; - caddr_t data; + void *data; { struct epic_softc *sc = ifp->if_softc; struct ifreq *ifr = (struct ifreq *)data; @@ -709,8 +709,8 @@ epic_intr(arg) MGETHDR(m, M_DONTWAIT, MT_DATA); if (m == NULL) goto dropit; - memcpy(mtod(m, caddr_t), - mtod(ds->ds_mbuf, caddr_t), len); + memcpy(mtod(m, void *), + mtod(ds->ds_mbuf, void *), len); EPIC_INIT_RXDESC(sc, i); bus_dmamap_sync(sc->sc_dmat, ds->ds_dmamap, 0, ds->ds_dmamap->dm_mapsize, diff --git a/sys/dev/ic/smc90cx6.c b/sys/dev/ic/smc90cx6.c index ae699f0b565..9681bcbc85e 100644 --- a/sys/dev/ic/smc90cx6.c +++ b/sys/dev/ic/smc90cx6.c @@ -1,4 +1,4 @@ -/* $NetBSD: smc90cx6.c,v 1.46 2006/12/25 18:41:45 wiz Exp $ */ +/* $NetBSD: smc90cx6.c,v 1.47 2007/03/04 06:02:02 christos Exp $ */ /*- * Copyright (c) 1994, 1995, 1998 The NetBSD Foundation, Inc. @@ -42,7 +42,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: smc90cx6.c,v 1.46 2006/12/25 18:41:45 wiz Exp $"); +__KERNEL_RCSID(0, "$NetBSD: smc90cx6.c,v 1.47 2007/03/04 06:02:02 christos Exp $"); /* #define BAHSOFTCOPY */ #define BAHRETRANSMIT /**/ @@ -137,7 +137,7 @@ void bah_reset(struct bah_softc *); void bah_stop(struct bah_softc *); void bah_start(struct ifnet *); int bahintr(void *); -int bah_ioctl(struct ifnet *, unsigned long, caddr_t); +int bah_ioctl(struct ifnet *, unsigned long, void *); void bah_watchdog(struct ifnet *); void bah_srint(void *vsc); static void bah_tint(struct bah_softc *, int); @@ -458,7 +458,7 @@ bah_start(ifp) for (mp = m; mp; mp = mp->m_next) { if ((len = mp->m_len)) { /* YAMS */ bus_space_write_region_1(bst_m, mem, bah_ram_ptr, - mtod(mp, caddr_t), len); + mtod(mp, void *), len); bah_ram_ptr += len; } @@ -910,7 +910,7 @@ int bah_ioctl(ifp, command, data) struct ifnet *ifp; u_long command; - caddr_t data; + void *data; { struct bah_softc *sc; struct ifaddr *ifa; diff --git a/sys/dev/ic/smc91cxx.c b/sys/dev/ic/smc91cxx.c index 152409eea4b..f3afd2fee6e 100644 --- a/sys/dev/ic/smc91cxx.c +++ b/sys/dev/ic/smc91cxx.c @@ -1,4 +1,4 @@ -/* $NetBSD: smc91cxx.c,v 1.58 2006/11/16 01:32:52 christos Exp $ */ +/* $NetBSD: smc91cxx.c,v 1.59 2007/03/04 06:02:02 christos Exp $ */ /*- * Copyright (c) 1997 The NetBSD Foundation, Inc. @@ -78,7 +78,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: smc91cxx.c,v 1.58 2006/11/16 01:32:52 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: smc91cxx.c,v 1.59 2007/03/04 06:02:02 christos Exp $"); #include "opt_inet.h" #include "bpfilter.h" @@ -204,7 +204,7 @@ void smc91cxx_copy_tx_frame(struct smc91cxx_softc *, struct mbuf *); void smc91cxx_resume(struct smc91cxx_softc *); void smc91cxx_stop(struct smc91cxx_softc *); void smc91cxx_watchdog(struct ifnet *); -int smc91cxx_ioctl(struct ifnet *, u_long, caddr_t); +int smc91cxx_ioctl(struct ifnet *, u_long, void *); static inline int ether_cmp(void *, void *); static inline int @@ -1162,7 +1162,7 @@ smc91cxx_read(sc) * is aligned. */ if ((sc->sc_flags & SMC_FLAGS_32BIT_READ) == 0) { - m->m_data = (caddr_t) ALIGN(mtod(m, caddr_t) + + m->m_data = (char *) ALIGN(mtod(m, char *) + sizeof(struct ether_header)) - sizeof(struct ether_header); eh = mtod(m, struct ether_header *); @@ -1177,7 +1177,7 @@ smc91cxx_read(sc) } else { u_int8_t *dp; - m->m_data = (caddr_t) ALIGN(mtod(m, caddr_t)); + m->m_data = (void *) ALIGN(mtod(m, void *)); eh = mtod(m, struct ether_header *); dp = data = mtod(m, u_int8_t *); if (packetlen > 3) @@ -1244,7 +1244,7 @@ int smc91cxx_ioctl(ifp, cmd, data) struct ifnet *ifp; u_long cmd; - caddr_t data; + void *data; { struct smc91cxx_softc *sc = ifp->if_softc; struct ifaddr *ifa = (struct ifaddr *)data; diff --git a/sys/dev/ic/spic.c b/sys/dev/ic/spic.c index 8ca160af29f..b1698dfc398 100644 --- a/sys/dev/ic/spic.c +++ b/sys/dev/ic/spic.c @@ -1,4 +1,4 @@ -/* $NetBSD: spic.c,v 1.6 2006/11/16 01:32:52 christos Exp $ */ +/* $NetBSD: spic.c,v 1.7 2007/03/04 06:02:02 christos Exp $ */ /* * Copyright (c) 2002 The NetBSD Foundation, Inc. @@ -56,7 +56,7 @@ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: spic.c,v 1.6 2006/11/16 01:32:52 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: spic.c,v 1.7 2007/03/04 06:02:02 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -88,7 +88,7 @@ static int spicerror = 0; static int spic_enable(void *); static void spic_disable(void *); -static int spic_ioctl(void *, u_long, caddr_t, int, struct lwp *); +static int spic_ioctl(void *, u_long, void *, int, struct lwp *); static const struct wsmouse_accessops spic_accessops = { spic_enable, @@ -330,7 +330,7 @@ spic_disable(void *v) } static int -spic_ioctl(void *v, u_long cmd, caddr_t data, +spic_ioctl(void *v, u_long cmd, void *data, int flag, struct lwp *l) { switch (cmd) { diff --git a/sys/dev/ic/sti.c b/sys/dev/ic/sti.c index 1681b58d07b..35d2cbb2532 100644 --- a/sys/dev/ic/sti.c +++ b/sys/dev/ic/sti.c @@ -1,4 +1,4 @@ -/* $NetBSD: sti.c,v 1.6 2006/04/12 19:38:23 jmmv Exp $ */ +/* $NetBSD: sti.c,v 1.7 2007/03/04 06:02:02 christos Exp $ */ /* $OpenBSD: sti.c,v 1.35 2003/12/16 06:07:13 mickey Exp $ */ @@ -35,7 +35,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: sti.c,v 1.6 2006/04/12 19:38:23 jmmv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sti.c,v 1.7 2007/03/04 06:02:02 christos Exp $"); #include "wsdisplay.h" @@ -74,7 +74,7 @@ struct wsdisplay_emulops sti_emulops = { sti_alloc_attr }; -int sti_ioctl(void *, void *, u_long, caddr_t, int, struct lwp *); +int sti_ioctl(void *, void *, u_long, void *, int, struct lwp *); paddr_t sti_mmap(void *, void *, off_t, int); int sti_alloc_screen(void *, const struct wsscreen_descr *, void **, int *, int *, long *); @@ -582,7 +582,7 @@ sti_setcment(struct sti_softc *sc, u_int i, u_char r, u_char g, u_char b) } int -sti_ioctl(void *v, void *vs, u_long cmd, caddr_t data, int flag, struct lwp *l) +sti_ioctl(void *v, void *vs, u_long cmd, void *data, int flag, struct lwp *l) { struct sti_softc *sc = v; struct wsdisplay_fbinfo *wdf; diff --git a/sys/dev/ic/tropic.c b/sys/dev/ic/tropic.c index 495d2812d53..9c831bfbc26 100644 --- a/sys/dev/ic/tropic.c +++ b/sys/dev/ic/tropic.c @@ -1,4 +1,4 @@ -/* $NetBSD: tropic.c,v 1.29 2006/11/16 01:32:52 christos Exp $ */ +/* $NetBSD: tropic.c,v 1.30 2007/03/04 06:02:02 christos Exp $ */ /* * Ported to NetBSD by Onno van der Linden @@ -34,7 +34,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: tropic.c,v 1.29 2006/11/16 01:32:52 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: tropic.c,v 1.30 2007/03/04 06:02:02 christos Exp $"); #include "opt_inet.h" #include "bpfilter.h" @@ -1508,7 +1508,7 @@ struct ifnet *ifp; * Make sure data after the MAC header is aligned. */ if (m == m0) { - caddr_t newdata = (caddr_t) + char *newdata = (char *) ALIGN(m->m_data + sizeof(struct token_header)) - sizeof(struct token_header); len -= newdata - m->m_data; @@ -1541,7 +1541,7 @@ int tr_ioctl(ifp, cmd, data) struct ifnet *ifp; u_long cmd; -caddr_t data; +void *data; { struct tr_softc *sc = ifp->if_softc; struct ifreq *ifr = (struct ifreq *) data; diff --git a/sys/dev/ic/tropicvar.h b/sys/dev/ic/tropicvar.h index 8cf322c53b7..151959f6177 100644 --- a/sys/dev/ic/tropicvar.h +++ b/sys/dev/ic/tropicvar.h @@ -1,4 +1,4 @@ -/* $NetBSD: tropicvar.h,v 1.11 2005/12/11 12:21:28 christos Exp $ */ +/* $NetBSD: tropicvar.h,v 1.12 2007/03/04 06:02:02 christos Exp $ */ /* * Mach Operating System @@ -90,7 +90,7 @@ struct tr_softc { int sc_dhb16maxsz; /* max. dbh size at 16MBIT ring speed */ int sc_maxmtu; /* max. MTU supported by adapter */ unsigned char sc_init_status; - caddr_t tr_sleepevent; /* tr event signalled on successful */ + void * tr_sleepevent; /* tr event signalled on successful */ /* open of adapter */ unsigned short exsap_station; /* station assigned by open sap cmd */ @@ -106,7 +106,7 @@ int tr_config(struct tr_softc *); int tr_attach(struct tr_softc *); int tr_intr(void *); void tr_init(void *); -int tr_ioctl(struct ifnet *, u_long, caddr_t); +int tr_ioctl(struct ifnet *, u_long, void *); void tr_stop(struct tr_softc *); int tr_reset(struct tr_softc *); void tr_sleep(struct tr_softc *); diff --git a/sys/dev/ic/tulip.c b/sys/dev/ic/tulip.c index 9e9aa6c03da..87e8b88bd17 100644 --- a/sys/dev/ic/tulip.c +++ b/sys/dev/ic/tulip.c @@ -1,4 +1,4 @@ -/* $NetBSD: tulip.c,v 1.148 2007/02/19 04:35:21 rumble Exp $ */ +/* $NetBSD: tulip.c,v 1.149 2007/03/04 06:02:02 christos Exp $ */ /*- * Copyright (c) 1998, 1999, 2000, 2002 The NetBSD Foundation, Inc. @@ -43,7 +43,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: tulip.c,v 1.148 2007/02/19 04:35:21 rumble Exp $"); +__KERNEL_RCSID(0, "$NetBSD: tulip.c,v 1.149 2007/03/04 06:02:02 christos Exp $"); #include "bpfilter.h" @@ -97,7 +97,7 @@ static const struct tulip_txthresh_tab tlp_dm9102_txthresh_tab[] = static void tlp_start(struct ifnet *); static void tlp_watchdog(struct ifnet *); -static int tlp_ioctl(struct ifnet *, u_long, caddr_t); +static int tlp_ioctl(struct ifnet *, u_long, void *); static int tlp_init(struct ifnet *); static void tlp_stop(struct ifnet *, int); @@ -413,7 +413,7 @@ tlp_attach(struct tulip_softc *sc, const u_int8_t *enaddr) } if ((error = bus_dmamem_map(sc->sc_dmat, &sc->sc_cdseg, sc->sc_cdnseg, - sizeof(struct tulip_control_data), (caddr_t *)&sc->sc_control_data, + sizeof(struct tulip_control_data), (void **)&sc->sc_control_data, BUS_DMA_COHERENT)) != 0) { printf("%s: unable to map control data, error = %d\n", sc->sc_dev.dv_xname, error); @@ -578,7 +578,7 @@ tlp_attach(struct tulip_softc *sc, const u_int8_t *enaddr) fail_3: bus_dmamap_destroy(sc->sc_dmat, sc->sc_cddmamap); fail_2: - bus_dmamem_unmap(sc->sc_dmat, (caddr_t)sc->sc_control_data, + bus_dmamem_unmap(sc->sc_dmat, (void *)sc->sc_control_data, sizeof(struct tulip_control_data)); fail_1: bus_dmamem_free(sc->sc_dmat, &sc->sc_cdseg, sc->sc_cdnseg); @@ -672,7 +672,7 @@ tlp_detach(struct tulip_softc *sc) } bus_dmamap_unload(sc->sc_dmat, sc->sc_cddmamap); bus_dmamap_destroy(sc->sc_dmat, sc->sc_cddmamap); - bus_dmamem_unmap(sc->sc_dmat, (caddr_t)sc->sc_control_data, + bus_dmamem_unmap(sc->sc_dmat, (void *)sc->sc_control_data, sizeof(struct tulip_control_data)); bus_dmamem_free(sc->sc_dmat, &sc->sc_cdseg, sc->sc_cdnseg); @@ -788,7 +788,7 @@ tlp_start(struct ifnet *ifp) break; } } - m_copydata(m0, 0, m0->m_pkthdr.len, mtod(m, caddr_t)); + m_copydata(m0, 0, m0->m_pkthdr.len, mtod(m, void *)); m->m_pkthdr.len = m->m_len = m0->m_pkthdr.len; error = bus_dmamap_load_mbuf(sc->sc_dmat, dmamap, m, BUS_DMA_WRITE|BUS_DMA_NOWAIT); @@ -1000,7 +1000,7 @@ tlp_watchdog(struct ifnet *ifp) * Handle control requests from the operator. */ static int -tlp_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) +tlp_ioctl(struct ifnet *ifp, u_long cmd, void *data) { struct tulip_softc *sc = ifp->if_softc; struct ifreq *ifr = (struct ifreq *)data; @@ -1376,7 +1376,7 @@ tlp_rxintr(struct tulip_softc *sc) * Note that we use clusters for incoming frames, so the * buffer is virtually contiguous. */ - memcpy(mtod(m, caddr_t), mtod(rxs->rxs_mbuf, caddr_t), len); + memcpy(mtod(m, void *), mtod(rxs->rxs_mbuf, void *), len); /* Allow the receive descriptor to continue using its mbuf. */ TULIP_INIT_RXDESC(sc, i); diff --git a/sys/dev/ic/uha.c b/sys/dev/ic/uha.c index 7c204eb94c1..8cc09373183 100644 --- a/sys/dev/ic/uha.c +++ b/sys/dev/ic/uha.c @@ -1,4 +1,4 @@ -/* $NetBSD: uha.c,v 1.38 2006/11/16 01:32:52 christos Exp $ */ +/* $NetBSD: uha.c,v 1.39 2007/03/04 06:02:02 christos Exp $ */ /*- * Copyright (c) 1997, 1998 The NetBSD Foundation, Inc. @@ -60,7 +60,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: uha.c,v 1.38 2006/11/16 01:32:52 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uha.c,v 1.39 2007/03/04 06:02:02 christos Exp $"); #undef UHADEBUG #ifdef DDB @@ -159,7 +159,7 @@ uha_attach(sc, upd) return; } if ((error = bus_dmamem_map(sc->sc_dmat, &seg, rseg, - MSCPSIZE, (caddr_t *)&sc->sc_mscps, + MSCPSIZE, (void **)&sc->sc_mscps, BUS_DMA_NOWAIT|BUS_DMA_COHERENT)) != 0) { printf("%s: unable to map mscps, error = %d\n", sc->sc_dev.dv_xname, error); diff --git a/sys/dev/ic/vga.c b/sys/dev/ic/vga.c index 379e4a3f892..983c3d24fb8 100644 --- a/sys/dev/ic/vga.c +++ b/sys/dev/ic/vga.c @@ -1,4 +1,4 @@ -/* $NetBSD: vga.c,v 1.91 2006/11/16 01:32:52 christos Exp $ */ +/* $NetBSD: vga.c,v 1.92 2007/03/04 06:02:03 christos Exp $ */ /* * Copyright (c) 1995, 1996 Carnegie-Mellon University. @@ -35,7 +35,7 @@ #include "opt_wsmsgattrs.h" #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: vga.c,v 1.91 2006/11/16 01:32:52 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: vga.c,v 1.92 2007/03/04 06:02:03 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -279,7 +279,7 @@ const struct wsscreen_list vga_screenlist = { _vga_scrlist_mono }; -static int vga_ioctl(void *, void *, u_long, caddr_t, int, struct lwp *); +static int vga_ioctl(void *, void *, u_long, void *, int, struct lwp *); static paddr_t vga_mmap(void *, void *, off_t, int); static int vga_alloc_screen(void *, const struct wsscreen_descr *, void **, int *, int *, long *); @@ -789,7 +789,7 @@ vga_set_video(struct vga_config *vc, int state) } int -vga_ioctl(void *v, void *vs, u_long cmd, caddr_t data, int flag, struct lwp *l) +vga_ioctl(void *v, void *vs, u_long cmd, void *data, int flag, struct lwp *l) { struct vga_config *vc = v; struct vgascreen *scr = vs; diff --git a/sys/dev/ic/vga_raster.c b/sys/dev/ic/vga_raster.c index f3faa9d629c..e024d0ee049 100644 --- a/sys/dev/ic/vga_raster.c +++ b/sys/dev/ic/vga_raster.c @@ -1,4 +1,4 @@ -/* $NetBSD: vga_raster.c,v 1.25 2006/11/16 01:32:52 christos Exp $ */ +/* $NetBSD: vga_raster.c,v 1.26 2007/03/04 06:02:03 christos Exp $ */ /* * Copyright (c) 2001, 2002 Bang Jun-Young @@ -56,7 +56,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: vga_raster.c,v 1.25 2006/11/16 01:32:52 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: vga_raster.c,v 1.26 2007/03/04 06:02:03 christos Exp $"); #include "opt_wsmsgattrs.h" /* for WSDISPLAY_CUSTOM_OUTPUT */ @@ -301,7 +301,7 @@ const struct wsscreen_list vga_screenlist = { _vga_scrlist_mono }; -static int vga_raster_ioctl(void *, void *, u_long, caddr_t, int, +static int vga_raster_ioctl(void *, void *, u_long, void *, int, struct lwp *); static paddr_t vga_raster_mmap(void *, void *, off_t, int); static int vga_raster_alloc_screen(void *, const struct wsscreen_descr *, @@ -599,7 +599,7 @@ vga_set_video(struct vga_config *vc, int state) } int -vga_raster_ioctl(void *v, void *vs, u_long cmd, caddr_t data, int flag, +vga_raster_ioctl(void *v, void *vs, u_long cmd, void *data, int flag, struct lwp *l) { struct vga_config *vc = v; diff --git a/sys/dev/ic/vgavar.h b/sys/dev/ic/vgavar.h index 21566ab78bd..83552d6e7a8 100644 --- a/sys/dev/ic/vgavar.h +++ b/sys/dev/ic/vgavar.h @@ -1,4 +1,4 @@ -/* $NetBSD: vgavar.h,v 1.25 2006/08/13 20:24:51 jmcneill Exp $ */ +/* $NetBSD: vgavar.h,v 1.26 2007/03/04 06:02:03 christos Exp $ */ /* * Copyright (c) 1995, 1996 Carnegie-Mellon University. @@ -42,7 +42,7 @@ struct vga_handle { #define vh_memh vh_ph.ph_memh struct vga_funcs { - int (*vf_ioctl)(void *, u_long, caddr_t, int, struct lwp *); + int (*vf_ioctl)(void *, u_long, void *, int, struct lwp *); paddr_t (*vf_mmap)(void *, off_t, int); }; diff --git a/sys/dev/ic/wd33c93var.h b/sys/dev/ic/wd33c93var.h index 5dec8d7160e..be0e887f92d 100644 --- a/sys/dev/ic/wd33c93var.h +++ b/sys/dev/ic/wd33c93var.h @@ -1,4 +1,4 @@ -/* $NetBSD: wd33c93var.h,v 1.4 2006/10/01 22:02:55 bjh21 Exp $ */ +/* $NetBSD: wd33c93var.h,v 1.5 2007/03/04 06:02:03 christos Exp $ */ /* * Copyright (c) 1990 The Regents of the University of California. @@ -135,7 +135,7 @@ struct wd33c93_softc { /* Data about the current nexus (updated for every cmd switch) */ - caddr_t sc_daddr; /* Current data pointer */ + void * sc_daddr; /* Current data pointer */ size_t sc_dleft; /* Data left to transfer */ ssize_t sc_tcnt; /* number of bytes transfered */ @@ -174,7 +174,7 @@ struct wd33c93_softc { uint8_t sc_maxoffset; /* Maximum sync ofset (bytes) */ uint8_t sc_syncperiods[7]; /* Sync transfer periods (4ns units) */ - int (*sc_dmasetup) (struct wd33c93_softc *, caddr_t *, + int (*sc_dmasetup) (struct wd33c93_softc *, void **, size_t *, int, size_t *); int (*sc_dmago) (struct wd33c93_softc *); void (*sc_dmastop) (struct wd33c93_softc *); diff --git a/sys/dev/ic/we.c b/sys/dev/ic/we.c index eab742bf7bc..13fbb346de7 100644 --- a/sys/dev/ic/we.c +++ b/sys/dev/ic/we.c @@ -1,4 +1,4 @@ -/* $NetBSD: we.c,v 1.11 2006/03/29 04:16:49 thorpej Exp $ */ +/* $NetBSD: we.c,v 1.12 2007/03/04 06:02:03 christos Exp $ */ /*- * Copyright (c) 1997, 1998 The NetBSD Foundation, Inc. @@ -56,7 +56,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: we.c,v 1.11 2006/03/29 04:16:49 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: we.c,v 1.12 2007/03/04 06:02:03 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -100,7 +100,7 @@ static void we_mediastatus(struct dp8390_softc *, struct ifmediareq *); static void we_recv_int(struct dp8390_softc *); static void we_init_card(struct dp8390_softc *); static int we_write_mbuf(struct dp8390_softc *, struct mbuf *, int); -static int we_ring_copy(struct dp8390_softc *, int, caddr_t, u_short); +static int we_ring_copy(struct dp8390_softc *, int, void *, u_short); static void we_read_hdr(struct dp8390_softc *, int, struct dp8390_ring *); static int we_test_mem(struct dp8390_softc *); @@ -456,12 +456,13 @@ we_write_mbuf(sc, m, buf) } static int -we_ring_copy(sc, src, dst, amount) +we_ring_copy(sc, src, dstv, amount) struct dp8390_softc *sc; int src; - caddr_t dst; + void *dstv; u_short amount; { + char *dst = dstv; struct we_softc *wsc = (struct we_softc *)sc; u_short tmp_amount; diff --git a/sys/dev/ic/wi.c b/sys/dev/ic/wi.c index ebb257bb452..91f6fc6bd82 100644 --- a/sys/dev/ic/wi.c +++ b/sys/dev/ic/wi.c @@ -1,4 +1,4 @@ -/* $NetBSD: wi.c,v 1.218 2007/01/04 18:44:45 elad Exp $ */ +/* $NetBSD: wi.c,v 1.219 2007/03/04 06:02:03 christos Exp $ */ /*- * Copyright (c) 2004 The NetBSD Foundation, Inc. @@ -106,7 +106,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: wi.c,v 1.218 2007/01/04 18:44:45 elad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: wi.c,v 1.219 2007/03/04 06:02:03 christos Exp $"); #define WI_HERMES_AUTOINC_WAR /* Work around data write autoinc bug. */ #define WI_HERMES_STATS_WAR /* Work around stats counter bug. */ @@ -157,7 +157,7 @@ STATIC void wi_stop(struct ifnet *, int); STATIC void wi_start(struct ifnet *); STATIC int wi_reset(struct wi_softc *); STATIC void wi_watchdog(struct ifnet *); -STATIC int wi_ioctl(struct ifnet *, u_long, caddr_t); +STATIC int wi_ioctl(struct ifnet *, u_long, void *); STATIC int wi_media_change(struct ifnet *); STATIC void wi_media_status(struct ifnet *, struct ifmediareq *); @@ -189,8 +189,8 @@ STATIC void wi_key_update_begin(struct ieee80211com *); STATIC void wi_key_update_end(struct ieee80211com *); STATIC void wi_push_packet(struct wi_softc *); -STATIC int wi_get_cfg(struct ifnet *, u_long, caddr_t); -STATIC int wi_set_cfg(struct ifnet *, u_long, caddr_t); +STATIC int wi_get_cfg(struct ifnet *, u_long, void *); +STATIC int wi_set_cfg(struct ifnet *, u_long, void *); STATIC int wi_cfg_txrate(struct wi_softc *); STATIC int wi_write_txrate(struct wi_softc *, int); STATIC int wi_write_wep(struct wi_softc *); @@ -1156,7 +1156,7 @@ wi_start(struct ifnet *ifp) if (!IF_IS_EMPTY(&ic->ic_mgtq)) { IF_DEQUEUE(&ic->ic_mgtq, m0); m_copydata(m0, 4, ETHER_ADDR_LEN * 2, - (caddr_t)&frmhdr.wi_ehdr); + (void *)&frmhdr.wi_ehdr); frmhdr.wi_ehdr.ether_type = 0; wh = mtod(m0, struct ieee80211_frame *); ni = (struct ieee80211_node *)m0->m_pkthdr.rcvif; @@ -1168,7 +1168,7 @@ wi_start(struct ifnet *ifp) IFQ_DEQUEUE(&ifp->if_snd, m0); ifp->if_opackets++; m_copydata(m0, 0, ETHER_HDR_LEN, - (caddr_t)&frmhdr.wi_ehdr); + (void *)&frmhdr.wi_ehdr); #if NBPFILTER > 0 if (ifp->if_bpf) bpf_mtap(ifp->if_bpf, m0); @@ -1246,7 +1246,7 @@ wi_start(struct ifnet *ifp) (void)wi_write_txrate(sc, rs->rs_rates[rateidx]); m_copydata(m0, 0, sizeof(struct ieee80211_frame), - (caddr_t)&frmhdr.wi_whdr); + (void *)&frmhdr.wi_whdr); m_adj(m0, sizeof(struct ieee80211_frame)); frmhdr.wi_dat_len = htole16(m0->m_pkthdr.len); if (IFF_DUMPPKTS(ifp)) @@ -1354,7 +1354,7 @@ wi_watchdog(struct ifnet *ifp) } STATIC int -wi_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) +wi_ioctl(struct ifnet *ifp, u_long cmd, void *data) { struct wi_softc *sc = ifp->if_softc; struct ieee80211com *ic = &sc->sc_ic; @@ -2140,7 +2140,7 @@ wi_write_ssid(struct wi_softc *sc, int rid, u_int8_t *buf, int buflen) } STATIC int -wi_get_cfg(struct ifnet *ifp, u_long cmd, caddr_t data) +wi_get_cfg(struct ifnet *ifp, u_long cmd, void *data) { struct wi_softc *sc = ifp->if_softc; struct ieee80211com *ic = &sc->sc_ic; @@ -2241,7 +2241,7 @@ wi_get_cfg(struct ifnet *ifp, u_long cmd, caddr_t data) n = (len - sizeof(n)) / sizeof(struct wi_apinfo); len = sizeof(n) + sizeof(struct wi_apinfo) * n; memcpy(wreq.wi_val, &n, sizeof(n)); - memcpy((caddr_t)wreq.wi_val + sizeof(n), sc->sc_aps, + memcpy((char *)wreq.wi_val + sizeof(n), sc->sc_aps, sizeof(struct wi_apinfo) * n); break; @@ -2290,7 +2290,7 @@ wi_get_cfg(struct ifnet *ifp, u_long cmd, caddr_t data) } STATIC int -wi_set_cfg(struct ifnet *ifp, u_long cmd, caddr_t data) +wi_set_cfg(struct ifnet *ifp, u_long cmd, void *data) { struct wi_softc *sc = ifp->if_softc; struct ieee80211com *ic = &sc->sc_ic; @@ -2950,8 +2950,8 @@ wi_mwrite_bap(struct wi_softc *sc, int id, int off, struct mbuf *m0, int totlen) len = min(m->m_len, totlen); if (((u_long)m->m_data) % 2 != 0 || len % 2 != 0) { - m_copydata(m, 0, totlen, (caddr_t)&sc->sc_txbuf); - return wi_write_bap(sc, id, off, (caddr_t)&sc->sc_txbuf, + m_copydata(m, 0, totlen, (void *)&sc->sc_txbuf); + return wi_write_bap(sc, id, off, (void *)&sc->sc_txbuf, totlen); } diff --git a/sys/dev/ic/wivar.h b/sys/dev/ic/wivar.h index 0795368efb2..d63ae1cdb39 100644 --- a/sys/dev/ic/wivar.h +++ b/sys/dev/ic/wivar.h @@ -1,4 +1,4 @@ -/* $NetBSD: wivar.h,v 1.58 2005/11/18 16:53:56 skrll Exp $ */ +/* $NetBSD: wivar.h,v 1.59 2007/03/04 06:02:04 christos Exp $ */ /* * Copyright (c) 1997, 1998, 1999 @@ -102,7 +102,7 @@ struct wi_softc { bus_space_tag_t sc_iot; /* bus cookie */ bus_space_handle_t sc_ioh; /* bus i/o handle */ - caddr_t sc_drvbpf; + void * sc_drvbpf; int sc_flags; int sc_bap_id; int sc_bap_off; diff --git a/sys/dev/ic/z8530sc.c b/sys/dev/ic/z8530sc.c index fddb7d8b56f..4af04a60704 100644 --- a/sys/dev/ic/z8530sc.c +++ b/sys/dev/ic/z8530sc.c @@ -1,4 +1,4 @@ -/* $NetBSD: z8530sc.c,v 1.22 2005/12/11 12:21:29 christos Exp $ */ +/* $NetBSD: z8530sc.c,v 1.23 2007/03/04 06:02:04 christos Exp $ */ /* * Copyright (c) 1992, 1993 @@ -91,7 +91,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: z8530sc.c,v 1.22 2005/12/11 12:21:29 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: z8530sc.c,v 1.23 2007/03/04 06:02:04 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -188,11 +188,11 @@ zs_loadchannelregs(cs) else v = 0; - if (memcmp((caddr_t)cs->cs_preg, (caddr_t)cs->cs_creg, 16) == 0 && !v) + if (memcmp((void *)cs->cs_preg, (void *)cs->cs_creg, 16) == 0 && !v) return; /* only change if values are different */ /* Copy "pending" regs to "current" */ - memcpy((caddr_t)cs->cs_creg, (caddr_t)cs->cs_preg, 16); + memcpy((void *)cs->cs_creg, (void *)cs->cs_preg, 16); reg = cs->cs_creg; /* current regs */ /* disable interrupts */ diff --git a/sys/dev/ic/z8530tty.c b/sys/dev/ic/z8530tty.c index 30247d194d4..3966ddffb75 100644 --- a/sys/dev/ic/z8530tty.c +++ b/sys/dev/ic/z8530tty.c @@ -1,4 +1,4 @@ -/* $NetBSD: z8530tty.c,v 1.112 2006/10/01 20:31:50 elad Exp $ */ +/* $NetBSD: z8530tty.c,v 1.113 2007/03/04 06:02:04 christos Exp $ */ /*- * Copyright (c) 1993, 1994, 1995, 1996, 1997, 1998, 1999 @@ -137,7 +137,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: z8530tty.c,v 1.112 2006/10/01 20:31:50 elad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: z8530tty.c,v 1.113 2007/03/04 06:02:04 christos Exp $"); #include "opt_kgdb.h" #include "opt_ntp.h" @@ -793,7 +793,7 @@ int zsioctl(dev, cmd, data, flag, l) dev_t dev; u_long cmd; - caddr_t data; + void *data; int flag; struct lwp *l; { @@ -1072,7 +1072,7 @@ zsstart(tp) if (tp->t_outq.c_cc <= tp->t_lowat) { if (ISSET(tp->t_state, TS_ASLEEP)) { CLR(tp->t_state, TS_ASLEEP); - wakeup((caddr_t)&tp->t_outq); + wakeup((void *)&tp->t_outq); } selwakeup(&tp->t_wsel); if (tp->t_outq.c_cc == 0) diff --git a/sys/dev/ieee1394/firewire.c b/sys/dev/ieee1394/firewire.c index 64f0c0d53b9..fa249c40ef8 100644 --- a/sys/dev/ieee1394/firewire.c +++ b/sys/dev/ieee1394/firewire.c @@ -1,4 +1,4 @@ -/* $NetBSD: firewire.c,v 1.11 2006/11/16 01:32:59 christos Exp $ */ +/* $NetBSD: firewire.c,v 1.12 2007/03/04 06:02:05 christos Exp $ */ /*- * Copyright (c) 2003 Hidetoshi Shimokawa * Copyright (c) 1998-2002 Katsushi Kobayashi and Hidetoshi Shimokawa @@ -2004,7 +2004,7 @@ fw_rcv(struct fw_rcv_buf *rb) selwakeuppri(&xferq->rsel, FWPRI); if (xferq->flag & FWXFERQ_WAKEUP) { xferq->flag &= ~FWXFERQ_WAKEUP; - wakeup((caddr_t)xferq); + wakeup((void *)xferq); } if (xferq->flag & FWXFERQ_HANDLER) { xferq->hand(xferq); @@ -2122,7 +2122,7 @@ fw_vmaccess(struct fw_xfer *xfer){ xfer->send.len = 12; sfp = (struct fw_pkt *)xfer->send.buf; bcopy(rfp->mode.wreqb.payload, - (caddr_t)ntohl(rfp->mode.wreqb.dest_lo), ntohs(rfp->mode.wreqb.len)); + (void *)ntohl(rfp->mode.wreqb.dest_lo), ntohs(rfp->mode.wreqb.len)); sfp->mode.wres.tcode = FWTCODE_WRES; sfp->mode.wres.rtcode = 0; break; @@ -2137,7 +2137,7 @@ fw_vmaccess(struct fw_xfer *xfer){ xfer->send.buf = malloc(16 + rfp->mode.rreqb.len, M_FW, M_NOWAIT); xfer->send.len = 16 + ntohs(rfp->mode.rreqb.len); sfp = (struct fw_pkt *)xfer->send.buf; - bcopy((caddr_t)ntohl(rfp->mode.rreqb.dest_lo), + bcopy((void *)ntohl(rfp->mode.rreqb.dest_lo), sfp->mode.rresb.payload, (uint16_t)ntohs(rfp->mode.rreqb.len)); sfp->mode.rresb.tcode = FWTCODE_RRESB; sfp->mode.rresb.len = rfp->mode.rreqb.len; diff --git a/sys/dev/ieee1394/firewirereg.h b/sys/dev/ieee1394/firewirereg.h index 4370c33f5e7..07947d73567 100644 --- a/sys/dev/ieee1394/firewirereg.h +++ b/sys/dev/ieee1394/firewirereg.h @@ -1,4 +1,4 @@ -/* $NetBSD: firewirereg.h,v 1.3 2005/12/11 12:22:02 christos Exp $ */ +/* $NetBSD: firewirereg.h,v 1.4 2007/03/04 06:02:05 christos Exp $ */ /*- * Copyright (c) 2003 Hidetoshi Shimokawa * Copyright (c) 1998-2002 Katsushi Kobayashi and Hidetoshi Shimokawa @@ -158,7 +158,7 @@ struct firewire_comm{ uint32_t (*cyctimer) (struct firewire_comm *); void (*ibr) (struct firewire_comm *); uint32_t (*set_bmr) (struct firewire_comm *, uint32_t); - int (*ioctl) (DEV_T, u_long, caddr_t, int, fw_proc *); + int (*ioctl) (DEV_T, u_long, void *, int, fw_proc *); int (*irx_enable) (struct firewire_comm *, int); int (*irx_disable) (struct firewire_comm *, int); int (*itx_enable) (struct firewire_comm *, int); @@ -202,7 +202,7 @@ struct fw_xferq { STAILQ_HEAD(, fw_bulkxfer) stdma; struct fw_bulkxfer *stproc; struct selinfo rsel; - caddr_t sc; + void *sc; void (*hand) (struct fw_xferq *); }; @@ -210,8 +210,8 @@ struct fw_bulkxfer{ int poffset; struct mbuf *mbuf; STAILQ_ENTRY(fw_bulkxfer) link; - caddr_t start; - caddr_t end; + void *start; + void *end; int resp; }; @@ -225,7 +225,7 @@ struct fw_bind{ }; struct fw_xfer{ - caddr_t sc; + void *sc; struct firewire_comm *fc; struct fw_xferq *q; struct timeval tv; diff --git a/sys/dev/ieee1394/fw_port.h b/sys/dev/ieee1394/fw_port.h index eefde833c65..5f8fe393605 100644 --- a/sys/dev/ieee1394/fw_port.h +++ b/sys/dev/ieee1394/fw_port.h @@ -1,4 +1,4 @@ -/* $NetBSD: fw_port.h,v 1.20 2006/11/16 01:32:59 christos Exp $ */ +/* $NetBSD: fw_port.h,v 1.21 2007/03/04 06:02:05 christos Exp $ */ /* * Copyright (c) 2004 KIYOHARA Takashi * All rights reserved. @@ -158,7 +158,7 @@ typedef struct proc fw_proc; #define FW_IOCTL(dname) \ int \ __CONCAT(dname,_ioctl) \ - (DEV_T dev, u_long cmd, caddr_t data, int flag, fw_proc *td) + (DEV_T dev, u_long cmd, void *data, int flag, fw_proc *td) #define FW_IOCTL_START \ int unit = DEV2UNIT(dev); \ __attribute__((__unused__))struct firewire_softc *sc = \ @@ -671,7 +671,7 @@ struct fwbus_attach_args { #define FW_IOCTL(dname) \ int \ __CONCAT(dname,_ioctl) \ - (dev_t _dev, u_long cmd, caddr_t data, \ + (dev_t _dev, u_long cmd, void *data, \ int flag, fw_proc *td) #define FW_IOCTL_START \ int unit = DEV2UNIT(_dev); \ @@ -1232,7 +1232,7 @@ fw_bus_dmamem_alloc(fw_bus_dma_tag_t ft, void **vp, int f, bus_dmamap_t *mp) BUS_DMA_BUS1 | BUS_DMA_BUS2 | BUS_DMA_BUS3 | BUS_DMA_BUS4 | BUS_DMA_COHERENT | BUS_DMA_NOCACHE); err = bus_dmamem_map(ft->tag, - &segs, nsegs, ft->size, (caddr_t *)vp, mf); + &segs, nsegs, ft->size, (void **)vp, mf); if (err) { printf("fw_bus_dmamem_alloc: failed(2)\n"); bus_dmamem_free(ft->tag, &segs, nsegs); @@ -1248,7 +1248,7 @@ fw_bus_dmamem_alloc(fw_bus_dma_tag_t ft, void **vp, int f, bus_dmamap_t *mp) ft->size, nsegs, ft->maxsegsz, ft->boundary, cf, mp); if (err) { printf("fw_bus_dmamem_alloc: failed(3)\n"); - bus_dmamem_unmap(ft->tag, (caddr_t)*vp, ft->size); + bus_dmamem_unmap(ft->tag, (void *)*vp, ft->size); bus_dmamem_free(ft->tag, &segs, nsegs);\ } @@ -1284,6 +1284,6 @@ fw_bus_dmamem_alloc(fw_bus_dma_tag_t ft, void **vp, int f, bus_dmamap_t *mp) #endif #endif #if defined(__NetBSD__) -#define vm_offset_t caddr_t +#define vm_offset_t void * #endif #endif diff --git a/sys/dev/ieee1394/fwcrom.c b/sys/dev/ieee1394/fwcrom.c index f5ca8d3769d..866b0666f18 100644 --- a/sys/dev/ieee1394/fwcrom.c +++ b/sys/dev/ieee1394/fwcrom.c @@ -1,4 +1,4 @@ -/* $NetBSD: fwcrom.c,v 1.3 2006/05/10 06:24:03 skrll Exp $ */ +/* $NetBSD: fwcrom.c,v 1.4 2007/03/04 06:02:05 christos Exp $ */ /*- * Copyright (c) 2002-2003 * Hidetoshi Shimokawa. All rights reserved. @@ -80,7 +80,7 @@ __FBSDID("$FreeBSD: src/sys/dev/firewire/fwcrom.c,v 1.12 2004/08/29 13:45:55 sim #endif #define MAX_ROM (1024 - sizeof(uint32_t) * 5) -#define CROM_END(cc) ((vm_offset_t)(cc)->stack[0].dir + MAX_ROM - 1) +#define CROM_END(cc) ((char *)(cc)->stack[0].dir + MAX_ROM - 1) void crom_init_context(struct crom_context *cc, uint32_t *p) @@ -140,7 +140,7 @@ again: ptr->index ++; check: if (ptr->index < ptr->dir->crc_len && - (vm_offset_t)crom_get(cc) <= CROM_END(cc)) + (char *)crom_get(cc) <= CROM_END(cc)) return; if (ptr->index < ptr->dir->crc_len) @@ -210,13 +210,13 @@ crom_parse_text(struct crom_context *cc, char *buf, int len) reg = crom_get(cc); if (reg->key != CROM_TEXTLEAF || - (vm_offset_t)(reg + reg->val) > CROM_END(cc)) { + (char *)(reg + reg->val) > CROM_END(cc)) { strncpy(buf, nullstr, len); return; } textleaf = (struct csrtext *)(reg + reg->val); - if ((vm_offset_t)textleaf + textleaf->crc_len > CROM_END(cc)) { + if ((char *)textleaf + textleaf->crc_len > CROM_END(cc)) { strncpy(buf, nullstr, len); return; } diff --git a/sys/dev/ieee1394/fwdev.c b/sys/dev/ieee1394/fwdev.c index 7f62681f9a5..79e146ddfdb 100644 --- a/sys/dev/ieee1394/fwdev.c +++ b/sys/dev/ieee1394/fwdev.c @@ -1,4 +1,4 @@ -/* $NetBSD: fwdev.c,v 1.8 2006/11/16 16:10:43 jdolecek Exp $ */ +/* $NetBSD: fwdev.c,v 1.9 2007/03/04 06:02:05 christos Exp $ */ /*- * Copyright (c) 2003 Hidetoshi Shimokawa * Copyright (c) 1998-2002 Katsushi Kobayashi and Hidetoshi Shimokawa @@ -422,7 +422,7 @@ readloop: err = EIO; return err; } - err = uiomove((caddr_t)fp, + err = uiomove((void *)fp, fp->mode.stream.len + sizeof(uint32_t), uio); ir->queued ++; if(ir->queued >= ir->bnpacket){ @@ -449,10 +449,10 @@ fw_write_async(struct fw_drv1 *d, struct uio *uio, int ioflag) int err; bzero(&pkt, sizeof(struct fw_pkt)); - if ((err = uiomove((caddr_t)&pkt, sizeof(uint32_t), uio))) + if ((err = uiomove((void *)&pkt, sizeof(uint32_t), uio))) return (err); tinfo = &d->fc->tcode[pkt.mode.hdr.tcode]; - if ((err = uiomove((caddr_t)&pkt + sizeof(uint32_t), + if ((err = uiomove((char *)&pkt + sizeof(uint32_t), tinfo->hdr_len - sizeof(uint32_t), uio))) return (err); @@ -463,7 +463,7 @@ fw_write_async(struct fw_drv1 *d, struct uio *uio, int ioflag) bcopy(&pkt, &xfer->send.hdr, sizeof(struct fw_pkt)); xfer->send.pay_len = uio->uio_resid; if (uio->uio_resid > 0) { - if ((err = uiomove((caddr_t)&xfer->send.payload[0], + if ((err = uiomove((void *)&xfer->send.payload[0], uio->uio_resid, uio))) goto out; } @@ -538,8 +538,8 @@ isoloop: } fp = (struct fw_pkt *)fwdma_v_addr(it->buf, it->stproc->poffset + it->queued); - err = uiomove((caddr_t)fp, sizeof(struct fw_isohdr), uio); - err = uiomove((caddr_t)fp->mode.stream.payload, + err = uiomove((void *)fp, sizeof(struct fw_isohdr), uio); + err = uiomove((void *)fp->mode.stream.payload, fp->mode.stream.len, uio); it->queued ++; if (it->queued >= it->bnpacket) { diff --git a/sys/dev/ieee1394/fwdma.h b/sys/dev/ieee1394/fwdma.h index 4ed162ce99f..e349db4b420 100644 --- a/sys/dev/ieee1394/fwdma.h +++ b/sys/dev/ieee1394/fwdma.h @@ -1,4 +1,4 @@ -/* $NetBSD: fwdma.h,v 1.4 2006/02/16 20:17:19 perry Exp $ */ +/* $NetBSD: fwdma.h,v 1.5 2007/03/04 06:02:05 christos Exp $ */ /*- * Copyright (C) 2003 * Hidetoshi Shimokawa. All rights reserved. @@ -62,7 +62,7 @@ fwdma_v_addr(struct fwdma_alloc_multi *am, int index) bus_size_t ssize = am->ssize; int offset = am->esize * index; - return ((caddr_t)am->seg[offset / ssize].v_addr + (offset % ssize)); + return ((char *)am->seg[offset / ssize].v_addr + (offset % ssize)); } static __inline bus_addr_t diff --git a/sys/dev/ieee1394/fwmem.c b/sys/dev/ieee1394/fwmem.c index 1fe395342fa..c6b4f40ff5f 100644 --- a/sys/dev/ieee1394/fwmem.c +++ b/sys/dev/ieee1394/fwmem.c @@ -1,4 +1,4 @@ -/* $NetBSD: fwmem.c,v 1.2 2005/12/11 12:22:02 christos Exp $ */ +/* $NetBSD: fwmem.c,v 1.3 2007/03/04 06:02:05 christos Exp $ */ /*- * Copyright (c) 2002-2003 * Hidetoshi Shimokawa. All rights reserved. @@ -216,7 +216,7 @@ struct fwmem_softc { static struct fw_xfer * fwmem_xfer_req( struct fw_device *fwdev, - caddr_t sc, + void *sc, int spd, int slen, int rlen, @@ -245,7 +245,7 @@ fwmem_xfer_req( struct fw_xfer * fwmem_read_quad( struct fw_device *fwdev, - caddr_t sc, + void * sc, uint8_t spd, uint16_t dst_hi, uint32_t dst_lo, @@ -282,7 +282,7 @@ fwmem_read_quad( struct fw_xfer * fwmem_write_quad( struct fw_device *fwdev, - caddr_t sc, + void * sc, uint8_t spd, uint16_t dst_hi, uint32_t dst_lo, @@ -318,7 +318,7 @@ fwmem_write_quad( struct fw_xfer * fwmem_read_block( struct fw_device *fwdev, - caddr_t sc, + void * sc, uint8_t spd, uint16_t dst_hi, uint32_t dst_lo, @@ -356,7 +356,7 @@ fwmem_read_block( struct fw_xfer * fwmem_write_block( struct fw_device *fwdev, - caddr_t sc, + void * sc, uint8_t spd, uint16_t dst_hi, uint32_t dst_lo, diff --git a/sys/dev/ieee1394/fwmem.h b/sys/dev/ieee1394/fwmem.h index 125a16dfb3f..1bb0094e19a 100644 --- a/sys/dev/ieee1394/fwmem.h +++ b/sys/dev/ieee1394/fwmem.h @@ -1,4 +1,4 @@ -/* $NetBSD: fwmem.h,v 1.2 2005/12/11 12:22:02 christos Exp $ */ +/* $NetBSD: fwmem.h,v 1.3 2007/03/04 06:02:05 christos Exp $ */ /*- * Copyright (C) 2002-2003 * Hidetoshi Shimokawa. All rights reserved. @@ -35,13 +35,13 @@ * $FreeBSD: /repoman/r/ncvs/src/sys/dev/firewire/fwmem.h,v 1.8 2005/01/06 01:42:41 imp Exp $ */ -struct fw_xfer *fwmem_read_quad(struct fw_device *, caddr_t, uint8_t, +struct fw_xfer *fwmem_read_quad(struct fw_device *, void *, uint8_t, uint16_t, uint32_t, void *, void (*)(struct fw_xfer *)); -struct fw_xfer *fwmem_write_quad(struct fw_device *, caddr_t, uint8_t, +struct fw_xfer *fwmem_write_quad(struct fw_device *, void *, uint8_t, uint16_t, uint32_t, void *, void (*)(struct fw_xfer *)); -struct fw_xfer *fwmem_read_block(struct fw_device *, caddr_t, uint8_t, +struct fw_xfer *fwmem_read_block(struct fw_device *, void *, uint8_t, uint16_t, uint32_t, int, void *, void (*)(struct fw_xfer *)); -struct fw_xfer *fwmem_write_block(struct fw_device *, caddr_t, uint8_t, +struct fw_xfer *fwmem_write_block(struct fw_device *, void *, uint8_t, uint16_t, uint32_t, int, void *, void (*)(struct fw_xfer *)); #if defined(__FreeBSD__) diff --git a/sys/dev/ieee1394/fwohci.c b/sys/dev/ieee1394/fwohci.c index 1ab896dbc08..b77b75ac666 100644 --- a/sys/dev/ieee1394/fwohci.c +++ b/sys/dev/ieee1394/fwohci.c @@ -1,4 +1,4 @@ -/* $NetBSD: fwohci.c,v 1.105 2006/12/22 03:26:51 kiyohara Exp $ */ +/* $NetBSD: fwohci.c,v 1.106 2007/03/04 06:02:05 christos Exp $ */ /*- * Copyright (c) 2003 Hidetoshi Shimokawa @@ -58,7 +58,7 @@ #include <sys/ktr.h> #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: fwohci.c,v 1.105 2006/12/22 03:26:51 kiyohara Exp $"); +__KERNEL_RCSID(0, "$NetBSD: fwohci.c,v 1.106 2007/03/04 06:02:05 christos Exp $"); #if defined(__DragonFly__) || __FreeBSD_version < 500000 #include <machine/clock.h> /* for DELAY() */ @@ -1037,7 +1037,7 @@ again: if (m0 != NULL) { m_copydata(xfer->mbuf, 0, xfer->mbuf->m_pkthdr.len, - mtod(m0, caddr_t)); + mtod(m0, void *)); m0->m_len = m0->m_pkthdr.len = xfer->mbuf->m_pkthdr.len; m_freem(xfer->mbuf); @@ -1353,10 +1353,10 @@ fwohci_db_init(struct fwohci_softc *sc, struct fwohci_dbch *dbch) if (dbch->xferq.flag & FWXFERQ_EXTBUF) { if (idb % dbch->xferq.bnpacket == 0) dbch->xferq.bulkxfer[idb / dbch->xferq.bnpacket - ].start = (caddr_t)db_tr; + ].start = (void *)db_tr; if ((idb + 1) % dbch->xferq.bnpacket == 0) dbch->xferq.bulkxfer[idb / dbch->xferq.bnpacket - ].end = (caddr_t)db_tr; + ].end = (void *)db_tr; } db_tr++; } @@ -2661,7 +2661,7 @@ device_printf(sc->fc.dev, "DB %08x %08x %08x\n", bulkxfer, db_tr->bus_addr, fdb_ FWOHCI_DMA_SET(db[0].db.desc.depend, dbch->ndesc); FWOHCI_DMA_SET(db[dbch->ndesc - 1].db.desc.depend, dbch->ndesc); #endif - bulkxfer->end = (caddr_t)db_tr; + bulkxfer->end = (void *)db_tr; db_tr = STAILQ_NEXT(db_tr, link); } db = ((struct fwohcidb_tr *)bulkxfer->end)->db; @@ -2870,7 +2870,7 @@ fwohci_arcv(struct fwohci_softc *sc, struct fwohci_dbch *dbch, int count) u_int spd; int len, plen, hlen, pcnt, offset; int s; - caddr_t buf; + void *buf; int resCount; CTR0(KTR_DEV, "fwohci_arv"); @@ -2917,7 +2917,7 @@ fwohci_arcv(struct fwohci_softc *sc, struct fwohci_dbch *dbch, int count) offset = dbch->buf_offset; if (offset < 0) offset = - offset; - buf = dbch->pdb_tr->buf + offset; + buf = (char *)dbch->pdb_tr->buf + offset; rlen = dbch->xferq.psize - offset; if (firewire_debug) printf("rlen=%d, offset=%d\n", diff --git a/sys/dev/ieee1394/fwohcireg.h b/sys/dev/ieee1394/fwohcireg.h index 542c6592742..27de68ad8cb 100644 --- a/sys/dev/ieee1394/fwohcireg.h +++ b/sys/dev/ieee1394/fwohcireg.h @@ -1,4 +1,4 @@ -/* $NetBSD: fwohcireg.h,v 1.15 2005/12/11 12:22:02 christos Exp $ */ +/* $NetBSD: fwohcireg.h,v 1.16 2007/03/04 06:02:07 christos Exp $ */ /*- * Copyright (c) 2003 Hidetoshi Shimokawa @@ -339,7 +339,7 @@ struct fwohcidb_tr{ struct fw_xfer *xfer; struct fwohcidb *db; bus_dmamap_t dma_map; - caddr_t buf; + void *buf; bus_addr_t bus_addr; int dbcnt; }; diff --git a/sys/dev/ieee1394/if_fwip.c b/sys/dev/ieee1394/if_fwip.c index 927b2985619..fdd4540a75e 100644 --- a/sys/dev/ieee1394/if_fwip.c +++ b/sys/dev/ieee1394/if_fwip.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_fwip.c,v 1.6 2006/11/16 01:32:59 christos Exp $ */ +/* $NetBSD: if_fwip.c,v 1.7 2007/03/04 06:02:07 christos Exp $ */ /*- * Copyright (c) 2004 * Doug Rabson @@ -118,7 +118,7 @@ int fwipactivate (struct device *, enum devact); #endif /* network interface */ static void fwip_start (struct ifnet *); -static int fwip_ioctl (struct ifnet *, u_long, caddr_t); +static int fwip_ioctl (struct ifnet *, u_long, void *); IF_INIT(fwip); IF_STOP(fwip); @@ -434,7 +434,7 @@ found: xferq->flag &= ~0xff; xferq->flag |= broadcast_channel & 0xff; /* register fwip_input handler */ - xferq->sc = (caddr_t) fwip; + xferq->sc = (void *) fwip; xferq->hand = fwip_stream_input; xferq->bnchunk = rx_queue_len; xferq->bnpacket = 1; @@ -482,7 +482,7 @@ found: xfer->recv.pay_len = MCLBYTES; xfer->hand = fwip_unicast_input; xfer->fc = fc; - xfer->sc = (caddr_t)fwip; + xfer->sc = (void *)fwip; xfer->mbuf = m; STAILQ_INSERT_TAIL(&fwip->fwb.xferlist, xfer, link); } @@ -495,7 +495,7 @@ found: break; xfer->send.spd = tx_speed; xfer->fc = fwip->fd.fc; - xfer->sc = (caddr_t)fwip; + xfer->sc = (void *)fwip; xfer->hand = fwip_output_callback; STAILQ_INSERT_TAIL(&fwip->xferlist, xfer, link); } @@ -521,7 +521,7 @@ found: } static int -fwip_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) +fwip_ioctl(struct ifnet *ifp, u_long cmd, void *data) { IF_IOCTL_START(fwip, fwip); int s, error; diff --git a/sys/dev/ieee1394/sbp.c b/sys/dev/ieee1394/sbp.c index 74611e8f2ec..aea9f1bd6bb 100644 --- a/sys/dev/ieee1394/sbp.c +++ b/sys/dev/ieee1394/sbp.c @@ -1,4 +1,4 @@ -/* $NetBSD: sbp.c,v 1.14 2006/12/22 03:27:49 kiyohara Exp $ */ +/* $NetBSD: sbp.c,v 1.15 2007/03/04 06:02:07 christos Exp $ */ /*- * Copyright (c) 2003 Hidetoshi Shimokawa * Copyright (c) 1998-2002 Katsushi Kobayashi and Hidetoshi Shimokawa @@ -1531,7 +1531,7 @@ sbp_write_cmd(struct sbp_dev *sdev, int tcode, int offset) else xfer->send.pay_len = 0; - xfer->sc = (caddr_t)sdev; + xfer->sc = (void *)sdev; fp = &xfer->send.hdr; fp->mode.wreqq.dest_hi = sdev->login->cmd_hi; fp->mode.wreqq.dest_lo = sdev->login->cmd_lo + offset; @@ -1617,7 +1617,7 @@ start: splx(s); callout_reset(&target->mgm_ocb_timeout, 5*hz, - sbp_mgm_timeout, (caddr_t)ocb); + sbp_mgm_timeout, (void *)ocb); xfer = sbp_write_cmd(sdev, FWTCODE_WREQB, 0); if(xfer == NULL){ return; @@ -2901,7 +2901,7 @@ END_DEBUG #if defined(__DragonFly__) || defined(__NetBSD__) callout_stop(&SCSI_XFER_CALLOUT(ocb->sxfer)); #else - untimeout(sbp_timeout, (caddr_t)ocb, + untimeout(sbp_timeout, (void *)ocb, SCSI_XFER_CALLOUT(ocb->sxfer)); #endif if (ntohl(ocb->orb[4]) & 0xffff) { @@ -2976,7 +2976,7 @@ END_DEBUG mstohz(SCSI_XFER_TIMEOUT(ocb->sxfer)), sbp_timeout, ocb); #else SCSI_XFER_CALLOUT(ocb->sxfer) = timeout(sbp_timeout, - (caddr_t)ocb, mstohz(SCSI_XFER_TIMEOUT(ocb->sxfer))); + (void *)ocb, mstohz(SCSI_XFER_TIMEOUT(ocb->sxfer))); #endif if (use_doorbell && prev == NULL) @@ -3064,7 +3064,7 @@ END_DEBUG #if defined(__DragonFly__ ) || defined(__NetBSD__) callout_stop(&SCSI_XFER_CALLOUT(ocb->sxfer)); #else - untimeout(sbp_timeout, (caddr_t)ocb, + untimeout(sbp_timeout, (void *)ocb, SCSI_XFER_CALLOUT(ocb->sxfer)); #endif SCSI_XFER_ERROR(ocb->sxfer) = status; diff --git a/sys/dev/if_ndis/if_ndis.c b/sys/dev/if_ndis/if_ndis.c index 90796f860bc..51ff71ea13f 100644 --- a/sys/dev/if_ndis/if_ndis.c +++ b/sys/dev/if_ndis/if_ndis.c @@ -35,7 +35,7 @@ __FBSDID("$FreeBSD: src/sys/dev/if_ndis/if_ndis.c,v 1.69.2.6 2005/03/31 04:24:36 wpaul Exp $"); #endif #ifdef __NetBSD__ -__KERNEL_RCSID(0, "$NetBSD: if_ndis.c,v 1.12 2007/01/04 18:44:46 elad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_ndis.c,v 1.13 2007/03/04 06:02:09 christos Exp $"); #endif #ifdef __FreeBSD__ @@ -173,9 +173,9 @@ static void ndis_tick (void *); static void ndis_ticktask (void *); static void ndis_start (struct ifnet *); static void ndis_starttask (void *); -static int ndis_ioctl (struct ifnet *, u_long, caddr_t); -static int ndis_wi_ioctl_get (struct ifnet *, u_long, caddr_t); -static int ndis_wi_ioctl_set (struct ifnet *, u_long, caddr_t); +static int ndis_ioctl (struct ifnet *, u_long, void *); +static int ndis_wi_ioctl_get (struct ifnet *, u_long, void *); +static int ndis_wi_ioctl_set (struct ifnet *, u_long, void *); #ifdef __FreeBSD__ static void ndis_init (void *); #else /* __NetBSD__ */ @@ -1291,7 +1291,7 @@ ndis_rxeof(adapter, packets, pktcnt) #ifdef __FreeBSD__ ndis_return_packet(sc, p); #else /* __NetBSD__ */ - ndis_return_packet(NULL, (caddr_t)sc, 0, p); + ndis_return_packet(NULL, (void *)sc, 0, p); #endif } else { if (p->np_oob.npo_status == NDIS_STATUS_RESOURCES) { @@ -2545,7 +2545,7 @@ static int ndis_ioctl(ifp, command, data) struct ifnet *ifp; u_long command; - caddr_t data; + void * data; { struct ndis_softc *sc = ifp->if_softc; struct ifreq *ifr = (struct ifreq *) data; @@ -2680,7 +2680,7 @@ static int ndis_wi_ioctl_get(ifp, command, data) struct ifnet *ifp; u_long command; - caddr_t data; + void * data; { struct wi_req wreq; struct ifreq *ifr; @@ -2761,7 +2761,7 @@ static int ndis_wi_ioctl_set(ifp, command, data) struct ifnet *ifp; u_long command; - caddr_t data; + void * data; { struct wi_req wreq; struct ifreq *ifr; diff --git a/sys/dev/ir/cir.c b/sys/dev/ir/cir.c index 30677baf768..7c2f7daba2f 100644 --- a/sys/dev/ir/cir.c +++ b/sys/dev/ir/cir.c @@ -1,4 +1,4 @@ -/* $NetBSD: cir.c,v 1.16 2007/01/10 20:49:18 cube Exp $ */ +/* $NetBSD: cir.c,v 1.17 2007/03/04 06:02:09 christos Exp $ */ /* * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: cir.c,v 1.16 2007/01/10 20:49:18 cube Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cir.c,v 1.17 2007/03/04 06:02:09 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -205,7 +205,7 @@ cirwrite(dev_t dev, struct uio *uio, int flag) } int -cirioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct lwp *l) +cirioctl(dev_t dev, u_long cmd, void *addr, int flag, struct lwp *l) { struct cir_softc *sc; int error; diff --git a/sys/dev/ir/irframe.c b/sys/dev/ir/irframe.c index 18f1c810757..87076a16248 100644 --- a/sys/dev/ir/irframe.c +++ b/sys/dev/ir/irframe.c @@ -1,4 +1,4 @@ -/* $NetBSD: irframe.c,v 1.36 2006/11/16 01:33:00 christos Exp $ */ +/* $NetBSD: irframe.c,v 1.37 2007/03/04 06:02:09 christos Exp $ */ /* * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: irframe.c,v 1.36 2006/11/16 01:33:00 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: irframe.c,v 1.37 2007/03/04 06:02:09 christos Exp $"); #include "irframe.h" @@ -339,7 +339,7 @@ irf_reset_params(struct irframe_softc *sc) } int -irframeioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, +irframeioctl(dev_t dev, u_long cmd, void *addr, int flag, struct lwp *l) { struct irframe_softc *sc; diff --git a/sys/dev/ir/irframe_tty.c b/sys/dev/ir/irframe_tty.c index 05c47b3676c..34aec0363f1 100644 --- a/sys/dev/ir/irframe_tty.c +++ b/sys/dev/ir/irframe_tty.c @@ -1,4 +1,4 @@ -/* $NetBSD: irframe_tty.c,v 1.40 2006/11/16 01:33:00 christos Exp $ */ +/* $NetBSD: irframe_tty.c,v 1.41 2007/03/04 06:02:09 christos Exp $ */ /* * TODO @@ -48,7 +48,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: irframe_tty.c,v 1.40 2006/11/16 01:33:00 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: irframe_tty.c,v 1.41 2007/03/04 06:02:09 christos Exp $"); #include <sys/param.h> #include <sys/proc.h> @@ -127,7 +127,7 @@ struct irframet_softc { /* line discipline methods */ int irframetopen(dev_t, struct tty *); int irframetclose(struct tty *, int); -int irframetioctl(struct tty *, u_long, caddr_t, int, struct lwp *); +int irframetioctl(struct tty *, u_long, void *, int, struct lwp *); int irframetinput(int, struct tty *); int irframetstart(struct tty *); @@ -296,7 +296,7 @@ irframetclose(struct tty *tp, int flag) */ /* ARGSUSED */ int -irframetioctl(struct tty *tp, u_long cmd, caddr_t data, int flag, +irframetioctl(struct tty *tp, u_long cmd, void *data, int flag, struct lwp *l) { struct irframet_softc *sc = (struct irframet_softc *)tp->t_sc; @@ -878,7 +878,7 @@ irt_setline(struct tty *tp, u_int line) irt_ioctl(tp, TIOCMGET, &mline); mline &= ~(TIOCM_DTR | TIOCM_RTS); mline |= line; - irt_ioctl(tp, TIOCMSET, (caddr_t)&mline); + irt_ioctl(tp, TIOCMSET, (void *)&mline); } void diff --git a/sys/dev/isa/atppc_isa.c b/sys/dev/isa/atppc_isa.c index 6d4c9f74953..026ac54953c 100644 --- a/sys/dev/isa/atppc_isa.c +++ b/sys/dev/isa/atppc_isa.c @@ -1,4 +1,4 @@ -/* $NetBSD: atppc_isa.c,v 1.9 2006/03/29 04:16:49 thorpej Exp $ */ +/* $NetBSD: atppc_isa.c,v 1.10 2007/03/04 06:02:10 christos Exp $ */ /*- * Copyright (c) 2001 Alcove - Nicolas Souchu @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: atppc_isa.c,v 1.9 2006/03/29 04:16:49 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: atppc_isa.c,v 1.10 2007/03/04 06:02:10 christos Exp $"); #include "opt_atppc.h" @@ -83,9 +83,9 @@ static int atppc_isa_dma_start(struct atppc_softc *, void *, u_int, u_int8_t); static int atppc_isa_dma_finish(struct atppc_softc *); static int atppc_isa_dma_abort(struct atppc_softc *); -static int atppc_isa_dma_malloc(struct device *, caddr_t *, bus_addr_t *, +static int atppc_isa_dma_malloc(struct device *, void **, bus_addr_t *, bus_size_t); -static void atppc_isa_dma_free(struct device *, caddr_t *, bus_addr_t *, +static void atppc_isa_dma_free(struct device *, void **, bus_addr_t *, bus_size_t); CFATTACH_DECL(atppc_isa, sizeof(struct atppc_isa_softc), atppc_isa_probe, @@ -226,7 +226,7 @@ atppc_isa_dma_abort(struct atppc_softc *lsc) /* Allocate memory for DMA over ISA bus */ static int -atppc_isa_dma_malloc(struct device *dev, caddr_t *buf, bus_addr_t *bus_addr, +atppc_isa_dma_malloc(struct device *dev, void **buf, bus_addr_t *bus_addr, bus_size_t size) { struct atppc_isa_softc *sc = (struct atppc_isa_softc *)dev; @@ -236,7 +236,7 @@ atppc_isa_dma_malloc(struct device *dev, caddr_t *buf, bus_addr_t *bus_addr, /* Free memory allocated by atppc_isa_dma_malloc() */ static void -atppc_isa_dma_free(struct device *dev, caddr_t *buf, bus_addr_t *bus_addr, +atppc_isa_dma_free(struct device *dev, void **buf, bus_addr_t *bus_addr, bus_size_t size) { struct atppc_isa_softc *sc = (struct atppc_isa_softc *)dev; diff --git a/sys/dev/isa/atppc_isadma.c b/sys/dev/isa/atppc_isadma.c index 0a7006e3067..3c76d492fdb 100644 --- a/sys/dev/isa/atppc_isadma.c +++ b/sys/dev/isa/atppc_isadma.c @@ -1,4 +1,4 @@ -/* $NetBSD: atppc_isadma.c,v 1.3 2005/12/11 12:22:02 christos Exp $ */ +/* $NetBSD: atppc_isadma.c,v 1.4 2007/03/04 06:02:10 christos Exp $ */ /*- * Copyright (c) 2001 Alcove - Nicolas Souchu @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: atppc_isadma.c,v 1.3 2005/12/11 12:22:02 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: atppc_isadma.c,v 1.4 2007/03/04 06:02:10 christos Exp $"); #include "opt_atppc.h" @@ -77,7 +77,7 @@ atppc_isadma_setup(struct atppc_softc * lsc, isa_chipset_tag_t ic, int drq) /* Start DMA operation over ISA bus */ int -atppc_isadma_start(isa_chipset_tag_t ic, int drq, void * buf, u_int nbytes, +atppc_isadma_start(isa_chipset_tag_t ic, int drq, void *buf, u_int nbytes, u_int8_t mode) { return (isa_dmastart(ic, drq, buf, nbytes, NULL, @@ -104,7 +104,7 @@ atppc_isadma_abort(isa_chipset_tag_t ic, int drq) /* Allocate memory for DMA over ISA bus */ int -atppc_isadma_malloc(isa_chipset_tag_t ic, int drq, caddr_t *buf, bus_addr_t *bus_addr, bus_size_t size) +atppc_isadma_malloc(isa_chipset_tag_t ic, int drq, void **buf, bus_addr_t *bus_addr, bus_size_t size) { int error; @@ -121,7 +121,7 @@ atppc_isadma_malloc(isa_chipset_tag_t ic, int drq, caddr_t *buf, bus_addr_t *bus /* Free memory allocated by atppc_isadma_malloc() */ void -atppc_isadma_free(isa_chipset_tag_t ic, int drq, caddr_t * buf, bus_addr_t * bus_addr, bus_size_t size) +atppc_isadma_free(isa_chipset_tag_t ic, int drq, void ** buf, bus_addr_t * bus_addr, bus_size_t size) { isa_dmamem_unmap(ic, drq, *buf, size); isa_dmamem_free(ic, drq, *bus_addr, size); diff --git a/sys/dev/isa/atppc_isadma.h b/sys/dev/isa/atppc_isadma.h index 597095cea26..46e95608b6a 100644 --- a/sys/dev/isa/atppc_isadma.h +++ b/sys/dev/isa/atppc_isadma.h @@ -1,4 +1,4 @@ -/* $NetBSD: atppc_isadma.h,v 1.4 2005/12/11 12:22:02 christos Exp $ */ +/* $NetBSD: atppc_isadma.h,v 1.5 2007/03/04 06:02:10 christos Exp $ */ /*- * Copyright (c) 2003 Bruce J.A. Nourish @@ -34,7 +34,7 @@ int atppc_isadma_start(isa_chipset_tag_t, int, void *, u_int, u_int8_t); int atppc_isadma_finish(isa_chipset_tag_t, int); int atppc_isadma_abort(isa_chipset_tag_t, int); -int atppc_isadma_malloc(isa_chipset_tag_t, int, caddr_t *, bus_addr_t *, +int atppc_isadma_malloc(isa_chipset_tag_t, int, void **, bus_addr_t *, bus_size_t); -void atppc_isadma_free(isa_chipset_tag_t, int, caddr_t *, bus_addr_t *, +void atppc_isadma_free(isa_chipset_tag_t, int, void **, bus_addr_t *, bus_size_t); diff --git a/sys/dev/isa/cs89x0isa.c b/sys/dev/isa/cs89x0isa.c index 98227f0f845..eb0ec57832b 100644 --- a/sys/dev/isa/cs89x0isa.c +++ b/sys/dev/isa/cs89x0isa.c @@ -1,4 +1,4 @@ -/* $NetBSD: cs89x0isa.c,v 1.11 2005/12/11 12:22:02 christos Exp $ */ +/* $NetBSD: cs89x0isa.c,v 1.12 2007/03/04 06:02:10 christos Exp $ */ /* * Copyright 1997 @@ -36,7 +36,7 @@ /* isa DMA routines for cs89x0 */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: cs89x0isa.c,v 1.11 2005/12/11 12:22:02 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cs89x0isa.c,v 1.12 2007/03/04 06:02:10 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -108,7 +108,7 @@ cs_isa_dma_attach(struct cs_softc *sc) goto after_dma_block; } if (isa_dmamem_map(isc->sc_ic, isc->sc_drq, dma_addr, - CS8900_DMASIZE, &isc->sc_dmabase, + CS8900_DMASIZE, (void **)&isc->sc_dmabase, BUS_DMA_NOWAIT | BUS_DMA_COHERENT /* XXX */ ) != 0) { printf("%s: unable to map DMA buffer\n", sc->sc_dev.dv_xname); diff --git a/sys/dev/isa/cs89x0isavar.h b/sys/dev/isa/cs89x0isavar.h index 9602e12fbbb..51c937788b5 100644 --- a/sys/dev/isa/cs89x0isavar.h +++ b/sys/dev/isa/cs89x0isavar.h @@ -1,4 +1,4 @@ -/* $NetBSD: cs89x0isavar.h,v 1.4 2005/12/11 12:22:02 christos Exp $ */ +/* $NetBSD: cs89x0isavar.h,v 1.5 2007/03/04 06:02:10 christos Exp $ */ /*- * Copyright (c)2001 YAMAMOTO Takashi, @@ -38,6 +38,6 @@ struct cs_softc_isa { bus_size_t sc_dmasize; /* DMA size (16k or 64k) */ bus_addr_t sc_dmaaddr; /* DMA address */ - caddr_t sc_dmabase; /* base DMA address (KVA) */ - caddr_t sc_dmacur; /* current DMA address (KVA) */ + char *sc_dmabase; /* base DMA address (KVA) */ + char *sc_dmacur; /* current DMA address (KVA) */ }; diff --git a/sys/dev/isa/ega.c b/sys/dev/isa/ega.c index c8dd7892c2e..15fa024c11b 100644 --- a/sys/dev/isa/ega.c +++ b/sys/dev/isa/ega.c @@ -1,4 +1,4 @@ -/* $NetBSD: ega.c,v 1.20 2006/04/12 19:38:23 jmmv Exp $ */ +/* $NetBSD: ega.c,v 1.21 2007/03/04 06:02:10 christos Exp $ */ /* * Copyright (c) 1999 @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ega.c,v 1.20 2006/04/12 19:38:23 jmmv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ega.c,v 1.21 2007/03/04 06:02:10 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -210,7 +210,7 @@ const struct wsscreen_list ega_screenlist = { _ega_scrlist_mono }; -static int ega_ioctl(void *, void *, u_long, caddr_t, int, struct proc *); +static int ega_ioctl(void *, void *, u_long, void *, int, struct proc *); static paddr_t ega_mmap(void *, void *, off_t, int); static int ega_alloc_screen(void *, const struct wsscreen_descr *, void **, int *, int *, long *); @@ -589,7 +589,7 @@ ega_ioctl(v, vs, cmd, data, flag, p) void *v; void *vs; u_long cmd; - caddr_t data; + void *data; int flag; struct proc *p; { diff --git a/sys/dev/isa/esp_isa.c b/sys/dev/isa/esp_isa.c index 79badd1198f..92728f00114 100644 --- a/sys/dev/isa/esp_isa.c +++ b/sys/dev/isa/esp_isa.c @@ -1,4 +1,4 @@ -/* $NetBSD: esp_isa.c,v 1.31 2005/12/11 12:22:02 christos Exp $ */ +/* $NetBSD: esp_isa.c,v 1.32 2007/03/04 06:02:10 christos Exp $ */ /*- * Copyright (c) 1997, 1998 The NetBSD Foundation, Inc. @@ -113,7 +113,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: esp_isa.c,v 1.31 2005/12/11 12:22:02 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: esp_isa.c,v 1.32 2007/03/04 06:02:10 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -151,7 +151,7 @@ void esp_isa_write_reg(struct ncr53c9x_softc *, int, u_char); int esp_isa_dma_isintr(struct ncr53c9x_softc *); void esp_isa_dma_reset(struct ncr53c9x_softc *); int esp_isa_dma_intr(struct ncr53c9x_softc *); -int esp_isa_dma_setup(struct ncr53c9x_softc *, caddr_t *, +int esp_isa_dma_setup(struct ncr53c9x_softc *, void **, size_t *, int, size_t *); void esp_isa_dma_go(struct ncr53c9x_softc *); void esp_isa_dma_stop(struct ncr53c9x_softc *); @@ -567,7 +567,7 @@ esp_isa_dma_intr(sc) int esp_isa_dma_setup(sc, addr, len, datain, dmasize) struct ncr53c9x_softc *sc; - caddr_t *addr; + void **addr; size_t *len; int datain; size_t *dmasize; diff --git a/sys/dev/isa/fd.c b/sys/dev/isa/fd.c index 81321d9c4a9..54f7db478f5 100644 --- a/sys/dev/isa/fd.c +++ b/sys/dev/isa/fd.c @@ -1,4 +1,4 @@ -/* $NetBSD: fd.c,v 1.71 2007/02/15 18:33:26 reinoud Exp $ */ +/* $NetBSD: fd.c,v 1.72 2007/03/04 06:02:10 christos Exp $ */ /*- * Copyright (c) 1998, 2003 The NetBSD Foundation, Inc. @@ -88,7 +88,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: fd.c,v 1.71 2007/02/15 18:33:26 reinoud Exp $"); +__KERNEL_RCSID(0, "$NetBSD: fd.c,v 1.72 2007/03/04 06:02:10 christos Exp $"); #include "rnd.h" #include "opt_ddb.h" @@ -1065,7 +1065,7 @@ loop: #endif read = bp->b_flags & B_READ ? DMAMODE_READ : DMAMODE_WRITE; isa_dmastart(fdc->sc_ic, fdc->sc_drq, - bp->b_data + fd->sc_skip, fd->sc_nbytes, + (char *)bp->b_data + fd->sc_skip, fd->sc_nbytes, NULL, read | DMAMODE_DEMAND, BUS_DMA_NOWAIT); bus_space_write_1(iot, fdc->sc_fdctlioh, 0, type->rate); #ifdef FD_DEBUG @@ -1298,7 +1298,7 @@ int fdioctl(dev, cmd, addr, flag, l) dev_t dev; u_long cmd; - caddr_t addr; + void *addr; int flag; struct lwp *l; { @@ -1532,7 +1532,7 @@ fdformat(dev, finfo, l) + finfo->head * type->sectrac) * FDC_BSIZE / DEV_BSIZE; bp->b_bcount = sizeof(struct fd_idfield_data) * finfo->fd_formb_nsecs; - bp->b_data = (caddr_t)finfo; + bp->b_data = (void *)finfo; #ifdef DEBUG printf("fdformat: blkno %" PRIx64 " count %x\n", diff --git a/sys/dev/isa/gus.c b/sys/dev/isa/gus.c index cc162767813..09c6645f3d7 100644 --- a/sys/dev/isa/gus.c +++ b/sys/dev/isa/gus.c @@ -1,4 +1,4 @@ -/* $NetBSD: gus.c,v 1.96 2006/11/16 01:33:00 christos Exp $ */ +/* $NetBSD: gus.c,v 1.97 2007/03/04 06:02:11 christos Exp $ */ /*- * Copyright (c) 1996, 1999 The NetBSD Foundation, Inc. @@ -95,7 +95,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: gus.c,v 1.96 2006/11/16 01:33:00 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: gus.c,v 1.97 2007/03/04 06:02:11 christos Exp $"); #include "gus.h" #if NGUS > 0 @@ -345,7 +345,7 @@ int gusstats = 0; struct dma_record { struct timeval tv; u_long gusaddr; - caddr_t bsdaddr; + void *bsdaddr; u_short count; u_char channel; u_char direction; @@ -362,10 +362,10 @@ int gusopen(void *, int); void gusclose(void *); void gusmax_close(void *); int gusintr(void *); -int gus_set_in_gain(caddr_t, u_int, u_char); -int gus_get_in_gain(caddr_t); -int gus_set_out_gain(caddr_t, u_int, u_char); -int gus_get_out_gain(caddr_t); +int gus_set_in_gain(void *, u_int, u_char); +int gus_get_in_gain(void *); +int gus_set_out_gain(void *, u_int, u_char); +int gus_get_out_gain(void *); int gus_set_params(void *, int, int, audio_params_t *, audio_params_t *, stream_filter_list_t *, stream_filter_list_t *); int gusmax_set_params(void *, int, int, audio_params_t *, @@ -393,7 +393,7 @@ STATIC int gus_mic_ctl(void *, int); STATIC int gus_linein_ctl(void *, int); STATIC int gus_test_iobase(bus_space_tag_t, int); STATIC void guspoke(bus_space_tag_t, bus_space_handle_t, long, u_char); -STATIC void gusdmaout(struct gus_softc *, int, u_long, caddr_t, int); +STATIC void gusdmaout(struct gus_softc *, int, u_long, void *, int); STATIC int gus_init_cs4231(struct gus_softc *); STATIC void gus_init_ics2101(struct gus_softc *); @@ -1239,7 +1239,7 @@ stereo_dmaintr(void *arg) } #endif - gusdmaout(sc, sa->flags, sa->dmabuf, (caddr_t) sa->buffer, sa->size); + gusdmaout(sc, sa->flags, sa->dmabuf, (void *) sa->buffer, sa->size); sa->flags = 0; sa->dmabuf = 0; @@ -1331,7 +1331,7 @@ gus_dma_output(void *addr, void *tbuf, int size, } #endif - gusdmaout(sc, flags, boarddma, (caddr_t) buffer, size); + gusdmaout(sc, flags, boarddma, (void *) buffer, size); return 0; } @@ -2010,7 +2010,7 @@ gus_continue_playing(struct gus_softc *sc, int voice) */ STATIC void gusdmaout(struct gus_softc *sc, int flags, - u_long gusaddr, caddr_t buffaddr, int length) + u_long gusaddr, void *buffaddr, int length) { unsigned char c; bus_space_tag_t iot; @@ -2362,7 +2362,7 @@ gus_set_params( */ int -gusmax_round_blocksize(void * addr, int blocksize, +gusmax_round_blocksize(void *addr, int blocksize, int mode, const audio_params_t *param) { struct ad1848_isa_softc *ac; @@ -2375,7 +2375,7 @@ gusmax_round_blocksize(void * addr, int blocksize, } int -gus_round_blocksize(void * addr, int blocksize, +gus_round_blocksize(void *addr, int blocksize, int mode, const audio_params_t *param) { struct gus_softc *sc; @@ -2411,7 +2411,7 @@ gus_round_blocksize(void * addr, int blocksize, } int -gus_get_out_gain(caddr_t addr) +gus_get_out_gain(void *addr) { struct gus_softc *sc; @@ -2441,7 +2441,7 @@ gus_set_voices(struct gus_softc *sc, int voices) * Actually set the settings of various values on the card */ int -gusmax_commit_settings(void * addr) +gusmax_commit_settings(void *addr) { struct ad1848_isa_softc *ac; struct gus_softc *sc; @@ -3009,7 +3009,7 @@ gus_getdev(void *addr, struct audio_device *dev) */ int -gus_set_in_gain(caddr_t addr, u_int gain, +gus_set_in_gain(void *addr, u_int gain, u_char balance) { @@ -3018,7 +3018,7 @@ gus_set_in_gain(caddr_t addr, u_int gain, } int -gus_get_in_gain(caddr_t addr) +gus_get_in_gain(void *addr) { DPRINTF(("gus_get_in_gain called\n")); diff --git a/sys/dev/isa/if_ec.c b/sys/dev/isa/if_ec.c index c90508d1712..f8d868b7167 100644 --- a/sys/dev/isa/if_ec.c +++ b/sys/dev/isa/if_ec.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_ec.c,v 1.29 2006/11/16 01:33:00 christos Exp $ */ +/* $NetBSD: if_ec.c,v 1.30 2007/03/04 06:02:12 christos Exp $ */ /*- * Copyright (c) 1997, 1998 The NetBSD Foundation, Inc. @@ -55,7 +55,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_ec.c,v 1.29 2006/11/16 01:33:00 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_ec.c,v 1.30 2007/03/04 06:02:12 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -108,7 +108,7 @@ void ec_mediastatus(struct dp8390_softc *, struct ifmediareq *); void ec_init_card(struct dp8390_softc *); int ec_write_mbuf(struct dp8390_softc *, struct mbuf *, int); -int ec_ring_copy(struct dp8390_softc *, int, caddr_t, u_short); +int ec_ring_copy(struct dp8390_softc *, int, void *, u_short); void ec_read_hdr(struct dp8390_softc *, int, struct dp8390_ring *); int ec_fake_test_mem(struct dp8390_softc *); int ec_test_mem(struct dp8390_softc *); @@ -706,7 +706,7 @@ int ec_ring_copy(sc, src, dst, amount) struct dp8390_softc *sc; int src; - caddr_t dst; + void *dst; u_short amount; { struct ec_softc *esc = (struct ec_softc *)sc; @@ -721,7 +721,7 @@ ec_ring_copy(sc, src, dst, amount) amount -= tmp_amount; src = sc->mem_ring; - dst += tmp_amount; + dst = (char *)dst + tmp_amount; } ec_readmem(esc, src, dst, amount); diff --git a/sys/dev/isa/if_eg.c b/sys/dev/isa/if_eg.c index 370c3e07e06..99b0149fa4e 100644 --- a/sys/dev/isa/if_eg.c +++ b/sys/dev/isa/if_eg.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_eg.c,v 1.71 2006/11/16 01:33:00 christos Exp $ */ +/* $NetBSD: if_eg.c,v 1.72 2007/03/04 06:02:12 christos Exp $ */ /* * Copyright (c) 1993 Dean Huxley <dean@fsa.ca> @@ -40,7 +40,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_eg.c,v 1.71 2006/11/16 01:33:00 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_eg.c,v 1.72 2007/03/04 06:02:12 christos Exp $"); #include "opt_inet.h" #include "bpfilter.h" @@ -113,8 +113,8 @@ struct eg_softc { short eg_ram; /* Amount of RAM on the card */ u_int8_t eg_pcb[EG_PCBLEN]; /* Primary Command Block buffer */ u_int8_t eg_incount; /* Number of buffers currently used */ - caddr_t eg_inbuf; /* Incoming packet buffer */ - caddr_t eg_outbuf; /* Outgoing packet buffer */ + void * eg_inbuf; /* Incoming packet buffer */ + void * eg_outbuf; /* Outgoing packet buffer */ #if NRND > 0 rndsource_element_t rnd_source; @@ -129,13 +129,13 @@ CFATTACH_DECL(eg, sizeof(struct eg_softc), int egintr(void *); void eginit(struct eg_softc *); -int egioctl(struct ifnet *, u_long, caddr_t); +int egioctl(struct ifnet *, u_long, void *); void egrecv(struct eg_softc *); void egstart(struct ifnet *); void egwatchdog(struct ifnet *); void egreset(struct eg_softc *); -void egread(struct eg_softc *, caddr_t, int); -struct mbuf *egget(struct eg_softc *, caddr_t, int); +void egread(struct eg_softc *, void *, int); +struct mbuf *egget(struct eg_softc *, void *, int); void egstop(struct eg_softc *); static inline void egprintpcb(u_int8_t *); @@ -597,7 +597,7 @@ egstart(ifp) bus_space_tag_t iot = sc->sc_iot; bus_space_handle_t ioh = sc->sc_ioh; struct mbuf *m0, *m; - caddr_t buffer; + char *buffer; int len; u_int16_t *ptr; @@ -644,7 +644,7 @@ loop: buffer = sc->eg_outbuf; for (m = m0; m != 0; m = m->m_next) { - memcpy(buffer, mtod(m, caddr_t), m->m_len); + memcpy(buffer, mtod(m, void *), m->m_len); buffer += m->m_len; } if (len > m0->m_pkthdr.len) @@ -755,7 +755,7 @@ egintr(arg) void egread(sc, buf, len) struct eg_softc *sc; - caddr_t buf; + void *buf; int len; { struct ifnet *ifp = &sc->sc_ethercom.ec_if; @@ -796,7 +796,7 @@ egread(sc, buf, len) struct mbuf * egget(sc, buf, totlen) struct eg_softc *sc; - caddr_t buf; + void *buf; int totlen; { struct ifnet *ifp = &sc->sc_ethercom.ec_if; @@ -820,8 +820,8 @@ egget(sc, buf, totlen) } m->m_len = len = min(totlen, len); - memcpy(mtod(m, caddr_t), (caddr_t)buf, len); - buf += len; + memcpy(mtod(m, void *), buf, len); + buf = (char *)buf + len; totlen -= len; if (totlen > 0) { @@ -844,7 +844,7 @@ int egioctl(ifp, cmd, data) struct ifnet *ifp; u_long cmd; - caddr_t data; + void *data; { struct eg_softc *sc = ifp->if_softc; struct ifaddr *ifa = (struct ifaddr *)data; diff --git a/sys/dev/isa/if_el.c b/sys/dev/isa/if_el.c index 1d62668cdae..2e21b0ce9a5 100644 --- a/sys/dev/isa/if_el.c +++ b/sys/dev/isa/if_el.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_el.c,v 1.76 2006/11/16 01:33:00 christos Exp $ */ +/* $NetBSD: if_el.c,v 1.77 2007/03/04 06:02:12 christos Exp $ */ /* * Copyright (c) 1994, Matthew E. Kimmel. Permission is hereby granted @@ -19,7 +19,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_el.c,v 1.76 2006/11/16 01:33:00 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_el.c,v 1.77 2007/03/04 06:02:12 christos Exp $"); #include "opt_inet.h" #include "bpfilter.h" @@ -92,7 +92,7 @@ struct el_softc { */ int elintr(void *); void elinit(struct el_softc *); -int elioctl(struct ifnet *, u_long, caddr_t); +int elioctl(struct ifnet *, u_long, void *); void elstart(struct ifnet *); void elwatchdog(struct ifnet *); void elreset(struct el_softc *); @@ -685,7 +685,7 @@ int elioctl(ifp, cmd, data) struct ifnet *ifp; u_long cmd; - caddr_t data; + void *data; { struct el_softc *sc = ifp->if_softc; struct ifaddr *ifa = (struct ifaddr *)data; diff --git a/sys/dev/isa/if_hp.c b/sys/dev/isa/if_hp.c index 29df3bf86bf..530d86c1f0b 100644 --- a/sys/dev/isa/if_hp.c +++ b/sys/dev/isa/if_hp.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_hp.c,v 1.40 2006/09/07 02:40:32 dogcow Exp $ */ +/* $NetBSD: if_hp.c,v 1.41 2007/03/04 06:02:12 christos Exp $ */ /* XXX THIS DRIVER IS BROKEN. IT WILL NOT EVEN COMPILE. */ @@ -80,7 +80,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_hp.c,v 1.40 2006/09/07 02:40:32 dogcow Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_hp.c,v 1.41 2007/03/04 06:02:12 christos Exp $"); #include "hp.h" #if NHP > 0 @@ -162,7 +162,7 @@ struct hp_softc { short ns_mode; /* word/byte mode */ short ns_rcr; #if NBPFILTER > 0 - caddr_t ns_bpf; + void *ns_bpf; #endif u_int8_t ns_addrp[ETHER_ADDR_LEN]; /* hardware Ethernet address */ @@ -246,7 +246,7 @@ hpprobe(dvp) */ hpfetch(ns, up, ad, len) struct hp_softc *ns; - caddr_t up; + void *up; { u_char cmd; int hpc = ns->ns_port; @@ -287,10 +287,10 @@ hpfetch(ns, up, ad, len) #ifdef HP_32BIT if (ns->ns_mode & DSDC_WTS) - len = (caddr_t) insd(hpc + hp_data, up, len >> 2) - up; + len = (void *) insd(hpc + hp_data, up, len >> 2) - up; else #endif - len = (caddr_t) insw(hpc + hp_data, up, len >> 1) - up; + len = (void *) insw(hpc + hp_data, up, len >> 1) - up; #ifdef HP_DEBUG printf("hpfetch: done len=%d\n", len); @@ -308,7 +308,7 @@ hpfetch(ns, up, ad, len) */ hpput(ns, up, ad, len) struct hp_softc *ns; - caddr_t up; + void *up; { u_char cmd; int hpc = ns->ns_port; @@ -361,10 +361,10 @@ hpput(ns, up, ad, len) #ifdef HP_32BIT if (ns->ns_mode & DSDC_WTS) - len = (caddr_t) outsd(hpc + hp_data, up, len >> 2) - up; + len = (void *) outsd(hpc + hp_data, up, len >> 2) - up; else #endif - len = (caddr_t) outsw(hpc + hp_data, up, len >> 1) - up; + len = (void *) outsw(hpc + hp_data, up, len >> 1) - up; #ifdef HP_DEBUG printf("hpput: done len=%d\n", len); @@ -594,14 +594,14 @@ hpstart(ifp) for (m0 = m; m != 0;) { if (m->m_len & 1 && t > m->m_len) { m->m_len -= 1; - hpput(ns, mtod(m, caddr_t), buffer, m->m_len); + hpput(ns, mtod(m, void *), buffer, m->m_len); t -= m->m_len; buffer += m->m_len; m->m_data += m->m_len; m->m_len = 1; m = m_pullup(m, 2); } else { - hpput(ns, mtod(m, caddr_t), buffer, m->m_len); + hpput(ns, mtod(m, void *), buffer, m->m_len); t -= m->m_len; buffer += m->m_len; MFREE(m, m0); @@ -695,7 +695,7 @@ loop: #endif /* get length */ - hpfetch(ns, (caddr_t) & ns->ns_ph, addr, sizeof ns->ns_ph); + hpfetch(ns, (void *) & ns->ns_ph, addr, sizeof ns->ns_ph); addr += sizeof ns->ns_ph; #ifdef HP_DEBUG @@ -711,7 +711,7 @@ loop: /* Get packet header */ if (len > 14) len = 14; - hpfetch(ns, (caddr_t) (ns->ns_pb), addr, len); + hpfetch(ns, (void *) (ns->ns_pb), addr, len); /* move boundary up */ bnry = ns->ns_ph.pr_nxtpg; @@ -755,7 +755,7 @@ loop: while (1); } /* read packet */ - hpfetch(ns, (caddr_t) (ns->ns_pb), addr, len); + hpfetch(ns, (void *) (ns->ns_pb), addr, len); /* move boundary up */ bnry = ns->ns_ph.pr_nxtpg; @@ -774,7 +774,7 @@ loop: len -= sizeof(struct ether_header) + sizeof(long); /* process packet */ - hpread(ns, (caddr_t) (ns->ns_pb), len); + hpread(ns, (void *) (ns->ns_pb), len); } } /* Transmit error */ @@ -840,7 +840,7 @@ hpread(ns, buf, len) */ eh = (struct ether_header *) buf; etype = ntohs((u_short) eh->ether_type); -#define hpdataaddr(eh, off, type) ((type)(((caddr_t)((eh)+1)+(off)))) +#define hpdataaddr(eh, off, type) ((type)(((void *)((eh)+1)+(off)))) if (etype >= ETHERTYPE_TRAIL && etype < ETHERTYPE_TRAIL + ETHERTYPE_NTRAILER) { off = (etype - ETHERTYPE_TRAIL) * 512; @@ -896,13 +896,13 @@ hpread(ns, buf, len) */ struct mbuf * hpget(buf, totlen, off0, ifp) - caddr_t buf; + void *buf; int totlen, off0; struct ifnet *ifp; { struct mbuf *top, **mp, *m, *p; int off = off0, len; - caddr_t cp = buf; + void *cp = buf; char *epkt; buf += sizeof(struct ether_header); @@ -950,7 +950,7 @@ hpget(buf, totlen, off0, ifp) } else len = m->m_len; } - memcpy(mtod(m, caddr_t), cp, (unsigned) len); + memcpy(mtod(m, void *), cp, (unsigned) len); cp += len; *mp = m; mp = &m->m_next; @@ -966,7 +966,7 @@ hpget(buf, totlen, off0, ifp) hpioctl(ifp, cmd, data) struct ifnet *ifp; u_long cmd; - caddr_t data; + void *data; { struct ifaddr *ifa = (struct ifaddr *) data; struct hp_softc *ns = &hp_softc[ifp->if_unit]; @@ -1012,7 +1012,7 @@ hpioctl(ifp, cmd, data) #ifdef notdef case SIOCGHWADDR: - memcpy((caddr_t) & ifr->ifr_data, (caddr_t) ns->ns_addrp, + memcpy((void *) & ifr->ifr_data, (void *) ns->ns_addrp, sizeof(ns->ns_addrp)); break; #endif diff --git a/sys/dev/isa/if_iy.c b/sys/dev/isa/if_iy.c index 333a75f7ea4..80e1d523c58 100644 --- a/sys/dev/isa/if_iy.c +++ b/sys/dev/isa/if_iy.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_iy.c,v 1.74 2006/11/16 01:33:00 christos Exp $ */ +/* $NetBSD: if_iy.c,v 1.75 2007/03/04 06:02:12 christos Exp $ */ /* #define IYDEBUG */ /* #define IYMEMDEBUG */ @@ -46,7 +46,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_iy.c,v 1.74 2006/11/16 01:33:00 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_iy.c,v 1.75 2007/03/04 06:02:12 christos Exp $"); #include "opt_inet.h" #include "bpfilter.h" @@ -144,7 +144,7 @@ struct iy_softc { }; void iywatchdog(struct ifnet *); -int iyioctl(struct ifnet *, u_long, caddr_t); +int iyioctl(struct ifnet *, u_long, void *); int iyintr(void *); void iyinit(struct iy_softc *); void iystop(struct iy_softc *); @@ -644,7 +644,7 @@ struct ifnet *ifp; u_int len, pad, last, end; u_int llen, residual; int avail; - caddr_t data; + char *data; unsigned temp; u_int16_t resval, stat; bus_space_tag_t iot; @@ -761,7 +761,7 @@ struct ifnet *ifp; residual = resval = 0; while ((m = m0)!=0) { - data = mtod(m, caddr_t); + data = mtod(m, void *); llen = m->m_len; if (residual) { #ifdef IYDEBUG @@ -1063,7 +1063,7 @@ iyget(sc, iot, ioh, rxlen) #ifdef IYDEBUG printf("%s: received odd mbuf\n", sc->sc_dev.dv_xname); #endif - *(mtod(m, caddr_t)) = bus_space_read_stream_2(iot, ioh, + *(mtod(m, char *)) = bus_space_read_stream_2(iot, ioh, MEM_PORT_REG); } m->m_len = len; @@ -1196,7 +1196,7 @@ int iyioctl(ifp, cmd, data) struct ifnet *ifp; u_long cmd; - caddr_t data; + void *data; { struct iy_softc *sc; struct ifaddr *ifa; diff --git a/sys/dev/isa/if_le_isa.c b/sys/dev/isa/if_le_isa.c index 11581de0978..065001fa5ef 100644 --- a/sys/dev/isa/if_le_isa.c +++ b/sys/dev/isa/if_le_isa.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_le_isa.c,v 1.43 2006/11/16 01:33:00 christos Exp $ */ +/* $NetBSD: if_le_isa.c,v 1.44 2007/03/04 06:02:12 christos Exp $ */ /*- * Copyright (c) 1997, 1998 The NetBSD Foundation, Inc. @@ -72,7 +72,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_le_isa.c,v 1.43 2006/11/16 01:33:00 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_le_isa.c,v 1.44 2007/03/04 06:02:12 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -342,7 +342,7 @@ le_isa_attach(struct device *parent, struct le_softc *lesc, return; } if (bus_dmamem_map(dmat, &seg, rseg, LE_ISA_MEMSIZE, - (caddr_t *)&sc->sc_mem, + (void **)&sc->sc_mem, BUS_DMA_NOWAIT|BUS_DMA_COHERENT)) { printf("%s: couldn't map memory for card\n", sc->sc_dev.dv_xname); diff --git a/sys/dev/isa/isadma.c b/sys/dev/isa/isadma.c index f8b9a5d3336..f56af46e684 100644 --- a/sys/dev/isa/isadma.c +++ b/sys/dev/isa/isadma.c @@ -1,4 +1,4 @@ -/* $NetBSD: isadma.c,v 1.54 2005/12/11 12:22:02 christos Exp $ */ +/* $NetBSD: isadma.c,v 1.55 2007/03/04 06:02:12 christos Exp $ */ /*- * Copyright (c) 1997, 1998, 2000 The NetBSD Foundation, Inc. @@ -42,7 +42,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: isadma.c,v 1.54 2005/12/11 12:22:02 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: isadma.c,v 1.55 2007/03/04 06:02:12 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -681,7 +681,7 @@ _isa_dmamem_map(ids, chan, addr, size, kvap, flags) int chan; bus_addr_t addr; bus_size_t size; - caddr_t *kvap; + void **kvap; int flags; { bus_dma_segment_t seg; @@ -701,7 +701,7 @@ void _isa_dmamem_unmap(ids, chan, kva, size) struct isa_dma_state *ids; int chan; - caddr_t kva; + void *kva; size_t size; { @@ -761,7 +761,7 @@ _isa_malloc(ids, chan, size, pool, flags) int flags; { bus_addr_t addr; - caddr_t kva; + void *kva; int bflags; struct isa_mem *m; @@ -795,7 +795,7 @@ _isa_free(addr, pool) struct malloc_type *pool; { struct isa_mem **mp, *m; - caddr_t kva = (caddr_t)addr; + void *kva = (void *)addr; for(mp = &isa_mem_head; *mp && (*mp)->kva != kva; mp = &(*mp)->next) @@ -819,7 +819,7 @@ _isa_mappage(mem, off, prot) { struct isa_mem *m; - for(m = isa_mem_head; m && m->kva != (caddr_t)mem; m = m->next) + for(m = isa_mem_head; m && m->kva != (void *)mem; m = m->next) ; if (!m) { printf("_isa_mappage: mapping unallocted memory\n"); diff --git a/sys/dev/isa/isadmavar.h b/sys/dev/isa/isadmavar.h index 9c1bc3d9e68..7ce5e1f3c21 100644 --- a/sys/dev/isa/isadmavar.h +++ b/sys/dev/isa/isadmavar.h @@ -1,4 +1,4 @@ -/* $NetBSD: isadmavar.h,v 1.21 2005/12/11 12:22:02 christos Exp $ */ +/* $NetBSD: isadmavar.h,v 1.22 2007/03/04 06:02:12 christos Exp $ */ /*- * Copyright (c) 1997, 1998, 2000 The NetBSD Foundation, Inc. @@ -93,7 +93,7 @@ struct isa_mem { int chan; bus_size_t size; bus_addr_t addr; - caddr_t kva; + void *kva; struct isa_mem *next; }; @@ -126,8 +126,8 @@ int _isa_dmamem_alloc(struct isa_dma_state *, int, bus_size_t, void _isa_dmamem_free(struct isa_dma_state *, int, bus_addr_t, bus_size_t); int _isa_dmamem_map(struct isa_dma_state *, int, bus_addr_t, - bus_size_t, caddr_t *, int); -void _isa_dmamem_unmap(struct isa_dma_state *, int, caddr_t, + bus_size_t, void **, int); +void _isa_dmamem_unmap(struct isa_dma_state *, int, void *, size_t); paddr_t _isa_dmamem_mmap(struct isa_dma_state *, int, bus_addr_t, bus_size_t, off_t, int, int); diff --git a/sys/dev/isa/isic_isa_avm_a1.c b/sys/dev/isa/isic_isa_avm_a1.c index 523f7bf4d45..1035db653c2 100644 --- a/sys/dev/isa/isic_isa_avm_a1.c +++ b/sys/dev/isa/isic_isa_avm_a1.c @@ -35,14 +35,14 @@ * i4b_avm_a1.c - AVM A1/Fritz passive card driver for isdn4bsd * ------------------------------------------------------------ * - * $Id: isic_isa_avm_a1.c,v 1.8 2005/12/11 12:22:03 christos Exp $ + * $Id: isic_isa_avm_a1.c,v 1.9 2007/03/04 06:02:12 christos Exp $ * * last edit-date: [Fri Jan 5 11:37:22 2001] * *---------------------------------------------------------------------------*/ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: isic_isa_avm_a1.c,v 1.8 2005/12/11 12:22:03 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: isic_isa_avm_a1.c,v 1.9 2007/03/04 06:02:12 christos Exp $"); #include "opt_isicisa.h" #ifdef ISICISA_AVM_A1 @@ -287,10 +287,10 @@ isic_probe_avma1(struct isa_device *dev) /* setup ISAC and HSCX base addr */ - ISAC_BASE = (caddr_t)dev->id_iobase + 0x1400 - 0x20; + ISAC_BASE = (void *)dev->id_iobase + 0x1400 - 0x20; - HSCX_A_BASE = (caddr_t)dev->id_iobase + 0x400 - 0x20; - HSCX_B_BASE = (caddr_t)dev->id_iobase + 0xc00 - 0x20; + HSCX_A_BASE = (void *)dev->id_iobase + 0x400 - 0x20; + HSCX_B_BASE = (void *)dev->id_iobase + 0xc00 - 0x20; /* * Read HSCX A/B VSTR. diff --git a/sys/dev/isa/isic_isa_itk_ix1.c b/sys/dev/isa/isic_isa_itk_ix1.c index 9d64a090fde..d0bc5addc17 100644 --- a/sys/dev/isa/isic_isa_itk_ix1.c +++ b/sys/dev/isa/isic_isa_itk_ix1.c @@ -35,7 +35,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: isic_isa_itk_ix1.c,v 1.13 2006/11/24 21:23:07 wiz Exp $"); +__KERNEL_RCSID(0, "$NetBSD: isic_isa_itk_ix1.c,v 1.14 2007/03/04 06:02:12 christos Exp $"); #include "opt_isicisa.h" @@ -264,9 +264,9 @@ isic_attach_itkix1(struct isa_device *dev) sc->sc_bfifolen = HSCX_FIFO_LEN; /* setup ISAC and HSCX base addr */ - ISAC_BASE = (caddr_t) sc->sc_port; - HSCX_A_BASE = (caddr_t) sc->sc_port + 1; - HSCX_B_BASE = (caddr_t) sc->sc_port + 2; + ISAC_BASE = (void *) sc->sc_port; + HSCX_A_BASE = (void *) sc->sc_port + 1; + HSCX_B_BASE = (void *) sc->sc_port + 2; /* Read HSCX A/B VSTR. Expected value is 0x05 (V2.1) or 0x04 (V2.0). */ hv1 = HSCX_READ(0, H_VSTR) & 0xf; diff --git a/sys/dev/isa/isic_isa_tel_s016.c b/sys/dev/isa/isic_isa_tel_s016.c index 15080be1aa5..f478a10f11f 100644 --- a/sys/dev/isa/isic_isa_tel_s016.c +++ b/sys/dev/isa/isic_isa_tel_s016.c @@ -37,7 +37,7 @@ * isic - I4B Siemens ISDN Chipset Driver for Teles S0/16 and clones * ================================================================= * - * $Id: isic_isa_tel_s016.c,v 1.7 2005/12/11 12:22:03 christos Exp $ + * $Id: isic_isa_tel_s016.c,v 1.8 2007/03/04 06:02:12 christos Exp $ * * last edit-date: [Fri Jan 5 11:37:22 2001] * @@ -50,7 +50,7 @@ *---------------------------------------------------------------------------*/ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: isic_isa_tel_s016.c,v 1.7 2005/12/11 12:22:03 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: isic_isa_tel_s016.c,v 1.8 2007/03/04 06:02:12 christos Exp $"); #include "opt_isicisa.h" #ifdef ISICISA_TEL_S0_16 @@ -275,7 +275,7 @@ isic_probe_s016(struct isa_device *dev) return(0); break; } - sc->sc_vmem_addr = (caddr_t) dev->id_maddr; + sc->sc_vmem_addr = (void *) dev->id_maddr; dev->id_msize = 0x1000; /* check card signature */ @@ -325,12 +325,12 @@ isic_probe_s016(struct isa_device *dev) /* setup ISAC base addr */ - ISAC_BASE = (caddr_t) ((dev->id_maddr) + 0x100); + ISAC_BASE = (void *) ((dev->id_maddr) + 0x100); /* setup HSCX base addr */ - HSCX_A_BASE = (caddr_t) ((dev->id_maddr) + 0x180); - HSCX_B_BASE = (caddr_t) ((dev->id_maddr) + 0x1c0); + HSCX_A_BASE = (void *) ((dev->id_maddr) + 0x180); + HSCX_B_BASE = (void *) ((dev->id_maddr) + 0x1c0); return (1); } diff --git a/sys/dev/isa/isic_isa_tel_s0163.c b/sys/dev/isa/isic_isa_tel_s0163.c index ce038ae8d77..618197ed6ff 100644 --- a/sys/dev/isa/isic_isa_tel_s0163.c +++ b/sys/dev/isa/isic_isa_tel_s0163.c @@ -37,7 +37,7 @@ * isic - I4B Siemens ISDN Chipset Driver for Teles S0/16.3 * ======================================================== * - * $Id: isic_isa_tel_s0163.c,v 1.8 2005/12/11 12:22:03 christos Exp $ + * $Id: isic_isa_tel_s0163.c,v 1.9 2007/03/04 06:02:12 christos Exp $ * * last edit-date: [Fri Jan 5 11:37:22 2001] * @@ -49,7 +49,7 @@ *---------------------------------------------------------------------------*/ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: isic_isa_tel_s0163.c,v 1.8 2005/12/11 12:22:03 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: isic_isa_tel_s0163.c,v 1.9 2007/03/04 06:02:12 christos Exp $"); #include "opt_isicisa.h" #ifdef ISICISA_TEL_S0_16_3 @@ -306,21 +306,21 @@ isic_probe_s0163(struct isa_device *dev) switch(dev->id_iobase) { case 0xd80: - ISAC_BASE = (caddr_t) 0x960; - HSCX_A_BASE = (caddr_t) 0x160; - HSCX_B_BASE = (caddr_t) 0x560; + ISAC_BASE = (void *) 0x960; + HSCX_A_BASE = (void *) 0x160; + HSCX_B_BASE = (void *) 0x560; break; case 0xe80: - ISAC_BASE = (caddr_t) 0xa60; - HSCX_A_BASE = (caddr_t) 0x260; - HSCX_B_BASE = (caddr_t) 0x660; + ISAC_BASE = (void *) 0xa60; + HSCX_A_BASE = (void *) 0x260; + HSCX_B_BASE = (void *) 0x660; break; case 0xf80: - ISAC_BASE = (caddr_t) 0xb60; - HSCX_A_BASE = (caddr_t) 0x360; - HSCX_B_BASE = (caddr_t) 0x760; + ISAC_BASE = (void *) 0xb60; + HSCX_A_BASE = (void *) 0x360; + HSCX_B_BASE = (void *) 0x760; break; } @@ -395,21 +395,21 @@ set_softc(struct isic_softc *sc, struct isa_attach_args *ia, int unit) switch(ia->ia_iobase) { case 0xd80: - ISAC_BASE = (caddr_t) 0x960; - HSCX_A_BASE = (caddr_t) 0x160; - HSCX_B_BASE = (caddr_t) 0x560; + ISAC_BASE = (void *) 0x960; + HSCX_A_BASE = (void *) 0x160; + HSCX_B_BASE = (void *) 0x560; break; case 0xe80: - ISAC_BASE = (caddr_t) 0xa60; - HSCX_A_BASE = (caddr_t) 0x260; - HSCX_B_BASE = (caddr_t) 0x660; + ISAC_BASE = (void *) 0xa60; + HSCX_A_BASE = (void *) 0x260; + HSCX_B_BASE = (void *) 0x660; break; case 0xf80: - ISAC_BASE = (caddr_t) 0xb60; - HSCX_A_BASE = (caddr_t) 0x360; - HSCX_B_BASE = (caddr_t) 0x760; + ISAC_BASE = (void *) 0xb60; + HSCX_A_BASE = (void *) 0x360; + HSCX_B_BASE = (void *) 0x760; break; } return 1; diff --git a/sys/dev/isa/isic_isa_tel_s08.c b/sys/dev/isa/isic_isa_tel_s08.c index 485aa99d7e7..afa558686b1 100644 --- a/sys/dev/isa/isic_isa_tel_s08.c +++ b/sys/dev/isa/isic_isa_tel_s08.c @@ -37,7 +37,7 @@ * isic - I4B Siemens ISDN Chipset Driver for Teles S0/8 and clones * ================================================================ * - * $Id: isic_isa_tel_s08.c,v 1.7 2005/12/11 12:22:03 christos Exp $ + * $Id: isic_isa_tel_s08.c,v 1.8 2007/03/04 06:02:12 christos Exp $ * * last edit-date: [Fri Jan 5 11:37:22 2001] * @@ -50,7 +50,7 @@ *---------------------------------------------------------------------------*/ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: isic_isa_tel_s08.c,v 1.7 2005/12/11 12:22:03 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: isic_isa_tel_s08.c,v 1.8 2007/03/04 06:02:12 christos Exp $"); #include "opt_isicisa.h" #ifdef ISICISA_TEL_S0_8 @@ -259,7 +259,7 @@ isic_probe_s08(struct isa_device *dev) return(0); } - sc->sc_vmem_addr = (caddr_t) dev->id_maddr; + sc->sc_vmem_addr = (void *) dev->id_maddr; dev->id_msize = 0x1000; /* setup ISAC access routines */ @@ -284,12 +284,12 @@ isic_probe_s08(struct isa_device *dev) /* setup ISAC base addr */ - ISAC_BASE = (caddr_t)((dev->id_maddr) + 0x100); + ISAC_BASE = (void *)((dev->id_maddr) + 0x100); /* setup HSCX base addr */ - HSCX_A_BASE = (caddr_t)((dev->id_maddr) + 0x180); - HSCX_B_BASE = (caddr_t)((dev->id_maddr) + 0x1c0); + HSCX_A_BASE = (void *)((dev->id_maddr) + 0x180); + HSCX_B_BASE = (void *)((dev->id_maddr) + 0x1c0); return (1); } diff --git a/sys/dev/isa/isic_isa_usr_sti.c b/sys/dev/isa/isic_isa_usr_sti.c index 17ca887560d..db01f25a6d4 100644 --- a/sys/dev/isa/isic_isa_usr_sti.c +++ b/sys/dev/isa/isic_isa_usr_sti.c @@ -27,14 +27,14 @@ * i4b_usr_sti.c - USRobotics Sportster ISDN TA intern (Tina-pp) * ------------------------------------------------------------- * - * $Id: isic_isa_usr_sti.c,v 1.6 2005/12/11 12:22:03 christos Exp $ + * $Id: isic_isa_usr_sti.c,v 1.7 2007/03/04 06:02:13 christos Exp $ * * last edit-date: [Fri Jan 5 11:37:22 2001] * *---------------------------------------------------------------------------*/ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: isic_isa_usr_sti.c,v 1.6 2005/12/11 12:22:03 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: isic_isa_usr_sti.c,v 1.7 2007/03/04 06:02:13 christos Exp $"); #include "opt_isicisa.h" #ifdef ISICISA_USR_STI @@ -232,9 +232,9 @@ isic_probe_usrtai(struct isa_device *dev) /* setup ISAC and HSCX base addr */ - ISAC_BASE = (caddr_t)dev->id_iobase + USR_ISAC_OFF; - HSCX_A_BASE = (caddr_t)dev->id_iobase + USR_HSCXA_OFF; - HSCX_B_BASE = (caddr_t)dev->id_iobase + USR_HSCXB_OFF; + ISAC_BASE = (void *)dev->id_iobase + USR_ISAC_OFF; + HSCX_A_BASE = (void *)dev->id_iobase + USR_HSCXA_OFF; + HSCX_B_BASE = (void *)dev->id_iobase + USR_HSCXB_OFF; /* * Read HSCX A/B VSTR. Expected value for USR Sportster TA based diff --git a/sys/dev/isa/mcd.c b/sys/dev/isa/mcd.c index ede064c1135..af2b8fab41b 100644 --- a/sys/dev/isa/mcd.c +++ b/sys/dev/isa/mcd.c @@ -1,4 +1,4 @@ -/* $NetBSD: mcd.c,v 1.96 2006/11/16 01:33:00 christos Exp $ */ +/* $NetBSD: mcd.c,v 1.97 2007/03/04 06:02:13 christos Exp $ */ /* * Copyright (c) 1993, 1994, 1995 Charles M. Hannum. All rights reserved. @@ -56,7 +56,7 @@ /*static char COPYRIGHT[] = "mcd-driver (C)1993 by H.Veit & B.Moore";*/ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: mcd.c,v 1.96 2006/11/16 01:33:00 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mcd.c,v 1.97 2007/03/04 06:02:13 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -552,7 +552,7 @@ mcdwrite(dev_t dev, struct uio *uio, int flags) } int -mcdioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct lwp *l) +mcdioctl(dev_t dev, u_long cmd, void *addr, int flag, struct lwp *l) { struct mcd_softc *sc = device_lookup(&mcd_cd, MCDUNIT(dev)); int error; @@ -800,7 +800,7 @@ mcdsize(dev_t dev) } int -mcddump(dev_t dev, daddr_t blkno, caddr_t va, +mcddump(dev_t dev, daddr_t blkno, void *va, size_t size) { @@ -1252,7 +1252,7 @@ mcdintr(arg) /* Data is ready. */ bus_space_write_1(iot, ioh, MCD_CTL2, 0x04); /* XXX */ bus_space_read_multi_1(iot, ioh, MCD_RDATA, - bp->b_data + mbx->skip, mbx->sz); + (char *)bp->b_data + mbx->skip, mbx->sz); bus_space_write_1(iot, ioh, MCD_CTL2, 0x0c); /* XXX */ mbx->blkno += 1; mbx->skip += mbx->sz; diff --git a/sys/dev/isa/pcdisplay.c b/sys/dev/isa/pcdisplay.c index 20a0d578172..fe7d9807b00 100644 --- a/sys/dev/isa/pcdisplay.c +++ b/sys/dev/isa/pcdisplay.c @@ -1,4 +1,4 @@ -/* $NetBSD: pcdisplay.c,v 1.32 2006/11/16 01:33:00 christos Exp $ */ +/* $NetBSD: pcdisplay.c,v 1.33 2007/03/04 06:02:13 christos Exp $ */ /* * Copyright (c) 1998 @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: pcdisplay.c,v 1.32 2006/11/16 01:33:00 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pcdisplay.c,v 1.33 2007/03/04 06:02:13 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -114,7 +114,7 @@ const struct wsscreen_list pcdisplay_screenlist = { _pcdisplay_scrlist }; -static int pcdisplay_ioctl(void *, void *, u_long, caddr_t, int, struct lwp *); +static int pcdisplay_ioctl(void *, void *, u_long, void *, int, struct lwp *); static paddr_t pcdisplay_mmap(void *, void *, off_t, int); static int pcdisplay_alloc_screen(void *, const struct wsscreen_descr *, void **, int *, int *, long *); @@ -376,7 +376,7 @@ pcdisplay_is_console(iot) static int pcdisplay_ioctl(void *v, void *vs, u_long cmd, - caddr_t data, int flag, struct lwp *l) + void *data, int flag, struct lwp *l) { /* * XXX "do something!" diff --git a/sys/dev/isa/satlink.c b/sys/dev/isa/satlink.c index 693e5705853..e9337a25922 100644 --- a/sys/dev/isa/satlink.c +++ b/sys/dev/isa/satlink.c @@ -1,4 +1,4 @@ -/* $NetBSD: satlink.c,v 1.30 2006/11/16 01:33:00 christos Exp $ */ +/* $NetBSD: satlink.c,v 1.31 2007/03/04 06:02:13 christos Exp $ */ /*- * Copyright (c) 1997 The NetBSD Foundation, Inc. @@ -45,7 +45,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: satlink.c,v 1.30 2006/11/16 01:33:00 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: satlink.c,v 1.31 2007/03/04 06:02:13 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -80,7 +80,7 @@ struct satlink_softc { isa_chipset_tag_t sc_ic; /* ISA chipset info */ int sc_drq; /* the DRQ we're using */ bus_size_t sc_bufsize; /* DMA buffer size */ - caddr_t sc_buf; /* ring buffer for incoming data */ + void * sc_buf; /* ring buffer for incoming data */ int sc_uptr; /* user index into ring buffer */ int sc_sptr; /* satlink index into ring buffer */ int sc_flags; /* misc. flags. */ @@ -343,7 +343,7 @@ satlinkread(dev, uio, flags) /* * Easy case - no wrap-around. */ - error = uiomove(&sc->sc_buf[sc->sc_uptr], count, uio); + error = uiomove((char *)sc->sc_buf + sc->sc_uptr, count, uio); if (error == 0) { sc->sc_uptr += count; if (sc->sc_uptr == sc->sc_bufsize) @@ -359,7 +359,7 @@ satlinkread(dev, uio, flags) oresid = uio->uio_resid; if (wrapcnt > uio->uio_resid) wrapcnt = uio->uio_resid; - error = uiomove(&sc->sc_buf[sc->sc_uptr], wrapcnt, uio); + error = uiomove((char *)sc->sc_buf + sc->sc_uptr, wrapcnt, uio); sc->sc_uptr = 0; if (error != 0 || wrapcnt == oresid) return (error); @@ -375,7 +375,7 @@ satlinkread(dev, uio, flags) } int -satlinkioctl(dev_t dev, u_long cmd, caddr_t data, int flags, +satlinkioctl(dev_t dev, u_long cmd, void *data, int flags, struct lwp *l) { struct satlink_softc *sc = device_lookup(&satlink_cd, minor(dev)); diff --git a/sys/dev/isa/seagate.c b/sys/dev/isa/seagate.c index 834f3e5c825..bb752f67250 100644 --- a/sys/dev/isa/seagate.c +++ b/sys/dev/isa/seagate.c @@ -1,4 +1,4 @@ -/* $NetBSD: seagate.c,v 1.61 2006/11/16 01:33:00 christos Exp $ */ +/* $NetBSD: seagate.c,v 1.62 2007/03/04 06:02:13 christos Exp $ */ /* * ST01/02, Future Domain TMC-885, TMC-950 SCSI driver @@ -65,7 +65,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: seagate.c,v 1.61 2006/11/16 01:33:00 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: seagate.c,v 1.62 2007/03/04 06:02:13 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -194,9 +194,9 @@ struct sea_softc { void *sc_ih; int type; /* board type */ - caddr_t maddr; /* Base address for card */ - caddr_t maddr_cr_sr; /* Address of control and status reg */ - caddr_t maddr_dr; /* Address of data register */ + void * maddr; /* Base address for card */ + void * maddr_cr_sr; /* Address of control and status reg */ + void * maddr_dr; /* Address of data register */ struct scsipi_adapter sc_adapter; struct scsipi_channel sc_channel; @@ -332,7 +332,7 @@ seaprobe(struct device *parent, struct cfdata *match, { struct isa_attach_args *ia = aux; int i, type = 0; - caddr_t maddr; + void *maddr; if (ia->ia_niomem < 1) return (0); @@ -352,7 +352,7 @@ seaprobe(struct device *parent, struct cfdata *match, /* check board type */ /* No way to define this through config */ for (i = 0; i < nsignatures; i++) - if (!memcmp(maddr + signatures[i].offset, + if (!memcmp((char *)maddr + signatures[i].offset, signatures[i].signature, signatures[i].length)) { type = signatures[i].type; break; @@ -399,7 +399,7 @@ seaattach(struct device *parent, struct device *self, void *aux) /* check board type */ /* No way to define this through config */ for (i = 0; i < nsignatures; i++) - if (!memcmp(sea->maddr + signatures[i].offset, + if (!memcmp((char *)sea->maddr + signatures[i].offset, signatures[i].signature, signatures[i].length)) { sea->type = signatures[i].type; break; @@ -1341,7 +1341,7 @@ sea_information_transfer(sea) break; if (!(phase & STAT_IO)) { #ifdef SEA_ASSEMBLER - caddr_t junk; + void *junk; __asm("cld\n\t\ rep\n\t\ movsl" : @@ -1358,7 +1358,7 @@ sea_information_transfer(sea) #endif } else { #ifdef SEA_ASSEMBLER - caddr_t junk; + void *junk; __asm("cld\n\t\ rep\n\t\ movsl" : diff --git a/sys/dev/isa/spkr.c b/sys/dev/isa/spkr.c index f908af69d78..3f7e0726542 100644 --- a/sys/dev/isa/spkr.c +++ b/sys/dev/isa/spkr.c @@ -1,4 +1,4 @@ -/* $NetBSD: spkr.c,v 1.23 2006/11/16 01:33:00 christos Exp $ */ +/* $NetBSD: spkr.c,v 1.24 2007/03/04 06:02:13 christos Exp $ */ /* * Copyright (c) 1990 Eric S. Raymond (esr@snark.thyrsus.com) @@ -43,7 +43,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: spkr.c,v 1.23 2006/11/16 01:33:00 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: spkr.c,v 1.24 2007/03/04 06:02:13 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -483,7 +483,7 @@ int spkrclose(dev_t dev, int flags, int mode, return(0); } -int spkrioctl(dev_t dev, u_long cmd, caddr_t data, int flag, +int spkrioctl(dev_t dev, u_long cmd, void *data, int flag, struct lwp *l) { #ifdef SPKRDEBUG @@ -503,7 +503,7 @@ int spkrioctl(dev_t dev, u_long cmd, caddr_t data, int flag, } else if (cmd == SPKRTUNE) { - tone_t *tp = (tone_t *)(*(caddr_t *)data); + tone_t *tp = (tone_t *)(*(void **)data); tone_t ttp; int error; diff --git a/sys/dev/isa/wds.c b/sys/dev/isa/wds.c index 8cd313f5bcc..fe6f5003bb1 100644 --- a/sys/dev/isa/wds.c +++ b/sys/dev/isa/wds.c @@ -1,4 +1,4 @@ -/* $NetBSD: wds.c,v 1.65 2006/11/16 01:33:00 christos Exp $ */ +/* $NetBSD: wds.c,v 1.66 2007/03/04 06:02:13 christos Exp $ */ /* * XXX @@ -86,7 +86,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: wds.c,v 1.65 2006/11/16 01:33:00 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: wds.c,v 1.66 2007/03/04 06:02:13 christos Exp $"); #include "opt_ddb.h" @@ -652,7 +652,7 @@ wds_create_scbs(sc, mem, size) return (error); } TAILQ_INSERT_TAIL(&sc->sc_free_scb, scb, chain); - scb = (struct wds_scb *)((caddr_t)scb + + scb = (struct wds_scb *)((char *)scb + ALIGN(sizeof(struct wds_scb))); size -= ALIGN(sizeof(struct wds_scb)); sc->sc_numscbs++; @@ -991,14 +991,14 @@ wds_init(sc, isreset) if (bus_dmamem_alloc(sc->sc_dmat, PAGE_SIZE, PAGE_SIZE, 0, &seg, 1, &rseg, BUS_DMA_NOWAIT) || bus_dmamem_map(sc->sc_dmat, &seg, rseg, PAGE_SIZE, - (caddr_t *)&wmbx, BUS_DMA_NOWAIT|BUS_DMA_COHERENT)) + (void **)&wmbx, BUS_DMA_NOWAIT|BUS_DMA_COHERENT)) panic("wds_init: can't create or map mailbox"); /* * Since DMA memory allocation is always rounded up to a * page size, create some scbs from the leftovers. */ - if (wds_create_scbs(sc, ((caddr_t)wmbx) + + if (wds_create_scbs(sc, ((char *)wmbx) + ALIGN(sizeof(struct wds_mbx)), PAGE_SIZE - ALIGN(sizeof(struct wds_mbx)))) panic("wds_init: can't create scbs"); diff --git a/sys/dev/isa/wt.c b/sys/dev/isa/wt.c index d815f37b663..9af2f434ebf 100644 --- a/sys/dev/isa/wt.c +++ b/sys/dev/isa/wt.c @@ -1,4 +1,4 @@ -/* $NetBSD: wt.c,v 1.74 2006/11/16 01:33:00 christos Exp $ */ +/* $NetBSD: wt.c,v 1.75 2007/03/04 06:02:13 christos Exp $ */ /* * Streamer tape driver. @@ -51,7 +51,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: wt.c,v 1.74 2006/11/16 01:33:00 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: wt.c,v 1.75 2007/03/04 06:02:13 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -330,7 +330,7 @@ ok: } static int -wtdump(dev_t dev, daddr_t blkno, caddr_t va, +wtdump(dev_t dev, daddr_t blkno, void *va, size_t size) { @@ -485,7 +485,7 @@ done: * ioctl(int fd, WTQICMD, int qicop) -- do QIC op */ static int -wtioctl(dev_t dev, unsigned long cmd, caddr_t addr, int flag, +wtioctl(dev_t dev, unsigned long cmd, void *addr, int flag, struct lwp *l) { struct wt_softc *sc = device_lookup(&wt_cd, minor(dev) & T_UNIT); @@ -697,7 +697,7 @@ wtintr(void *arg) "rewind busy?\n" : "rewind finished\n")); sc->flags &= ~TPREW; /* rewind finished */ wtsense(sc, 1, TP_WRP); - wakeup((caddr_t)sc); + wakeup((void *)sc); return 1; } @@ -711,7 +711,7 @@ wtintr(void *arg) if ((x & sc->regs.NOEXCEP) == 0) /* operation failed */ wtsense(sc, 1, (sc->flags & TPRMARK) ? TP_WRP : 0); sc->flags &= ~(TPRMARK | TPWMARK); /* operation finished */ - wakeup((caddr_t)sc); + wakeup((void *)sc); return 1; } @@ -747,7 +747,7 @@ wtintr(void *arg) sc->flags |= TPVOL; /* end of file */ else sc->flags |= TPEXCEP; /* i/o error */ - wakeup((caddr_t)sc); + wakeup((void *)sc); return 1; } @@ -761,7 +761,7 @@ wtintr(void *arg) if (sc->dmacount > sc->dmatotal) /* short last block */ sc->dmacount = sc->dmatotal; /* Wake up user level. */ - wakeup((caddr_t)sc); + wakeup((void *)sc); WTDBPRINT(("i/o finished, %d\n", sc->dmacount)); return 1; } @@ -812,7 +812,7 @@ static int wtwritefm(struct wt_softc *sc) { - tsleep((caddr_t)wtwritefm, WTPRI, "wtwfm", hz); + tsleep((void *)wtwritefm, WTPRI, "wtwfm", hz); sc->flags &= ~(TPRO | TPWO); if (!wtcmd(sc, QIC_WRITEFM)) { wtsense(sc, 1, 0); @@ -852,7 +852,7 @@ wtsoft(struct wt_softc *sc, int mask, int bits) x = bus_space_read_1(iot, ioh, sc->regs.STATPORT); if ((x & mask) != bits) return x; - tsleep((caddr_t)wtsoft, WTPRI, "wtsoft", 1); + tsleep((void *)wtsoft, WTPRI, "wtsoft", 1); } } @@ -904,7 +904,7 @@ wtwait(struct wt_softc *sc, int catch, const char *msg) WTDBPRINT(("wtwait() `%s'\n", msg)); while (sc->flags & (TPACTIVE | TPREW | TPRMARK | TPWMARK)) - if ((error = tsleep((caddr_t)sc, WTPRI | catch, msg, 0)) != 0) + if ((error = tsleep((void *)sc, WTPRI | catch, msg, 0)) != 0) return error; return 0; } diff --git a/sys/dev/isapnp/atppc_isapnp.c b/sys/dev/isapnp/atppc_isapnp.c index 31fd9427d0d..de0bed3ac03 100644 --- a/sys/dev/isapnp/atppc_isapnp.c +++ b/sys/dev/isapnp/atppc_isapnp.c @@ -1,4 +1,4 @@ -/* $NetBSD: atppc_isapnp.c,v 1.5 2006/03/29 06:51:47 thorpej Exp $ */ +/* $NetBSD: atppc_isapnp.c,v 1.6 2007/03/04 06:02:13 christos Exp $ */ /*- * Copyright (c) 2004 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: atppc_isapnp.c,v 1.5 2006/03/29 06:51:47 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: atppc_isapnp.c,v 1.6 2007/03/04 06:02:13 christos Exp $"); #include "opt_atppc.h" @@ -79,9 +79,9 @@ static int atppc_isapnp_dma_start(struct atppc_softc *, void *, u_int, u_int8_t); static int atppc_isapnp_dma_finish(struct atppc_softc *); static int atppc_isapnp_dma_abort(struct atppc_softc *); -static int atppc_isapnp_dma_malloc(struct device *, caddr_t *, bus_addr_t *, +static int atppc_isapnp_dma_malloc(struct device *, void **, bus_addr_t *, bus_size_t); -static void atppc_isapnp_dma_free(struct device *, caddr_t *, bus_addr_t *, +static void atppc_isapnp_dma_free(struct device *, void **, bus_addr_t *, bus_size_t); /* * atppc_isapnp_match: autoconf(9) match routine @@ -173,7 +173,7 @@ atppc_isapnp_dma_abort(struct atppc_softc * lsc) /* Allocate memory for DMA over ISA bus */ int -atppc_isapnp_dma_malloc(struct device * dev, caddr_t * buf, bus_addr_t * bus_addr, +atppc_isapnp_dma_malloc(struct device * dev, void ** buf, bus_addr_t * bus_addr, bus_size_t size) { struct atppc_isapnp_softc * sc = (struct atppc_isapnp_softc *) dev; @@ -183,7 +183,7 @@ atppc_isapnp_dma_malloc(struct device * dev, caddr_t * buf, bus_addr_t * bus_add /* Free memory allocated by atppc_isa_dma_malloc() */ void -atppc_isapnp_dma_free(struct device * dev, caddr_t * buf, bus_addr_t * bus_addr, +atppc_isapnp_dma_free(struct device * dev, void ** buf, bus_addr_t * bus_addr, bus_size_t size) { struct atppc_isapnp_softc * sc = (struct atppc_isapnp_softc *) dev; diff --git a/sys/dev/isapnp/if_le_isapnp.c b/sys/dev/isapnp/if_le_isapnp.c index 0613543e98f..53403b766ba 100644 --- a/sys/dev/isapnp/if_le_isapnp.c +++ b/sys/dev/isapnp/if_le_isapnp.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_le_isapnp.c,v 1.30 2006/11/16 01:33:05 christos Exp $ */ +/* $NetBSD: if_le_isapnp.c,v 1.31 2007/03/04 06:02:13 christos Exp $ */ /*- * Copyright (c) 1997 The NetBSD Foundation, Inc. @@ -68,7 +68,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_le_isapnp.c,v 1.30 2006/11/16 01:33:05 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_le_isapnp.c,v 1.31 2007/03/04 06:02:13 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -216,7 +216,7 @@ le_isapnp_attach(struct device *parent, struct device *self, void *aux) return; } if (bus_dmamem_map(dmat, &seg, rseg, LE_ISAPNP_MEMSIZE, - (caddr_t *)&sc->sc_mem, BUS_DMA_NOWAIT|BUS_DMA_COHERENT)) { + (void **)&sc->sc_mem, BUS_DMA_NOWAIT|BUS_DMA_COHERENT)) { printf(": couldn't map memory for card\n"); return; } diff --git a/sys/dev/isapnp/isic_isapnp_ctx_s0P.c b/sys/dev/isapnp/isic_isapnp_ctx_s0P.c index 2e72bc0ad85..ccca8baf9ca 100644 --- a/sys/dev/isapnp/isic_isapnp_ctx_s0P.c +++ b/sys/dev/isapnp/isic_isapnp_ctx_s0P.c @@ -27,14 +27,14 @@ * isic - I4B Siemens ISDN Chipset Driver for Creatix PnP cards * ============================================================ * - * $Id: isic_isapnp_ctx_s0P.c,v 1.9 2007/01/29 01:52:45 hubertf Exp $ + * $Id: isic_isapnp_ctx_s0P.c,v 1.10 2007/03/04 06:02:13 christos Exp $ * * last edit-date: [Fri Jan 5 11:38:29 2001] * *---------------------------------------------------------------------------*/ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: isic_isapnp_ctx_s0P.c,v 1.9 2007/01/29 01:52:45 hubertf Exp $"); +__KERNEL_RCSID(0, "$NetBSD: isic_isapnp_ctx_s0P.c,v 1.10 2007/03/04 06:02:13 christos Exp $"); #include "opt_isicpnp.h" #if ISICPNP_CRTX_S0_P @@ -286,9 +286,9 @@ isic_probe_Cs0P(struct isa_device *dev, unsigned int iobase2) /* setup ISAC and HSCX base addr */ - ISAC_BASE = (caddr_t) dev->id_iobase - 0x20; - HSCX_A_BASE = (caddr_t) iobase2 - 0x20; - HSCX_B_BASE = (caddr_t) iobase2; + ISAC_BASE = (void *) dev->id_iobase - 0x20; + HSCX_A_BASE = (void *) iobase2 - 0x20; + HSCX_B_BASE = (void *) iobase2; /* * Read HSCX A/B VSTR. Expected value for the Creatix PnP card is diff --git a/sys/dev/isapnp/isic_isapnp_drn_ngo.c b/sys/dev/isapnp/isic_isapnp_drn_ngo.c index 21867f72118..410a8ab49d8 100644 --- a/sys/dev/isapnp/isic_isapnp_drn_ngo.c +++ b/sys/dev/isapnp/isic_isapnp_drn_ngo.c @@ -27,14 +27,14 @@ * i4b_drn_ngo.c - Dr. Neuhaus Niccy GO@ and SAGEM Cybermod * -------------------------------------------------------- * - * $Id: isic_isapnp_drn_ngo.c,v 1.8 2005/12/11 12:22:16 christos Exp $ + * $Id: isic_isapnp_drn_ngo.c,v 1.9 2007/03/04 06:02:13 christos Exp $ * * last edit-date: [Fri Jan 5 11:38:29 2001] * *---------------------------------------------------------------------------*/ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: isic_isapnp_drn_ngo.c,v 1.8 2005/12/11 12:22:16 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: isic_isapnp_drn_ngo.c,v 1.9 2007/03/04 06:02:13 christos Exp $"); #include "opt_isicpnp.h" #ifdef ISICPNP_DRN_NGO @@ -419,9 +419,9 @@ isic_probe_drnngo(struct isa_device *dev, unsigned int iobase2) /* setup ISAC and HSCX base addr */ - ISAC_BASE = (caddr_t)dev->id_iobase; - HSCX_A_BASE = (caddr_t)(((u_int)dev->id_iobase) | HSCX_ABIT); - HSCX_B_BASE = (caddr_t)(((u_int)dev->id_iobase) | HSCX_BBIT); + ISAC_BASE = (void *)dev->id_iobase; + HSCX_A_BASE = (void *)(((u_int)dev->id_iobase) | HSCX_ABIT); + HSCX_B_BASE = (void *)(((u_int)dev->id_iobase) | HSCX_BBIT); /* * Read HSCX A/B VSTR. Expected value for Dr. Neuhaus Niccy GO@ based diff --git a/sys/dev/isapnp/isic_isapnp_dynalink.c b/sys/dev/isapnp/isic_isapnp_dynalink.c index cb209fa1b34..1cc83137e44 100644 --- a/sys/dev/isapnp/isic_isapnp_dynalink.c +++ b/sys/dev/isapnp/isic_isapnp_dynalink.c @@ -33,7 +33,7 @@ * isdn4bsd layer1 driver for Dynalink IS64PH isdn TA * ================================================== * - * $Id: isic_isapnp_dynalink.c,v 1.7 2005/12/11 12:22:16 christos Exp $ + * $Id: isic_isapnp_dynalink.c,v 1.8 2007/03/04 06:02:13 christos Exp $ * * last edit-date: [Fri Jan 5 11:38:29 2001] * @@ -75,7 +75,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: isic_isapnp_dynalink.c,v 1.7 2005/12/11 12:22:16 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: isic_isapnp_dynalink.c,v 1.8 2007/03/04 06:02:13 christos Exp $"); #include "opt_isicpnp.h" #ifdef ISICPNP_DYNALINK @@ -247,9 +247,9 @@ isic_probe_Dyn(struct isa_device *dev, unsigned int iobase2) sc->sc_bfifolen = HSCX_FIFO_LEN; /* setup ISAC and HSCX base addr */ - ISAC_BASE = (caddr_t) sc->sc_port; - HSCX_A_BASE = (caddr_t) sc->sc_port + 1; - HSCX_B_BASE = (caddr_t) sc->sc_port + 1 + HSCXB_HACK; + ISAC_BASE = (void *) sc->sc_port; + HSCX_A_BASE = (void *) sc->sc_port + 1; + HSCX_B_BASE = (void *) sc->sc_port + 1 + HSCXB_HACK; /* Read HSCX A/B VSTR. Expected value is 0x05 (V2.1). */ if( ((HSCX_READ(0, H_VSTR) & 0xf) != 0x5) || @@ -344,9 +344,9 @@ set_softc(struct isic_softc *sc, struct isa_attach_args *ia, int unit) sc->sc_bfifolen = HSCX_FIFO_LEN; /* setup ISAC and HSCX base addr */ - ISAC_BASE = (caddr_t) sc->sc_port; - HSCX_A_BASE = (caddr_t) sc->sc_port + 1; - HSCX_B_BASE = (caddr_t) sc->sc_port + 1 + HSCXB_HACK; + ISAC_BASE = (void *) sc->sc_port; + HSCX_A_BASE = (void *) sc->sc_port + 1; + HSCX_B_BASE = (void *) sc->sc_port + 1 + HSCXB_HACK; return 1; } diff --git a/sys/dev/isapnp/isic_isapnp_elsa_qs1i.c b/sys/dev/isapnp/isic_isapnp_elsa_qs1i.c index ca5411594ac..3223d23e62a 100644 --- a/sys/dev/isapnp/isic_isapnp_elsa_qs1i.c +++ b/sys/dev/isapnp/isic_isapnp_elsa_qs1i.c @@ -27,14 +27,14 @@ * isic - I4B Siemens ISDN Chipset Driver for ELSA Quickstep 1000pro ISA * ===================================================================== * - * $Id: isic_isapnp_elsa_qs1i.c,v 1.13 2005/12/11 12:22:16 christos Exp $ + * $Id: isic_isapnp_elsa_qs1i.c,v 1.14 2007/03/04 06:02:13 christos Exp $ * * last edit-date: [Fri Jan 5 11:38:29 2001] * *---------------------------------------------------------------------------*/ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: isic_isapnp_elsa_qs1i.c,v 1.13 2005/12/11 12:22:16 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: isic_isapnp_elsa_qs1i.c,v 1.14 2007/03/04 06:02:13 christos Exp $"); #include "opt_isicpnp.h" #if defined(ISICPNP_ELSA_QS1ISA) || defined(ISICPNP_ELSA_PCC16) @@ -419,9 +419,9 @@ isic_probe_Eqs1pi(struct isa_device *dev, unsigned int iobase2) /* setup ISAC and HSCX base addr */ - ISAC_BASE = (caddr_t) ((u_int)dev->id_iobase | ELSA_IDISAC); - HSCX_A_BASE = (caddr_t) ((u_int)dev->id_iobase | ELSA_IDHSCXA); - HSCX_B_BASE = (caddr_t) ((u_int)dev->id_iobase | ELSA_IDHSCXB); + ISAC_BASE = (void *) ((u_int)dev->id_iobase | ELSA_IDISAC); + HSCX_A_BASE = (void *) ((u_int)dev->id_iobase | ELSA_IDHSCXA); + HSCX_B_BASE = (void *) ((u_int)dev->id_iobase | ELSA_IDHSCXB); /* * Read HSCX A/B VSTR. Expected value for the ELSA QuickStep 1000pro diff --git a/sys/dev/isapnp/isic_isapnp_siemens_isurf.c b/sys/dev/isapnp/isic_isapnp_siemens_isurf.c index 29cebe2a072..30e55b8b19e 100644 --- a/sys/dev/isapnp/isic_isapnp_siemens_isurf.c +++ b/sys/dev/isapnp/isic_isapnp_siemens_isurf.c @@ -37,14 +37,14 @@ * Siemens I-Surf 2.0 PnP specific routines for isic driver * -------------------------------------------------------- * - * $Id: isic_isapnp_siemens_isurf.c,v 1.9 2007/01/29 01:52:45 hubertf Exp $ + * $Id: isic_isapnp_siemens_isurf.c,v 1.10 2007/03/04 06:02:13 christos Exp $ * * last edit-date: [Fri Jan 5 11:38:29 2001] * *---------------------------------------------------------------------------*/ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: isic_isapnp_siemens_isurf.c,v 1.9 2007/01/29 01:52:45 hubertf Exp $"); +__KERNEL_RCSID(0, "$NetBSD: isic_isapnp_siemens_isurf.c,v 1.10 2007/03/04 06:02:13 christos Exp $"); #include <sys/param.h> #include <sys/kernel.h> @@ -425,10 +425,10 @@ isic_attach_siemens_isurf(struct isa_device *dev, unsigned int iobase2) /* setup ISAC and HSCX base addr */ - ISAC_BASE = (caddr_t) ((u_int)sc->sc_port | SIE_ISURF_IDISAC); - HSCX_A_BASE = (caddr_t) ((u_int)sc->sc_port | SIE_ISURF_IDHSCXA); - HSCX_B_BASE = (caddr_t) ((u_int)sc->sc_port | SIE_ISURF_IDHSCXB); - IPAC_BASE = (caddr_t) ((u_int)sc->sc_port | SIE_ISURF_IDIPAC); + ISAC_BASE = (void *) ((u_int)sc->sc_port | SIE_ISURF_IDISAC); + HSCX_A_BASE = (void *) ((u_int)sc->sc_port | SIE_ISURF_IDHSCXA); + HSCX_B_BASE = (void *) ((u_int)sc->sc_port | SIE_ISURF_IDHSCXB); + IPAC_BASE = (void *) ((u_int)sc->sc_port | SIE_ISURF_IDIPAC); /* enable hscx/isac irq's */ IPAC_WRITE(IPAC_MASK, (IPAC_MASK_INT1 | IPAC_MASK_INT0)); diff --git a/sys/dev/isapnp/isic_isapnp_sws.c b/sys/dev/isapnp/isic_isapnp_sws.c index 706beb33de5..272a332713c 100644 --- a/sys/dev/isapnp/isic_isapnp_sws.c +++ b/sys/dev/isapnp/isic_isapnp_sws.c @@ -47,7 +47,7 @@ * EXPERIMENTAL !!!! * ================= * - * $Id: isic_isapnp_sws.c,v 1.10 2007/01/29 01:52:45 hubertf Exp $ + * $Id: isic_isapnp_sws.c,v 1.11 2007/03/04 06:02:14 christos Exp $ * * last edit-date: [Fri Jan 5 11:38:29 2001] * @@ -57,7 +57,7 @@ *---------------------------------------------------------------------------*/ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: isic_isapnp_sws.c,v 1.10 2007/01/29 01:52:45 hubertf Exp $"); +__KERNEL_RCSID(0, "$NetBSD: isic_isapnp_sws.c,v 1.11 2007/03/04 06:02:14 christos Exp $"); #include "opt_isicpnp.h" #ifdef ISICPNP_SEDLBAUER @@ -302,9 +302,9 @@ isic_attach_sws(struct isa_device *dev) sc->sc_bfifolen = HSCX_FIFO_LEN; dev->id_msize = 0; - ISAC_BASE = (caddr_t) (((u_int) sc->sc_port) + SWS_ISAC); - HSCX_A_BASE = (caddr_t) (((u_int) sc->sc_port) + SWS_HSCX0); - HSCX_B_BASE = (caddr_t) (((u_int) sc->sc_port) + SWS_HSCX1); + ISAC_BASE = (void *) (((u_int) sc->sc_port) + SWS_ISAC); + HSCX_A_BASE = (void *) (((u_int) sc->sc_port) + SWS_HSCX0); + HSCX_B_BASE = (void *) (((u_int) sc->sc_port) + SWS_HSCX1); /* * Read HSCX A/B VSTR. Expected value for the SWS PnP card is diff --git a/sys/dev/isapnp/isic_isapnp_tel_s0P.c b/sys/dev/isapnp/isic_isapnp_tel_s0P.c index 58203d48745..341944a2957 100644 --- a/sys/dev/isapnp/isic_isapnp_tel_s0P.c +++ b/sys/dev/isapnp/isic_isapnp_tel_s0P.c @@ -38,14 +38,14 @@ * EXPERIMENTAL !!! * ================ * - * $Id: isic_isapnp_tel_s0P.c,v 1.9 2007/01/29 01:52:45 hubertf Exp $ + * $Id: isic_isapnp_tel_s0P.c,v 1.10 2007/03/04 06:02:14 christos Exp $ * * last edit-date: [Fri Jan 5 11:38:29 2001] * *---------------------------------------------------------------------------*/ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: isic_isapnp_tel_s0P.c,v 1.9 2007/01/29 01:52:45 hubertf Exp $"); +__KERNEL_RCSID(0, "$NetBSD: isic_isapnp_tel_s0P.c,v 1.10 2007/03/04 06:02:14 christos Exp $"); #include "opt_isicpnp.h" #ifdef ISICPNP_TEL_S0_16_3_P @@ -285,21 +285,21 @@ isic_probe_s0163P(struct isa_device *dev, unsigned int iobase2) switch(dev->id_iobase) { case 0x580: - ISAC_BASE = (caddr_t) 0x580 - 0x20; - HSCX_A_BASE = (caddr_t) 0x180 - 0x20; - HSCX_B_BASE = (caddr_t) 0x180; + ISAC_BASE = (void *) 0x580 - 0x20; + HSCX_A_BASE = (void *) 0x180 - 0x20; + HSCX_B_BASE = (void *) 0x180; break; case 0x500: - ISAC_BASE = (caddr_t) 0x500 - 0x20; - HSCX_A_BASE = (caddr_t) 0x100 - 0x20; - HSCX_B_BASE = (caddr_t) 0x100; + ISAC_BASE = (void *) 0x500 - 0x20; + HSCX_A_BASE = (void *) 0x100 - 0x20; + HSCX_B_BASE = (void *) 0x100; break; case 0x680: - ISAC_BASE = (caddr_t) 0x680 - 0x20; - HSCX_A_BASE = (caddr_t) 0x280 - 0x20; - HSCX_B_BASE = (caddr_t) 0x280; + ISAC_BASE = (void *) 0x680 - 0x20; + HSCX_A_BASE = (void *) 0x280 - 0x20; + HSCX_B_BASE = (void *) 0x280; break; } diff --git a/sys/dev/kttcp.c b/sys/dev/kttcp.c index dc3094409c6..bdb84618ff4 100644 --- a/sys/dev/kttcp.c +++ b/sys/dev/kttcp.c @@ -1,4 +1,4 @@ -/* $NetBSD: kttcp.c,v 1.23 2007/02/09 21:55:26 ad Exp $ */ +/* $NetBSD: kttcp.c,v 1.24 2007/03/04 06:01:42 christos Exp $ */ /* * Copyright (c) 2002 Wasabi Systems, Inc. @@ -42,7 +42,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: kttcp.c,v 1.23 2007/02/09 21:55:26 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kttcp.c,v 1.24 2007/03/04 06:01:42 christos Exp $"); #include <sys/param.h> #include <sys/types.h> @@ -86,7 +86,7 @@ kttcpattach(int count) } int -kttcpioctl(dev_t dev, u_long cmd, caddr_t data, int flag, +kttcpioctl(dev_t dev, u_long cmd, void *data, int flag, struct lwp *l) { int error; diff --git a/sys/dev/ld.c b/sys/dev/ld.c index 09e8d746d0f..c94e4a11718 100644 --- a/sys/dev/ld.c +++ b/sys/dev/ld.c @@ -1,4 +1,4 @@ -/* $NetBSD: ld.c,v 1.45 2007/02/22 22:28:32 riz Exp $ */ +/* $NetBSD: ld.c,v 1.46 2007/03/04 06:01:42 christos Exp $ */ /*- * Copyright (c) 1998, 2000 The NetBSD Foundation, Inc. @@ -41,7 +41,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ld.c,v 1.45 2007/02/22 22:28:32 riz Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ld.c,v 1.46 2007/03/04 06:01:42 christos Exp $"); #include "rnd.h" @@ -384,7 +384,7 @@ ldwrite(dev_t dev, struct uio *uio, int ioflag) /* ARGSUSED */ static int -ldioctl(dev_t dev, u_long cmd, caddr_t addr, int32_t flag, struct lwp *l) +ldioctl(dev_t dev, u_long cmd, void *addr, int32_t flag, struct lwp *l) { struct ld_softc *sc; int part, unit, error; @@ -778,8 +778,9 @@ ldgetdefaultlabel(struct ld_softc *sc, struct disklabel *lp) * Take a dump. */ static int -lddump(dev_t dev, daddr_t blkno, caddr_t va, size_t size) +lddump(dev_t dev, daddr_t blkno, void *vav, size_t size) { + char *va = vav; struct ld_softc *sc; struct disklabel *lp; int unit, part, nsects, sectoff, towrt, nblk, maxblkcnt, rv; diff --git a/sys/dev/lockstat.c b/sys/dev/lockstat.c index 27d72eafa9a..b86d9939e2d 100644 --- a/sys/dev/lockstat.c +++ b/sys/dev/lockstat.c @@ -1,4 +1,4 @@ -/* $NetBSD: lockstat.c,v 1.7 2007/02/15 20:32:47 ad Exp $ */ +/* $NetBSD: lockstat.c,v 1.8 2007/03/04 06:01:42 christos Exp $ */ /*- * Copyright (c) 2006 The NetBSD Foundation, Inc. @@ -44,7 +44,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: lockstat.c,v 1.7 2007/02/15 20:32:47 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: lockstat.c,v 1.8 2007/03/04 06:01:42 christos Exp $"); #include <sys/types.h> #include <sys/param.h> @@ -470,7 +470,7 @@ lockstat_close(dev_t dev, int flag, int mode, * Handle control operations. */ int -lockstat_ioctl(dev_t dev, u_long cmd, caddr_t data, +lockstat_ioctl(dev_t dev, u_long cmd, void *data, int flag, struct lwp *l) { lsenable_t *le; diff --git a/sys/dev/marvell/gtidma.c b/sys/dev/marvell/gtidma.c index fdbde1aab55..3489e8008e5 100644 --- a/sys/dev/marvell/gtidma.c +++ b/sys/dev/marvell/gtidma.c @@ -1,4 +1,4 @@ -/* $NetBSD: gtidma.c,v 1.9 2006/03/29 06:55:32 thorpej Exp $ */ +/* $NetBSD: gtidma.c,v 1.10 2007/03/04 06:02:14 christos Exp $ */ /* * Copyright (c) 2002 Allegro Networks, Inc., Wasabi Systems, Inc. @@ -44,7 +44,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: gtidma.c,v 1.9 2006/03/29 06:55:32 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: gtidma.c,v 1.10 2007/03/04 06:02:14 christos Exp $"); #include "opt_idma.h" #include "opt_ddb.h" @@ -150,7 +150,7 @@ _mftb() #define IDMA_LIST_SYNC_POST(c, p) idma_list_sync_post(c, p) static inline void -idma_cache_flush(void * p) +idma_cache_flush(void *p) { KASSERT(((unsigned int)p & (CACHELINESIZE-1)) == 0); __asm volatile ("eieio; dcbf 0,%0; eieio; lwz %0,0(%0); sync;" @@ -158,7 +158,7 @@ idma_cache_flush(void * p) } static inline void -idma_cache_invalidate(void * const p) +idma_cache_invalidate(void *const p) { KASSERT(((unsigned int)p & (CACHELINESIZE-1)) == 0); __asm volatile ("eieio; dcbi 0,%0; sync;" :: "r"(p)); @@ -267,7 +267,7 @@ STATIC int idma_match( struct device * const parent, struct cfdata * const self, - void * const aux) + void *const aux) { struct gt_attach_args * const ga = (struct gt_attach_args *)aux; @@ -281,7 +281,7 @@ STATIC void idma_attach( struct device * const parent, struct device * const self, - void * const aux) + void *const aux) { struct gt_softc * const gtsc = device_private(parent); idma_softc_t * const sc = device_private(self); @@ -433,7 +433,7 @@ idma_chan_t * idma_chan_alloc( const unsigned int ndesc, int (* const callback)(void *, idma_desch_t *, u_int32_t), - void * const arg) + void *const arg) { idma_softc_t * const sc = idma_sc; /* XXX */ idma_chan_t *idcp; @@ -1214,7 +1214,7 @@ idma_done( } STATIC int -idma_intr0_1(void * const arg) +idma_intr0_1(void *const arg) { unsigned int reg = IDMA_CAUSE_REG(0); unsigned int shift = IDMA_MASK_SHIFT(0); @@ -1225,7 +1225,7 @@ idma_intr0_1(void * const arg) } STATIC int -idma_intr2_3(void * const arg) +idma_intr2_3(void *const arg) { unsigned int reg = IDMA_CAUSE_REG(2); unsigned int shift = IDMA_MASK_SHIFT(2); @@ -1236,7 +1236,7 @@ idma_intr2_3(void * const arg) } STATIC int -idma_intr4_5(void * const arg) +idma_intr4_5(void *const arg) { unsigned int reg = IDMA_CAUSE_REG(4); unsigned int shift = IDMA_MASK_SHIFT(4); @@ -1247,7 +1247,7 @@ idma_intr4_5(void * const arg) } STATIC int -idma_intr6_7(void * const arg) +idma_intr6_7(void *const arg) { unsigned int reg = IDMA_CAUSE_REG(6); unsigned int shift = IDMA_MASK_SHIFT(6); @@ -1363,7 +1363,7 @@ next: } STATIC void -idma_time(void * const arg) +idma_time(void *const arg) { idma_softc_t * const sc = (idma_softc_t *)arg; idma_chan_t *idcp; diff --git a/sys/dev/marvell/gtidmavar.h b/sys/dev/marvell/gtidmavar.h index 085a05218d8..59122e160d8 100644 --- a/sys/dev/marvell/gtidmavar.h +++ b/sys/dev/marvell/gtidmavar.h @@ -1,4 +1,4 @@ -/* $NetBSD: gtidmavar.h,v 1.4 2005/12/11 12:22:16 christos Exp $ */ +/* $NetBSD: gtidmavar.h,v 1.5 2007/03/04 06:02:14 christos Exp $ */ /* * Copyright (c) 2002 Allegro Networks, Inc., Wasabi Systems, Inc. @@ -85,7 +85,7 @@ #define IDMA_DMSEG_MAX 1 typedef struct idma_dmamem { bus_dmamap_t idm_map; /* dmamem'ed memory */ - caddr_t idm_kva; /* kva of dmamem memory */ + void *idm_kva; /* kva of dmamem memory */ int idm_nsegs; /* # of segment in idm_segs */ int idm_maxsegs; /* maximum # of segments allowed */ size_t idm_size; /* size of memory region */ diff --git a/sys/dev/marvell/gtmpsc.c b/sys/dev/marvell/gtmpsc.c index 125a2ca0077..b573eb06fba 100644 --- a/sys/dev/marvell/gtmpsc.c +++ b/sys/dev/marvell/gtmpsc.c @@ -1,4 +1,4 @@ -/* $NetBSD: gtmpsc.c,v 1.22 2007/01/29 01:52:44 hubertf Exp $ */ +/* $NetBSD: gtmpsc.c,v 1.23 2007/03/04 06:02:14 christos Exp $ */ /* * Copyright (c) 2002 Allegro Networks, Inc., Wasabi Systems, Inc. @@ -45,7 +45,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: gtmpsc.c,v 1.22 2007/01/29 01:52:44 hubertf Exp $"); +__KERNEL_RCSID(0, "$NetBSD: gtmpsc.c,v 1.23 2007/03/04 06:02:14 christos Exp $"); #include "opt_kgdb.h" @@ -435,7 +435,7 @@ gtmpscattach(struct device *parent, struct device *self, void *aux) gtmpsc_poll_sdma_t *vmps; gtmpsc_poll_sdma_t *pmps; struct tty *tp; - caddr_t kva; + void *kva; int rsegs; int err; int s; @@ -723,7 +723,7 @@ gtmpscpoll(dev_t dev, int events, struct lwp *l) } int -gtmpscioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct lwp *l) +gtmpscioctl(dev_t dev, u_long cmd, void *data, int flag, struct lwp *l) { struct gtmpsc_softc *sc = gtmpsc_cd.cd_devs[GTMPSCUNIT(dev)]; struct tty *tp = sc->gtmpsc_tty; diff --git a/sys/dev/marvell/if_gfe.c b/sys/dev/marvell/if_gfe.c index bc3f2a6a4ad..c7ea3651205 100644 --- a/sys/dev/marvell/if_gfe.c +++ b/sys/dev/marvell/if_gfe.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_gfe.c,v 1.20 2006/03/29 06:55:32 thorpej Exp $ */ +/* $NetBSD: if_gfe.c,v 1.21 2007/03/04 06:02:14 christos Exp $ */ /* * Copyright (c) 2002 Allegro Networks, Inc., Wasabi Systems, Inc. @@ -42,7 +42,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_gfe.c,v 1.20 2006/03/29 06:55:32 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_gfe.c,v 1.21 2007/03/04 06:02:14 christos Exp $"); #include "opt_inet.h" #include "bpfilter.h" @@ -151,7 +151,7 @@ STATIC int gfe_dmamem_alloc(struct gfe_softc *, struct gfe_dmamem *, int, size_t, int); STATIC void gfe_dmamem_free(struct gfe_softc *, struct gfe_dmamem *); -STATIC int gfe_ifioctl (struct ifnet *, u_long, caddr_t); +STATIC int gfe_ifioctl (struct ifnet *, u_long, void *); STATIC void gfe_ifstart (struct ifnet *); STATIC void gfe_ifwatchdog (struct ifnet *); @@ -426,7 +426,7 @@ gfe_dmamem_free(struct gfe_softc *sc, struct gfe_dmamem *gdm) } int -gfe_ifioctl(struct ifnet *ifp, u_long cmd, caddr_t data) +gfe_ifioctl(struct ifnet *ifp, u_long cmd, void *data) { struct gfe_softc * const sc = ifp->if_softc; struct ifreq *ifr = (struct ifreq *) data; diff --git a/sys/dev/marvell/if_gfevar.h b/sys/dev/marvell/if_gfevar.h index de3c4ee9798..1f4c48f5a7b 100644 --- a/sys/dev/marvell/if_gfevar.h +++ b/sys/dev/marvell/if_gfevar.h @@ -1,4 +1,4 @@ -/* $NetBSD: if_gfevar.h,v 1.7 2005/12/11 12:22:16 christos Exp $ */ +/* $NetBSD: if_gfevar.h,v 1.8 2007/03/04 06:02:14 christos Exp $ */ /* * Copyright (c) 2002 Allegro Networks, Inc., Wasabi Systems, Inc. @@ -46,7 +46,7 @@ struct gfe_dmamem { bus_dmamap_t gdm_map; /* dmamem'ed memory */ - caddr_t gdm_kva; /* kva of tx memory */ + void *gdm_kva; /* kva of tx memory */ int gdm_nsegs; /* # of segment in gdm_segs */ int gdm_maxsegs; /* maximum # of segments allowed */ size_t gdm_size; /* size of memory region */ diff --git a/sys/dev/mca/ed_mca.c b/sys/dev/mca/ed_mca.c index f1f44d52dfa..c380d71ce0c 100644 --- a/sys/dev/mca/ed_mca.c +++ b/sys/dev/mca/ed_mca.c @@ -1,4 +1,4 @@ -/* $NetBSD: ed_mca.c,v 1.34 2006/11/16 01:33:05 christos Exp $ */ +/* $NetBSD: ed_mca.c,v 1.35 2007/03/04 06:02:14 christos Exp $ */ /* * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -38,7 +38,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ed_mca.c,v 1.34 2006/11/16 01:33:05 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ed_mca.c,v 1.35 2007/03/04 06:02:14 christos Exp $"); #include "rnd.h" @@ -477,7 +477,7 @@ int edmcaioctl(dev, xfer, addr, flag, l) dev_t dev; u_long xfer; - caddr_t addr; + void *addr; int flag; struct lwp *l; { @@ -663,7 +663,7 @@ int edmcadump(dev, blkno, va, size) dev_t dev; daddr_t blkno; - caddr_t va; + void *va; size_t size; { struct ed_softc *ed; /* disk unit to do the I/O */ @@ -719,7 +719,7 @@ edmcadump(dev, blkno, va, size) /* update block count */ nblks -= min(nblks, eddumpmulti); blkno += min(nblks, eddumpmulti); - va += min(nblks, eddumpmulti) * lp->d_secsize; + va = (char *)va + min(nblks, eddumpmulti) * lp->d_secsize; } eddoingadump = 0; diff --git a/sys/dev/mca/esp_mca.c b/sys/dev/mca/esp_mca.c index 7e2229fd15e..a3c0f788b96 100644 --- a/sys/dev/mca/esp_mca.c +++ b/sys/dev/mca/esp_mca.c @@ -1,4 +1,4 @@ -/* $NetBSD: esp_mca.c,v 1.14 2006/11/16 01:33:05 christos Exp $ */ +/* $NetBSD: esp_mca.c,v 1.15 2007/03/04 06:02:14 christos Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -45,7 +45,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: esp_mca.c,v 1.14 2006/11/16 01:33:05 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: esp_mca.c,v 1.15 2007/03/04 06:02:14 christos Exp $"); #include <sys/types.h> #include <sys/param.h> @@ -107,7 +107,7 @@ static void esp_write_reg(struct ncr53c9x_softc *, int, u_char); static int esp_dma_isintr(struct ncr53c9x_softc *); static void esp_dma_reset(struct ncr53c9x_softc *); static int esp_dma_intr(struct ncr53c9x_softc *); -static int esp_dma_setup(struct ncr53c9x_softc *, caddr_t *, +static int esp_dma_setup(struct ncr53c9x_softc *, void **, size_t *, int, size_t *); static void esp_dma_go(struct ncr53c9x_softc *); static void esp_dma_stop(struct ncr53c9x_softc *); @@ -374,7 +374,7 @@ esp_dma_intr(sc) static int esp_dma_setup( struct ncr53c9x_softc *sc, - caddr_t *addr, + void **addr, size_t *len, int datain, size_t *dmasize diff --git a/sys/dev/mca/espvar.h b/sys/dev/mca/espvar.h index 6f2be003c78..6f6f5b69701 100644 --- a/sys/dev/mca/espvar.h +++ b/sys/dev/mca/espvar.h @@ -1,4 +1,4 @@ -/* $NetBSD: espvar.h,v 1.2 2001/12/04 20:47:58 jdolecek Exp $ */ +/* $NetBSD: espvar.h,v 1.3 2007/03/04 06:02:14 christos Exp $ */ /*- * Copyright (c) 1997, 2001 The NetBSD Foundation, Inc. @@ -50,7 +50,7 @@ struct esp_softc { bus_dmamap_t sc_xfer; - caddr_t *sc_xfer_addr; + void * *sc_xfer_addr; size_t *sc_xfer_len; volatile int sc_flags; diff --git a/sys/dev/md.c b/sys/dev/md.c index c51f455d0d4..5460540f9eb 100644 --- a/sys/dev/md.c +++ b/sys/dev/md.c @@ -1,4 +1,4 @@ -/* $NetBSD: md.c,v 1.47 2006/11/16 01:32:45 christos Exp $ */ +/* $NetBSD: md.c,v 1.48 2007/03/04 06:01:42 christos Exp $ */ /* * Copyright (c) 1995 Gordon W. Ross, Leo Weppelman. @@ -46,7 +46,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: md.c,v 1.47 2006/11/16 01:32:45 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: md.c,v 1.48 2007/03/04 06:01:42 christos Exp $"); #include "opt_md.h" @@ -311,7 +311,7 @@ mdstrategy(struct buf *bp) { int unit; struct md_softc *sc; - caddr_t addr; + void * addr; size_t off, xfer; unit = MD_UNIT(bp->b_dev); @@ -328,7 +328,7 @@ mdstrategy(struct buf *bp) case MD_UMEM_SERVER: /* Just add this job to the server's queue. */ BUFQ_PUT(sc->sc_buflist, bp); - wakeup((caddr_t)sc); + wakeup((void *)sc); /* see md_server_loop() */ /* no biodone in this case */ return; @@ -347,7 +347,7 @@ mdstrategy(struct buf *bp) xfer = bp->b_resid; if (xfer > (sc->sc_size - off)) xfer = (sc->sc_size - off); - addr = sc->sc_addr + off; + addr = (char *)sc->sc_addr + off; if (bp->b_flags & B_READ) memcpy(bp->b_data, addr, xfer); else @@ -367,7 +367,7 @@ mdstrategy(struct buf *bp) } static int -mdioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct lwp *l) +mdioctl(dev_t dev, u_long cmd, void *data, int flag, struct lwp *l) { int unit; struct md_softc *sc; @@ -423,7 +423,7 @@ md_ioctl_kalloc(struct md_softc *sc, struct md_conf *umd, return ENOMEM; /* This unit is now configured. */ - sc->sc_addr = (caddr_t)addr; /* kernel space */ + sc->sc_addr = (void *)addr; /* kernel space */ sc->sc_size = (size_t)size; sc->sc_type = MD_KMEM_ALLOCATED; return 0; @@ -443,7 +443,7 @@ md_ioctl_server(struct md_softc *sc, struct md_conf *umd, int error; /* Sanity check addr, size. */ - end = (vaddr_t) (umd->md_addr + umd->md_size); + end = (vaddr_t) ((char *)umd->md_addr + umd->md_size); if ((end >= VM_MAXUSER_ADDRESS) || (end < ((vaddr_t) umd->md_addr)) ) @@ -471,7 +471,7 @@ static int md_server_loop(struct md_softc *sc) { struct buf *bp; - caddr_t addr; /* user space address */ + void *addr; /* user space address */ size_t off; /* offset into "device" */ size_t xfer; /* amount to transfer */ int error; @@ -479,7 +479,7 @@ md_server_loop(struct md_softc *sc) for (;;) { /* Wait for some work to arrive. */ while ((bp = BUFQ_GET(sc->sc_buflist)) == NULL) { - error = tsleep((caddr_t)sc, md_sleep_pri, "md_idle", 0); + error = tsleep((void *)sc, md_sleep_pri, "md_idle", 0); if (error) return error; } @@ -497,7 +497,7 @@ md_server_loop(struct md_softc *sc) xfer = bp->b_resid; if (xfer > (sc->sc_size - off)) xfer = (sc->sc_size - off); - addr = sc->sc_addr + off; + addr = (char *)sc->sc_addr + off; if (bp->b_flags & B_READ) error = copyin(addr, bp->b_data, xfer); else diff --git a/sys/dev/md.h b/sys/dev/md.h index 2b85e3652af..afc477de309 100644 --- a/sys/dev/md.h +++ b/sys/dev/md.h @@ -1,4 +1,4 @@ -/* $NetBSD: md.h,v 1.7 2001/07/02 17:17:25 uch Exp $ */ +/* $NetBSD: md.h,v 1.8 2007/03/04 06:01:42 christos Exp $ */ /* * Copyright (c) 1995 Gordon W. Ross @@ -37,7 +37,7 @@ #include <sys/ioccom.h> struct md_conf { - caddr_t md_addr; + void *md_addr; size_t md_size; int md_type; }; diff --git a/sys/dev/md_root.c b/sys/dev/md_root.c index 289dd3da917..bd1b74b89de 100644 --- a/sys/dev/md_root.c +++ b/sys/dev/md_root.c @@ -1,4 +1,4 @@ -/* $NetBSD: md_root.c,v 1.12 2006/11/16 01:32:45 christos Exp $ */ +/* $NetBSD: md_root.c,v 1.13 2007/03/04 06:01:42 christos Exp $ */ /*- * Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: md_root.c,v 1.12 2006/11/16 01:32:45 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: md_root.c,v 1.13 2007/03/04 06:01:42 christos Exp $"); #include "opt_md.h" @@ -105,7 +105,7 @@ md_attach_hook(int unit, struct md_conf *md) if (unit == 0) { /* Setup root ramdisk */ - md->md_addr = (caddr_t)md_root_image; + md->md_addr = (void *)md_root_image; md->md_size = (size_t)md_root_size; md->md_type = MD_KMEM_FIXED; format_bytes(pbuf, sizeof(pbuf), md->md_size); diff --git a/sys/dev/midi.c b/sys/dev/midi.c index 42f90d0aea3..c545cf0a4c7 100644 --- a/sys/dev/midi.c +++ b/sys/dev/midi.c @@ -1,4 +1,4 @@ -/* $NetBSD: midi.c,v 1.52 2007/02/15 18:12:05 ad Exp $ */ +/* $NetBSD: midi.c,v 1.53 2007/03/04 06:01:42 christos Exp $ */ /* * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -38,7 +38,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: midi.c,v 1.52 2007/02/15 18:12:05 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: midi.c,v 1.53 2007/03/04 06:01:42 christos Exp $"); #include "midi.h" #include "sequencer.h" @@ -1561,7 +1561,7 @@ midi_writebytes(int unit, u_char *bf, int cc) } int -midiioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct lwp *l) +midiioctl(dev_t dev, u_long cmd, void *addr, int flag, struct lwp *l) { int unit = MIDIUNIT(dev); struct midi_softc *sc = midi_cd.cd_devs[unit]; diff --git a/sys/dev/midi_if.h b/sys/dev/midi_if.h index b36054369d4..212af778c2d 100644 --- a/sys/dev/midi_if.h +++ b/sys/dev/midi_if.h @@ -1,4 +1,4 @@ -/* $NetBSD: midi_if.h,v 1.18 2006/06/30 13:56:25 chap Exp $ */ +/* $NetBSD: midi_if.h,v 1.19 2007/03/04 06:01:42 christos Exp $ */ /* * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -57,7 +57,7 @@ struct midi_hw_if { void (*close)(void *); /* close hardware */ int (*output)(void *, int); /* output a byte */ void (*getinfo)(void *, struct midi_info *); - int (*ioctl)(void *, u_long, caddr_t, int, struct lwp *); + int (*ioctl)(void *, u_long, void *, int, struct lwp *); }; /* diff --git a/sys/dev/midisyn.c b/sys/dev/midisyn.c index 38287ff9deb..095b8f9aa32 100644 --- a/sys/dev/midisyn.c +++ b/sys/dev/midisyn.c @@ -1,4 +1,4 @@ -/* $NetBSD: midisyn.c,v 1.20 2006/11/16 01:32:45 christos Exp $ */ +/* $NetBSD: midisyn.c,v 1.21 2007/03/04 06:01:42 christos Exp $ */ /* * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: midisyn.c,v 1.20 2006/11/16 01:32:45 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: midisyn.c,v 1.21 2007/03/04 06:01:42 christos Exp $"); #include <sys/param.h> #include <sys/ioctl.h> @@ -88,7 +88,7 @@ int midisyn_open(void *, int, void midisyn_close(void *); int midisyn_sysrt(void *, int); void midisyn_getinfo(void *, struct midi_info *); -int midisyn_ioctl(void *, u_long, caddr_t, int, struct lwp *); +int midisyn_ioctl(void *, u_long, void *, int, struct lwp *); const struct midi_hw_if midisyn_hw_if = { midisyn_open, @@ -203,7 +203,7 @@ midisyn_getinfo(void *addr, struct midi_info *mi) } int -midisyn_ioctl(void *maddr, u_long cmd, caddr_t addr, int flag, struct lwp *l) +midisyn_ioctl(void *maddr, u_long cmd, void *addr, int flag, struct lwp *l) { midisyn *ms = maddr; diff --git a/sys/dev/midisynvar.h b/sys/dev/midisynvar.h index 6f534cd6b54..2c6094ff428 100644 --- a/sys/dev/midisynvar.h +++ b/sys/dev/midisynvar.h @@ -1,4 +1,4 @@ -/* $NetBSD: midisynvar.h,v 1.10 2006/06/30 13:56:25 chap Exp $ */ +/* $NetBSD: midisynvar.h,v 1.11 2007/03/04 06:01:43 christos Exp $ */ /* * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -58,7 +58,7 @@ typedef struct midisyn midisyn; struct midisyn_methods { int (*open) (midisyn *, int /* flags */); void (*close) (midisyn *); - int (*ioctl) (midisyn *, u_long, caddr_t, int, struct lwp *); + int (*ioctl) (midisyn *, u_long, void *, int, struct lwp *); /* * allocv(midisyn *ms, uint_fast8_t chan, uint_fast8_t key); * Allocate one of the devices actual voices (stealing one if diff --git a/sys/dev/mm.c b/sys/dev/mm.c index 7bd42f32bd8..64d27405131 100644 --- a/sys/dev/mm.c +++ b/sys/dev/mm.c @@ -1,4 +1,4 @@ -/* $NetBSD: mm.c,v 1.9 2006/11/16 01:32:45 christos Exp $ */ +/* $NetBSD: mm.c,v 1.10 2007/03/04 06:01:43 christos Exp $ */ /*- * Copyright (c) 2002 The NetBSD Foundation, Inc. @@ -38,7 +38,7 @@ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: mm.c,v 1.9 2006/11/16 01:32:45 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mm.c,v 1.10 2007/03/04 06:01:43 christos Exp $"); /* * Memory special file @@ -56,7 +56,7 @@ __KERNEL_RCSID(0, "$NetBSD: mm.c,v 1.9 2006/11/16 01:32:45 christos Exp $"); dev_type_ioctl(mmioctl); int -mmioctl(dev_t dev, u_long cmd, caddr_t data, int flag, +mmioctl(dev_t dev, u_long cmd, void *data, int flag, struct lwp *l) { switch (minor(dev)) { diff --git a/sys/dev/mscp/mscp.c b/sys/dev/mscp/mscp.c index 1d1e23999c9..f84a019b92f 100644 --- a/sys/dev/mscp/mscp.c +++ b/sys/dev/mscp/mscp.c @@ -1,4 +1,4 @@ -/* $NetBSD: mscp.c,v 1.24 2006/03/25 23:20:18 thorpej Exp $ */ +/* $NetBSD: mscp.c,v 1.25 2007/03/04 06:02:14 christos Exp $ */ /* * Copyright (c) 1988 Regents of the University of California. @@ -76,7 +76,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: mscp.c,v 1.24 2006/03/25 23:20:18 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mscp.c,v 1.25 2007/03/04 06:02:14 christos Exp $"); #include <sys/param.h> #include <sys/buf.h> @@ -189,7 +189,7 @@ loop: mi->mi_rsp.mri_next = nextrsp; if (mi->mi_wantcredits && mi->mi_credits > MSCP_MINCREDITS) { mi->mi_wantcredits = 0; - wakeup((caddr_t) &mi->mi_wantcredits); + wakeup((void *) &mi->mi_wantcredits); } return; } diff --git a/sys/dev/mscp/mscp_disk.c b/sys/dev/mscp/mscp_disk.c index 6d263cb02a8..eac8252fabb 100644 --- a/sys/dev/mscp/mscp_disk.c +++ b/sys/dev/mscp/mscp_disk.c @@ -1,4 +1,4 @@ -/* $NetBSD: mscp_disk.c,v 1.53 2006/03/29 07:06:24 thorpej Exp $ */ +/* $NetBSD: mscp_disk.c,v 1.54 2007/03/04 06:02:14 christos Exp $ */ /* * Copyright (c) 1988 Regents of the University of California. * All rights reserved. @@ -81,7 +81,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: mscp_disk.c,v 1.53 2006/03/29 07:06:24 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mscp_disk.c,v 1.54 2007/03/04 06:02:14 christos Exp $"); #include <sys/param.h> #include <sys/buf.h> @@ -283,7 +283,7 @@ raopen(dev, flag, fmt, l) */ #if notyet while (ra->ra_state != DK_OPEN) - if ((error = tsleep((caddr_t)ra, (PZERO + 1) | PCATCH, + if ((error = tsleep((void *)ra, (PZERO + 1) | PCATCH, devopn, 0))) { splx(s); return (error); @@ -439,7 +439,7 @@ int raioctl(dev, cmd, data, flag, l) dev_t dev; u_long cmd; - caddr_t data; + void *data; int flag; struct lwp *l; { @@ -586,7 +586,7 @@ int radump(dev, blkno, va, size) dev_t dev; daddr_t blkno; - caddr_t va; + void *va; size_t size; { return ENXIO; @@ -876,7 +876,7 @@ int rxioctl(dev, cmd, data, flag, l) dev_t dev; u_long cmd; - caddr_t data; + void *data; int flag; struct lwp *l; { @@ -916,7 +916,7 @@ int rxdump(dev, blkno, va, size) dev_t dev; daddr_t blkno; - caddr_t va; + void *va; size_t size; { @@ -1019,7 +1019,7 @@ rronline(usc, mp) struct rx_softc *rx = (struct rx_softc *)usc; struct disklabel *dl; - wakeup((caddr_t)&rx->ra_state); + wakeup((void *)&rx->ra_state); if ((mp->mscp_status & M_ST_MASK) != M_ST_SUCCESS) { printf("%s: attempt to bring on line failed: ", usc->dv_xname); mscp_printevent(mp); diff --git a/sys/dev/mscp/mscp_tape.c b/sys/dev/mscp/mscp_tape.c index 84d577d562a..6f8be2a0160 100644 --- a/sys/dev/mscp/mscp_tape.c +++ b/sys/dev/mscp/mscp_tape.c @@ -1,4 +1,4 @@ -/* $NetBSD: mscp_tape.c,v 1.29 2006/03/29 07:06:24 thorpej Exp $ */ +/* $NetBSD: mscp_tape.c,v 1.30 2007/03/04 06:02:14 christos Exp $ */ /* * Copyright (c) 1996 Ludd, University of Lule}, Sweden. * All rights reserved. @@ -41,7 +41,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: mscp_tape.c,v 1.29 2006/03/29 07:06:24 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mscp_tape.c,v 1.30 2007/03/04 06:02:14 christos Exp $"); #include <sys/param.h> #include <sys/device.h> @@ -363,7 +363,7 @@ mtonline(usc, mp) { struct mt_softc *mt = (void *)usc; - wakeup((caddr_t)&mt->mt_state); + wakeup((void *)&mt->mt_state); if ((mp->mscp_status & M_ST_MASK) == M_ST_SUCCESS) mt->mt_state = MT_ONLINE; @@ -438,7 +438,7 @@ int mtioctl(dev, cmd, data, flag, l) dev_t dev; u_long cmd; - caddr_t data; + void *data; int flag; struct lwp *l; { @@ -477,7 +477,7 @@ int mtdump(dev, blkno, va, size) dev_t dev; daddr_t blkno; - caddr_t va; + void *va; size_t size; { return -1; diff --git a/sys/dev/mscp/mscpvar.h b/sys/dev/mscp/mscpvar.h index 07b19154f73..adced4afde9 100644 --- a/sys/dev/mscp/mscpvar.h +++ b/sys/dev/mscp/mscpvar.h @@ -1,4 +1,4 @@ -/* $NetBSD: mscpvar.h,v 1.14 2005/12/11 12:22:47 christos Exp $ */ +/* $NetBSD: mscpvar.h,v 1.15 2007/03/04 06:02:14 christos Exp $ */ /* * Copyright (c) 1988 Regents of the University of California. * All rights reserved. @@ -262,7 +262,7 @@ struct mscp_softc { #define MSCP_DOCMD(mi) { \ if ((mi)->mi_wantcmd) { \ (mi)->mi_wantcmd = 0; \ - wakeup((caddr_t) &(mi)->mi_wantcmd); \ + wakeup((void *) &(mi)->mi_wantcmd); \ } \ } diff --git a/sys/dev/mvme/if_ie_mvme.c b/sys/dev/mvme/if_ie_mvme.c index 395444b0ece..02e0f586cf7 100644 --- a/sys/dev/mvme/if_ie_mvme.c +++ b/sys/dev/mvme/if_ie_mvme.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_ie_mvme.c,v 1.9 2006/03/29 07:07:41 thorpej Exp $ */ +/* $NetBSD: if_ie_mvme.c,v 1.10 2007/03/04 06:02:15 christos Exp $ */ /*- * Copyright (c) 1999, 2002 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_ie_mvme.c,v 1.9 2006/03/29 07:07:41 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_ie_mvme.c,v 1.10 2007/03/04 06:02:15 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -297,7 +297,7 @@ ie_pcctwo_attach(parent, self, args) return; } if (bus_dmamem_map(pa->pa_dmat, &seg, rseg, ether_data_buff_size, - (caddr_t *) & sc->sc_maddr, BUS_DMA_NOWAIT | BUS_DMA_COHERENT)) { + (void **) & sc->sc_maddr, BUS_DMA_NOWAIT | BUS_DMA_COHERENT)) { printf("%s: Failed to map ether buffer\n", self->dv_xname); bus_dmamem_free(pa->pa_dmat, &seg, rseg); return; diff --git a/sys/dev/mvme/lpt_mvme.c b/sys/dev/mvme/lpt_mvme.c index 1596c81b983..f63daef8ec7 100644 --- a/sys/dev/mvme/lpt_mvme.c +++ b/sys/dev/mvme/lpt_mvme.c @@ -1,4 +1,4 @@ -/* $NetBSD: lpt_mvme.c,v 1.7 2005/12/11 12:22:48 christos Exp $ */ +/* $NetBSD: lpt_mvme.c,v 1.8 2007/03/04 06:02:15 christos Exp $ */ /*- * Copyright (c) 1999, 2002 The NetBSD Foundation, Inc. @@ -91,7 +91,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: lpt_mvme.c,v 1.7 2005/12/11 12:22:48 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: lpt_mvme.c,v 1.8 2007/03/04 06:02:15 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -207,7 +207,7 @@ lptopen(dev, flag, mode, l) return (EBUSY); } /* wait 1/4 second, give up if we get a signal */ - error = tsleep((caddr_t) sc, LPTPRI | PCATCH, "lptopen", STEP); + error = tsleep((void *) sc, LPTPRI | PCATCH, "lptopen", STEP); if (error != EWOULDBLOCK) { sc->sc_state = 0; return (error); @@ -294,7 +294,7 @@ pushbytes(sc) tic = tic + tic + 1; if (tic > TIMEOUT) tic = TIMEOUT; - error = tsleep((caddr_t) sc, + error = tsleep((void *) sc, LPTPRI | PCATCH, "lptpsh", tic); if (error != EWOULDBLOCK) return (error); @@ -319,7 +319,7 @@ pushbytes(sc) (void) lpt_intr(sc); splx(s); } - error = tsleep((caddr_t) sc, LPTPRI | PCATCH, + error = tsleep((void *) sc, LPTPRI | PCATCH, "lptwrite2", 0); if (error) return (error); @@ -381,7 +381,7 @@ lpt_intr(sc) if (sc->sc_count == 0) { /* none, wake up the top half to get more */ - wakeup((caddr_t) sc); + wakeup((void *) sc); } return (1); @@ -392,7 +392,7 @@ int lptioctl(dev, cmd, data, flag, l) dev_t dev; u_long cmd; - caddr_t data; + void *data; int flag; struct lwp *l; { diff --git a/sys/dev/mvme/mvmebus.c b/sys/dev/mvme/mvmebus.c index 5b698f31bb9..44074764172 100644 --- a/sys/dev/mvme/mvmebus.c +++ b/sys/dev/mvme/mvmebus.c @@ -1,4 +1,4 @@ -/* $NetBSD: mvmebus.c,v 1.10 2005/12/11 12:22:48 christos Exp $ */ +/* $NetBSD: mvmebus.c,v 1.11 2007/03/04 06:02:15 christos Exp $ */ /*- * Copyright (c) 2000, 2002 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: mvmebus.c,v 1.10 2005/12/11 12:22:48 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mvmebus.c,v 1.11 2007/03/04 06:02:15 christos Exp $"); #include <sys/param.h> #include <sys/kernel.h> @@ -871,7 +871,7 @@ mvmebus_dmamem_map(t, segs, nsegs, size, kvap, flags) bus_dma_segment_t *segs; int nsegs; size_t size; - caddr_t *kvap; + void **kvap; int flags; { struct mvmebus_softc *sc = t->_cookie; @@ -882,7 +882,7 @@ mvmebus_dmamem_map(t, segs, nsegs, size, kvap, flags) void mvmebus_dmamem_unmap(t, kva, size) bus_dma_tag_t t; - caddr_t kva; + void *kva; size_t size; { struct mvmebus_softc *sc = t->_cookie; diff --git a/sys/dev/mvme/mvmebus.h b/sys/dev/mvme/mvmebus.h index e2c0c5e6e72..1c40c79f658 100644 --- a/sys/dev/mvme/mvmebus.h +++ b/sys/dev/mvme/mvmebus.h @@ -1,4 +1,4 @@ -/* $NetBSD: mvmebus.h,v 1.1 2002/02/12 20:38:48 scw Exp $ */ +/* $NetBSD: mvmebus.h,v 1.2 2007/03/04 06:02:15 christos Exp $ */ /*- * Copyright (c) 2000, 2002 The NetBSD Foundation, Inc. @@ -150,8 +150,8 @@ int mvmebus_dmamem_alloc(void *, vme_size_t, vme_am_t, vme_datasize_t, vme_swap_t, bus_dma_segment_t *, int, int *, int); void mvmebus_dmamem_free(void *, bus_dma_segment_t *, int); int mvmebus_dmamem_map(bus_dma_tag_t, bus_dma_segment_t *, int, - size_t, caddr_t *, int); -void mvmebus_dmamem_unmap(bus_dma_tag_t, caddr_t, size_t); + size_t, void **, int); +void mvmebus_dmamem_unmap(bus_dma_tag_t, void *, size_t); paddr_t mvmebus_dmamem_mmap(bus_dma_tag_t, bus_dma_segment_t *, int, off_t, int, int); diff --git a/sys/dev/nullcons_subr.c b/sys/dev/nullcons_subr.c index 2a9bbf2cfa5..c187cc5678d 100644 --- a/sys/dev/nullcons_subr.c +++ b/sys/dev/nullcons_subr.c @@ -1,4 +1,4 @@ -/* $NetBSD: nullcons_subr.c,v 1.4 2005/12/11 12:20:53 christos Exp $ */ +/* $NetBSD: nullcons_subr.c,v 1.5 2007/03/04 06:01:43 christos Exp $ */ /*- * Copyright (c) 2003 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: nullcons_subr.c,v 1.4 2005/12/11 12:20:53 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nullcons_subr.c,v 1.5 2007/03/04 06:01:43 christos Exp $"); #include <sys/param.h> #include <sys/proc.h> @@ -88,7 +88,7 @@ int nullcndev_ioctl(dev, cmd, data, flag, l) dev_t dev; u_long cmd; - caddr_t data; + void *data; int flag; struct lwp *l; { diff --git a/sys/dev/ofisa/atppc_ofisa.c b/sys/dev/ofisa/atppc_ofisa.c index 39ca5103e67..82e39f73ddb 100644 --- a/sys/dev/ofisa/atppc_ofisa.c +++ b/sys/dev/ofisa/atppc_ofisa.c @@ -1,4 +1,4 @@ -/* $NetBSD: atppc_ofisa.c,v 1.4 2006/03/29 07:09:33 thorpej Exp $ */ +/* $NetBSD: atppc_ofisa.c,v 1.5 2007/03/04 06:02:15 christos Exp $ */ /*- * Copyright (c) 2004 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: atppc_ofisa.c,v 1.4 2006/03/29 07:09:33 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: atppc_ofisa.c,v 1.5 2007/03/04 06:02:15 christos Exp $"); #include "opt_atppc.h" @@ -76,9 +76,9 @@ static int atppc_ofisa_dma_start(struct atppc_softc *, void *, u_int, u_int8_t); static int atppc_ofisa_dma_finish(struct atppc_softc *); static int atppc_ofisa_dma_abort(struct atppc_softc *); -static int atppc_ofisa_dma_malloc(struct device *, caddr_t *, bus_addr_t *, +static int atppc_ofisa_dma_malloc(struct device *, void **, bus_addr_t *, bus_size_t); -static void atppc_ofisa_dma_free(struct device *, caddr_t *, bus_addr_t *, +static void atppc_ofisa_dma_free(struct device *, void **, bus_addr_t *, bus_size_t); /* * atppc_ofisa_match: autoconf(9) match routine @@ -206,7 +206,7 @@ atppc_ofisa_dma_abort(struct atppc_softc * lsc) /* Allocate memory for DMA over ISA bus */ int -atppc_ofisa_dma_malloc(struct device * dev, caddr_t * buf, bus_addr_t * bus_addr, +atppc_ofisa_dma_malloc(struct device * dev, void ** buf, bus_addr_t * bus_addr, bus_size_t size) { struct atppc_ofisa_softc * sc = (struct atppc_ofisa_softc *) dev; @@ -216,7 +216,7 @@ atppc_ofisa_dma_malloc(struct device * dev, caddr_t * buf, bus_addr_t * bus_addr /* Free memory allocated by atppc_isa_dma_malloc() */ void -atppc_ofisa_dma_free(struct device * dev, caddr_t * buf, bus_addr_t * bus_addr, +atppc_ofisa_dma_free(struct device * dev, void ** buf, bus_addr_t * bus_addr, bus_size_t size) { struct atppc_ofisa_softc * sc = (struct atppc_ofisa_softc *) dev; diff --git a/sys/dev/ofw/ofcons.c b/sys/dev/ofw/ofcons.c index c531c60425b..39910cabbde 100644 --- a/sys/dev/ofw/ofcons.c +++ b/sys/dev/ofw/ofcons.c @@ -1,4 +1,4 @@ -/* $NetBSD: ofcons.c,v 1.29 2006/10/01 19:28:44 elad Exp $ */ +/* $NetBSD: ofcons.c,v 1.30 2007/03/04 06:02:15 christos Exp $ */ /* * Copyright (C) 1995, 1996 Wolfgang Solfrank. @@ -32,7 +32,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ofcons.c,v 1.29 2006/10/01 19:28:44 elad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ofcons.c,v 1.30 2007/03/04 06:02:15 christos Exp $"); #include <sys/param.h> #include <sys/conf.h> @@ -214,7 +214,7 @@ int ofcons_ioctl(dev, cmd, data, flag, l) dev_t dev; u_long cmd; - caddr_t data; + void *data; int flag; struct lwp *l; { diff --git a/sys/dev/ofw/ofdisk.c b/sys/dev/ofw/ofdisk.c index 7300f155e88..67a781c69dd 100644 --- a/sys/dev/ofw/ofdisk.c +++ b/sys/dev/ofw/ofdisk.c @@ -1,4 +1,4 @@ -/* $NetBSD: ofdisk.c,v 1.34 2007/01/29 01:52:45 hubertf Exp $ */ +/* $NetBSD: ofdisk.c,v 1.35 2007/03/04 06:02:15 christos Exp $ */ /* * Copyright (C) 1995, 1996 Wolfgang Solfrank. @@ -32,7 +32,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ofdisk.c,v 1.34 2007/01/29 01:52:45 hubertf Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ofdisk.c,v 1.35 2007/03/04 06:02:15 christos Exp $"); #include <sys/param.h> #include <sys/buf.h> @@ -339,7 +339,7 @@ ofdisk_write(dev_t dev, struct uio *uio, int flags) } int -ofdisk_ioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct lwp *l) +ofdisk_ioctl(dev_t dev, u_long cmd, void *data, int flag, struct lwp *l) { struct ofdisk_softc *of = ofdisk_cd.cd_devs[DISKUNIT(dev)]; int error; @@ -466,7 +466,7 @@ ofdisk_ioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct lwp *l) } int -ofdisk_dump(dev_t dev, daddr_t blkno, caddr_t va, size_t size) +ofdisk_dump(dev_t dev, daddr_t blkno, void *va, size_t size) { return EINVAL; } diff --git a/sys/dev/ofw/ofnet.c b/sys/dev/ofw/ofnet.c index 4343d049767..cb190079c65 100644 --- a/sys/dev/ofw/ofnet.c +++ b/sys/dev/ofw/ofnet.c @@ -1,4 +1,4 @@ -/* $NetBSD: ofnet.c,v 1.37 2006/05/14 21:42:28 elad Exp $ */ +/* $NetBSD: ofnet.c,v 1.38 2007/03/04 06:02:15 christos Exp $ */ /* * Copyright (C) 1995, 1996 Wolfgang Solfrank. @@ -32,7 +32,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ofnet.c,v 1.37 2006/05/14 21:42:28 elad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ofnet.c,v 1.38 2007/03/04 06:02:15 christos Exp $"); #include "ofnet.h" #include "opt_inet.h" @@ -96,7 +96,7 @@ static void ofnet_init (struct ofnet_softc *); static void ofnet_stop (struct ofnet_softc *); static void ofnet_start (struct ifnet *); -static int ofnet_ioctl (struct ifnet *, u_long, caddr_t); +static int ofnet_ioctl (struct ifnet *, u_long, void *); static void ofnet_watchdog (struct ifnet *); static int @@ -245,7 +245,7 @@ ofnet_read(struct ofnet_softc *of) * XXX then so does other code in this driver. */ if (head == NULL) { - caddr_t newdata = (caddr_t)ALIGN(m->m_data + + void *newdata = (void *)ALIGN(m->m_data + sizeof(struct ether_header)) - sizeof(struct ether_header); l -= newdata - m->m_data; @@ -366,7 +366,7 @@ ofnet_start(struct ifnet *ifp) } static int -ofnet_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) +ofnet_ioctl(struct ifnet *ifp, u_long cmd, void *data) { struct ofnet_softc *of = ifp->if_softc; struct ifaddr *ifa = (struct ifaddr *)data; diff --git a/sys/dev/ofw/openfirmio.c b/sys/dev/ofw/openfirmio.c index 70d17b45d42..e708db01248 100644 --- a/sys/dev/ofw/openfirmio.c +++ b/sys/dev/ofw/openfirmio.c @@ -1,4 +1,4 @@ -/* $NetBSD: openfirmio.c,v 1.10 2007/02/28 20:33:50 macallan Exp $ */ +/* $NetBSD: openfirmio.c,v 1.11 2007/03/04 06:02:15 christos Exp $ */ /* * Copyright (c) 1992, 1993 @@ -41,7 +41,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: openfirmio.c,v 1.10 2007/02/28 20:33:50 macallan Exp $"); +__KERNEL_RCSID(0, "$NetBSD: openfirmio.c,v 1.11 2007/03/04 06:02:15 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -108,7 +108,7 @@ openfirmgetstr(int len, char *user, char **cpp) } int -openfirmioctl(dev_t dev, u_long cmd, caddr_t data, int flags, struct lwp *l) +openfirmioctl(dev_t dev, u_long cmd, void *data, int flags, struct lwp *l) { struct ofiocdesc *of; int node, len, ok, error, s; diff --git a/sys/dev/pci/agp.c b/sys/dev/pci/agp.c index 793670d3257..ce5ae96eccd 100644 --- a/sys/dev/pci/agp.c +++ b/sys/dev/pci/agp.c @@ -1,4 +1,4 @@ -/* $NetBSD: agp.c,v 1.44 2006/12/18 12:01:48 christos Exp $ */ +/* $NetBSD: agp.c,v 1.45 2007/03/04 06:02:15 christos Exp $ */ /*- * Copyright (c) 2000 Doug Rabson @@ -65,7 +65,7 @@ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: agp.c,v 1.44 2006/12/18 12:01:48 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: agp.c,v 1.45 2007/03/04 06:02:15 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -318,7 +318,7 @@ agp_alloc_gatt(struct agp_softc *sc) u_int32_t apsize = AGP_GET_APERTURE(sc); u_int32_t entries = apsize >> AGP_PAGE_SHIFT; struct agp_gatt *gatt; - caddr_t virtual; + void *virtual; int dummyseg; gatt = malloc(sizeof(struct agp_gatt), M_AGP, M_NOWAIT); @@ -343,7 +343,7 @@ void agp_free_gatt(struct agp_softc *sc, struct agp_gatt *gatt) { agp_free_dmamem(sc->as_dmat, gatt->ag_size, gatt->ag_dmamap, - (caddr_t)gatt->ag_virtual, &gatt->ag_dmaseg, 1); + (void *)gatt->ag_virtual, &gatt->ag_dmaseg, 1); free(gatt, M_AGP); } @@ -834,7 +834,7 @@ agpclose(dev_t dev, int fflag, int devtype, } static int -agpioctl(dev_t dev, u_long cmd, caddr_t data, int fflag, struct lwp *l) +agpioctl(dev_t dev, u_long cmd, void *data, int fflag, struct lwp *l) { struct agp_softc *sc = device_lookup(&agp_cd, AGPUNIT(dev)); @@ -982,7 +982,7 @@ void agp_memory_info(void *dev, void *handle, int agp_alloc_dmamem(bus_dma_tag_t tag, size_t size, int flags, - bus_dmamap_t *mapp, caddr_t *vaddr, bus_addr_t *baddr, + bus_dmamap_t *mapp, void **vaddr, bus_addr_t *baddr, bus_dma_segment_t *seg, int nseg, int *rseg) { @@ -1030,7 +1030,7 @@ out: void agp_free_dmamem(bus_dma_tag_t tag, size_t size, bus_dmamap_t map, - caddr_t vaddr, bus_dma_segment_t *seg, int nseg) + void *vaddr, bus_dma_segment_t *seg, int nseg) { bus_dmamap_unload(tag, map); diff --git a/sys/dev/pci/agp_amd.c b/sys/dev/pci/agp_amd.c index cf499a4d48b..4966c7c8526 100644 --- a/sys/dev/pci/agp_amd.c +++ b/sys/dev/pci/agp_amd.c @@ -1,4 +1,4 @@ -/* $NetBSD: agp_amd.c,v 1.17 2006/11/16 01:33:08 christos Exp $ */ +/* $NetBSD: agp_amd.c,v 1.18 2007/03/04 06:02:15 christos Exp $ */ /*- * Copyright (c) 2000 Doug Rabson @@ -29,7 +29,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: agp_amd.c,v 1.17 2006/11/16 01:33:08 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: agp_amd.c,v 1.18 2007/03/04 06:02:15 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -102,7 +102,7 @@ agp_amd_alloc_gatt(struct agp_softc *sc) u_int32_t entries = apsize >> AGP_PAGE_SHIFT; struct agp_amd_gatt *gatt; int i, npages; - caddr_t vdir; + void *vdir; gatt = malloc(sizeof(struct agp_amd_gatt), M_AGP, M_NOWAIT); if (!gatt) @@ -119,7 +119,7 @@ agp_amd_alloc_gatt(struct agp_softc *sc) gatt->ag_vdir = (u_int32_t *)vdir; gatt->ag_entries = entries; - gatt->ag_virtual = (u_int32_t *)(vdir + AGP_PAGE_SIZE); + gatt->ag_virtual = (u_int32_t *)((char *)vdir + AGP_PAGE_SIZE); gatt->ag_physical = gatt->ag_pdir + AGP_PAGE_SIZE; gatt->ag_size = AGP_PAGE_SIZE + entries * sizeof(u_int32_t); @@ -148,7 +148,7 @@ static void agp_amd_free_gatt(struct agp_softc *sc, struct agp_amd_gatt *gatt) { agp_free_dmamem(sc->as_dmat, gatt->ag_size, - gatt->ag_dmamap, (caddr_t)gatt->ag_virtual, &gatt->ag_dmaseg, + gatt->ag_dmamap, (void *)gatt->ag_virtual, &gatt->ag_dmaseg, gatt->ag_nseg); free(gatt, M_AGP); } diff --git a/sys/dev/pci/agp_i810.c b/sys/dev/pci/agp_i810.c index e7fdbbeaa22..6c8c34123d0 100644 --- a/sys/dev/pci/agp_i810.c +++ b/sys/dev/pci/agp_i810.c @@ -1,4 +1,4 @@ -/* $NetBSD: agp_i810.c,v 1.35 2006/11/16 01:33:08 christos Exp $ */ +/* $NetBSD: agp_i810.c,v 1.36 2007/03/04 06:02:15 christos Exp $ */ /*- * Copyright (c) 2000 Doug Rabson @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: agp_i810.c,v 1.35 2006/11/16 01:33:08 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: agp_i810.c,v 1.36 2007/03/04 06:02:15 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -255,7 +255,7 @@ agp_i810_attach(struct device *parent, struct device *self, void *aux) gatt->ag_entries = AGP_GET_APERTURE(sc) >> AGP_PAGE_SHIFT; if (isc->chiptype == CHIP_I810) { - caddr_t virtual; + void *virtual; int dummyseg; /* Some i810s have on-chip memory called dcache */ @@ -436,7 +436,7 @@ agp_i810_detach(struct agp_softc *sc) if (sc->chiptype == CHIP_I810) { agp_free_dmamem(sc->as_dmat, gatt->ag_size, gatt->ag_dmamap, - (caddr_t)gatt->ag_virtual, &gatt->ag_dmaseg, 1); + (void *)gatt->ag_virtual, &gatt->ag_dmaseg, 1); } free(sc->gatt, M_AGP); diff --git a/sys/dev/pci/agpvar.h b/sys/dev/pci/agpvar.h index a6f66887ecc..6764b8bc380 100644 --- a/sys/dev/pci/agpvar.h +++ b/sys/dev/pci/agpvar.h @@ -1,4 +1,4 @@ -/* $NetBSD: agpvar.h,v 1.12 2006/08/17 17:11:28 christos Exp $ */ +/* $NetBSD: agpvar.h,v 1.13 2007/03/04 06:02:16 christos Exp $ */ /*- * Copyright (c) 2000 Doug Rabson @@ -92,7 +92,7 @@ struct agp_memory { off_t am_offset; /* page offset if bound */ int am_is_bound; /* non-zero if bound */ bus_addr_t am_physical; - caddr_t am_virtual; + void * am_virtual; bus_dmamap_t am_dmamap; bus_dma_segment_t *am_dmaseg; int am_nseg; @@ -189,9 +189,9 @@ int agp_intel_attach(struct device *, struct device *, void *); int agp_via_attach(struct device *, struct device *, void *); int agp_sis_attach(struct device *, struct device *, void *); -int agp_alloc_dmamem(bus_dma_tag_t, size_t, int, bus_dmamap_t *, caddr_t *, +int agp_alloc_dmamem(bus_dma_tag_t, size_t, int, bus_dmamap_t *, void **, bus_addr_t *, bus_dma_segment_t *, int, int *); -void agp_free_dmamem(bus_dma_tag_t, size_t, bus_dmamap_t, caddr_t, +void agp_free_dmamem(bus_dma_tag_t, size_t, bus_dmamap_t, void *, bus_dma_segment_t *, int) ; MALLOC_DECLARE(M_AGP); diff --git a/sys/dev/pci/ahcisata.c b/sys/dev/pci/ahcisata.c index 407189b513e..091d9ea8e05 100644 --- a/sys/dev/pci/ahcisata.c +++ b/sys/dev/pci/ahcisata.c @@ -1,4 +1,4 @@ -/* $NetBSD: ahcisata.c,v 1.3 2007/01/03 18:58:26 bouyer Exp $ */ +/* $NetBSD: ahcisata.c,v 1.4 2007/03/04 06:02:16 christos Exp $ */ /* * Copyright (c) 2006 Manuel Bouyer. @@ -31,7 +31,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ahcisata.c,v 1.3 2007/01/03 18:58:26 bouyer Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ahcisata.c,v 1.4 2007/03/04 06:02:16 christos Exp $"); #include <sys/types.h> #include <sys/malloc.h> @@ -72,7 +72,7 @@ struct ahci_softc { bus_space_tag_t sc_ahcit; /* ahci registers mapping */ bus_space_handle_t sc_ahcih; bus_dma_tag_t sc_dmat; /* DMA memory mappings: */ - caddr_t sc_cmd_hdr; /* command tables and received FIS */ + void *sc_cmd_hdr; /* command tables and received FIS */ bus_dmamap_t sc_cmd_hdrd; int sc_ncmds; /* number of command slots */ @@ -100,10 +100,10 @@ struct ahci_softc { #define AHCI_CMDH_SYNC(sc, achp, cmd, op) bus_dmamap_sync((sc)->sc_dmat, \ (sc)->sc_cmd_hdrd, \ - (caddr_t)(&(achp)->ahcic_cmdh[(cmd)]) - (sc)->sc_cmd_hdr, \ + (char *)(&(achp)->ahcic_cmdh[(cmd)]) - (char *)(sc)->sc_cmd_hdr, \ sizeof(struct ahci_cmd_header), (op)) #define AHCI_RFIS_SYNC(sc, achp, op) bus_dmamap_sync((sc)->sc_dmat, \ - (sc)->sc_cmd_hdrd, (caddr_t)(achp)->ahcic_rfis - (sc)->sc_cmd_hdr, \ + (sc)->sc_cmd_hdrd, (void *)(achp)->ahcic_rfis - (sc)->sc_cmd_hdr, \ AHCI_RFIS_SIZE, (op)) #define AHCI_CMDTBL_SYNC(sc, achp, cmd, op) bus_dmamap_sync((sc)->sc_dmat, \ (achp)->ahcic_cmd_tbld, AHCI_CMDTBL_SIZE * (cmd), \ @@ -202,8 +202,8 @@ ahci_attach(struct device *parent, struct device *self, void *aux) bus_dma_segment_t seg; int rseg; int dmasize; - caddr_t cmdhp; - caddr_t cmdtblp; + void *cmdhp; + void *cmdtblp; const char *intrstr; pci_intr_handle_t intrhandle; void *ih; @@ -364,11 +364,11 @@ ahci_attach(struct device *parent, struct device *self, void *aux) break; } achp->ahcic_cmdh = (struct ahci_cmd_header *) - (cmdhp + AHCI_CMDH_SIZE * port); + ((char *)cmdhp + AHCI_CMDH_SIZE * port); achp->ahcic_bus_cmdh = sc->sc_cmd_hdrd->dm_segs[0].ds_addr + AHCI_CMDH_SIZE * port; achp->ahcic_rfis = (struct ahci_r_fis *) - (cmdhp + + ((char *)cmdhp + AHCI_CMDH_SIZE * sc->sc_atac.atac_nchannels + AHCI_RFIS_SIZE * port); achp->ahcic_bus_rfis = sc->sc_cmd_hdrd->dm_segs[0].ds_addr + @@ -381,7 +381,7 @@ ahci_attach(struct device *parent, struct device *self, void *aux) for (j = 0; j < sc->sc_ncmds; j++) { achp->ahcic_cmd_tbl[j] = (struct ahci_cmd_tbl *) - (cmdtblp + AHCI_CMDTBL_SIZE * j); + ((char *)cmdtblp + AHCI_CMDTBL_SIZE * j); achp->ahcic_bus_cmd_tbl[j] = achp->ahcic_cmd_tbld->dm_segs[0].ds_addr + AHCI_CMDTBL_SIZE * j; diff --git a/sys/dev/pci/amr.c b/sys/dev/pci/amr.c index 0e4ff882cc4..89c02268a1c 100644 --- a/sys/dev/pci/amr.c +++ b/sys/dev/pci/amr.c @@ -1,4 +1,4 @@ -/* $NetBSD: amr.c,v 1.43 2006/12/02 03:10:43 elad Exp $ */ +/* $NetBSD: amr.c,v 1.44 2007/03/04 06:02:16 christos Exp $ */ /*- * Copyright (c) 2002, 2003 The NetBSD Foundation, Inc. @@ -71,7 +71,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: amr.c,v 1.43 2006/12/02 03:10:43 elad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: amr.c,v 1.44 2007/03/04 06:02:16 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -367,7 +367,7 @@ amr_attach(struct device *parent, struct device *self, void *aux) amr->amr_flags |= AMRF_DMA_ALLOC; if ((rv = bus_dmamem_map(amr->amr_dmat, &amr->amr_dmaseg, rseg, size, - (caddr_t *)&amr->amr_mbox, + (void **)&amr->amr_mbox, BUS_DMA_NOWAIT | BUS_DMA_COHERENT)) != 0) { aprint_error("%s: unable to map buffer, rv = %d\n", amr->amr_dv.dv_xname, rv); @@ -398,7 +398,7 @@ amr_attach(struct device *parent, struct device *self, void *aux) amr->amr_mbox_paddr = amr->amr_dmamap->dm_segs[0].ds_addr; amr->amr_sgls_paddr = (amr->amr_mbox_paddr + 0x1fff) & ~0x1fff; - amr->amr_sgls = (struct amr_sgentry *)((caddr_t)amr->amr_mbox + + amr->amr_sgls = (struct amr_sgentry *)((char *)amr->amr_mbox + amr->amr_sgls_paddr - amr->amr_dmamap->dm_segs[0].ds_addr); /* @@ -523,7 +523,7 @@ amr_teardown(struct amr_softc *amr) if ((fl & AMRF_DMA_LOAD) != 0) bus_dmamap_unload(amr->amr_dmat, amr->amr_dmamap); if ((fl & AMRF_DMA_MAP) != 0) - bus_dmamem_unmap(amr->amr_dmat, (caddr_t)amr->amr_mbox, + bus_dmamem_unmap(amr->amr_dmat, (void *)amr->amr_mbox, amr->amr_dmasize); if ((fl & AMRF_DMA_ALLOC) != 0) bus_dmamem_free(amr->amr_dmat, &amr->amr_dmaseg, 1); @@ -1077,7 +1077,7 @@ amr_ccb_map(struct amr_softc *amr, struct amr_ccb *ac, void *data, int size, mb->mb_nsgelem = nsegs; mb->mb_physaddr = htole32(amr->amr_sgls_paddr + sgloff); - sge = (struct amr_sgentry *)((caddr_t)amr->amr_sgls + sgloff); + sge = (struct amr_sgentry *)((char *)amr->amr_sgls + sgloff); for (i = 0; i < nsegs; i++, sge++) { sge->sge_addr = htole32(xfer->dm_segs[i].ds_addr); sge->sge_count = htole32(xfer->dm_segs[i].ds_len); @@ -1356,7 +1356,7 @@ amrclose(dev_t dev, int flag, int mode, struct lwp *l) } static int -amrioctl(dev_t dev, u_long cmd, caddr_t data, int flag, +amrioctl(dev_t dev, u_long cmd, void *data, int flag, struct lwp *l) { struct amr_softc *amr; diff --git a/sys/dev/pci/atppc_puc.c b/sys/dev/pci/atppc_puc.c index e668523de56..fba4f842b53 100644 --- a/sys/dev/pci/atppc_puc.c +++ b/sys/dev/pci/atppc_puc.c @@ -1,4 +1,4 @@ -/* $NetBSD: atppc_puc.c,v 1.4 2005/12/11 12:22:48 christos Exp $ */ +/* $NetBSD: atppc_puc.c,v 1.5 2007/03/04 06:02:16 christos Exp $ */ /*- * Copyright (c) 2004 The NetBSD Foundation, Inc. @@ -39,7 +39,7 @@ #include "opt_atppc.h" #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: atppc_puc.c,v 1.4 2005/12/11 12:22:48 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: atppc_puc.c,v 1.5 2007/03/04 06:02:16 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -76,9 +76,9 @@ static int atppc_puc_dma_start(struct atppc_softc *, void *, u_int, u_int8_t); static int atppc_puc_dma_finish(struct atppc_softc *); static int atppc_puc_dma_abort(struct atppc_softc *); -static int atppc_puc_dma_malloc(struct device *, caddr_t *, bus_addr_t *, +static int atppc_puc_dma_malloc(struct device *, void **, bus_addr_t *, bus_size_t); -static void atppc_puc_dma_free(struct device *, caddr_t *, bus_addr_t *, +static void atppc_puc_dma_free(struct device *, void **, bus_addr_t *, bus_size_t); /* @@ -210,7 +210,7 @@ atppc_puc_dma_abort(struct atppc_softc * lsc) /* Allocate memory for DMA over PCI bus */ int -atppc_puc_dma_malloc(struct device *dev, caddr_t *buf, bus_addr_t *bus_addr, +atppc_puc_dma_malloc(struct device *dev, void **buf, bus_addr_t *bus_addr, bus_size_t size) { struct atppc_puc_softc *psc = (struct atppc_puc_softc *) dev; @@ -228,7 +228,7 @@ atppc_puc_dma_malloc(struct device *dev, caddr_t *buf, bus_addr_t *bus_addr, /* Free memory allocated by atppc_isa_dma_malloc() */ void -atppc_puc_dma_free(struct device *dev, caddr_t *buf, bus_addr_t *bus_addr, +atppc_puc_dma_free(struct device *dev, void **buf, bus_addr_t *bus_addr, bus_size_t size) { struct atppc_puc_softc *psc = (struct atppc_puc_softc *) dev; diff --git a/sys/dev/pci/auacer.c b/sys/dev/pci/auacer.c index d9e8607036b..1eafab4a73a 100644 --- a/sys/dev/pci/auacer.c +++ b/sys/dev/pci/auacer.c @@ -1,4 +1,4 @@ -/* $NetBSD: auacer.c,v 1.15 2006/11/16 01:33:08 christos Exp $ */ +/* $NetBSD: auacer.c,v 1.16 2007/03/04 06:02:16 christos Exp $ */ /*- * Copyright (c) 2004 The NetBSD Foundation, Inc. @@ -51,7 +51,7 @@ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: auacer.c,v 1.15 2006/11/16 01:33:08 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: auacer.c,v 1.16 2007/03/04 06:02:16 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -79,7 +79,7 @@ __KERNEL_RCSID(0, "$NetBSD: auacer.c,v 1.15 2006/11/16 01:33:08 christos Exp $") struct auacer_dma { bus_dmamap_t map; - caddr_t addr; + void *addr; bus_dma_segment_t segs[1]; int nsegs; size_t size; @@ -994,7 +994,7 @@ auacer_alloc_cdata(struct auacer_softc *sc) if ((error = bus_dmamem_map(sc->dmat, &seg, rseg, sizeof(struct auacer_cdata), - (caddr_t *) &sc->sc_cdata, + (void **) &sc->sc_cdata, sc->sc_dmamap_flags)) != 0) { printf("%s: unable to map control data, error = %d\n", sc->sc_dev.dv_xname, error); @@ -1022,7 +1022,7 @@ auacer_alloc_cdata(struct auacer_softc *sc) fail_3: bus_dmamap_destroy(sc->dmat, sc->sc_cddmamap); fail_2: - bus_dmamem_unmap(sc->dmat, (caddr_t) sc->sc_cdata, + bus_dmamem_unmap(sc->dmat, (void *) sc->sc_cdata, sizeof(struct auacer_cdata)); fail_1: bus_dmamem_free(sc->dmat, &seg, rseg); diff --git a/sys/dev/pci/auich.c b/sys/dev/pci/auich.c index 3f18f075423..37cb5d4c361 100644 --- a/sys/dev/pci/auich.c +++ b/sys/dev/pci/auich.c @@ -1,4 +1,4 @@ -/* $NetBSD: auich.c,v 1.116 2007/02/21 23:00:00 thorpej Exp $ */ +/* $NetBSD: auich.c,v 1.117 2007/03/04 06:02:16 christos Exp $ */ /*- * Copyright (c) 2000, 2004, 2005 The NetBSD Foundation, Inc. @@ -118,7 +118,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: auich.c,v 1.116 2007/02/21 23:00:00 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: auich.c,v 1.117 2007/03/04 06:02:16 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -147,7 +147,7 @@ __KERNEL_RCSID(0, "$NetBSD: auich.c,v 1.116 2007/02/21 23:00:00 thorpej Exp $"); struct auich_dma { bus_dmamap_t map; - caddr_t addr; + void *addr; bus_dma_segment_t segs[1]; int nsegs; size_t size; @@ -1422,7 +1422,7 @@ auich_trigger_output(void *v, void *start, void *end, int blksize, return EINVAL; } - size = (size_t)((caddr_t)end - (caddr_t)start); + size = (size_t)((char *)end - (char *)start); sc->pcmo.intr = intr; sc->pcmo.arg = arg; @@ -1458,7 +1458,7 @@ auich_trigger_input(void *v, void *start, void *end, int blksize, return EINVAL; } - size = (size_t)((caddr_t)end - (caddr_t)start); + size = (size_t)((char *)end - (char *)start); sc->pcmi.intr = intr; sc->pcmi.arg = arg; @@ -1573,7 +1573,7 @@ auich_alloc_cdata(struct auich_softc *sc) if ((error = bus_dmamem_map(sc->dmat, &seg, rseg, sizeof(struct auich_cdata), - (caddr_t *) &sc->sc_cdata, + (void **) &sc->sc_cdata, sc->sc_dmamap_flags)) != 0) { printf("%s: unable to map control data, error = %d\n", sc->sc_dev.dv_xname, error); @@ -1605,7 +1605,7 @@ auich_alloc_cdata(struct auich_softc *sc) fail_3: bus_dmamap_destroy(sc->dmat, sc->sc_cddmamap); fail_2: - bus_dmamem_unmap(sc->dmat, (caddr_t) sc->sc_cdata, + bus_dmamem_unmap(sc->dmat, (void *) sc->sc_cdata, sizeof(struct auich_cdata)); fail_1: bus_dmamem_free(sc->dmat, &seg, rseg); diff --git a/sys/dev/pci/auixp.c b/sys/dev/pci/auixp.c index 8843c23e7ea..b7ebdd8e466 100644 --- a/sys/dev/pci/auixp.c +++ b/sys/dev/pci/auixp.c @@ -1,4 +1,4 @@ -/* $NetBSD: auixp.c,v 1.21 2006/11/16 01:33:08 christos Exp $ */ +/* $NetBSD: auixp.c,v 1.22 2007/03/04 06:02:16 christos Exp $ */ /* * Copyright (c) 2004, 2005 Reinoud Zandijk <reinoud@netbsd.org> @@ -50,7 +50,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: auixp.c,v 1.21 2006/11/16 01:33:08 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: auixp.c,v 1.22 2007/03/04 06:02:16 christos Exp $"); #include <sys/types.h> #include <sys/errno.h> @@ -775,7 +775,7 @@ auixp_trigger_output(void *hdl, void *start, void *end, int blksize, * NOTE, we can assume its in one block since we asked for it to be in * one contiguous blob; XXX change this? XXX */ - blocks = (size_t) (((caddr_t) end) - ((caddr_t) start)) / blksize; + blocks = (size_t) (((char *) end) - ((char *) start)) / blksize; /* lookup `start' address in our list of DMA area's */ SLIST_FOREACH(sound_dma, &sc->sc_dma_list, dma_chain) { @@ -850,7 +850,7 @@ auixp_trigger_input(void *hdl, void *start, void *end, int blksize, * NOTE, we can assume its in one block since we asked for it to be in * one contiguous blob; XXX change this? XXX */ - blocks = (size_t) (((caddr_t) end) - ((caddr_t) start)) / blksize; + blocks = (size_t) (((char *) end) - ((char *) start)) / blksize; /* lookup `start' address in our list of DMA area's */ SLIST_FOREACH(sound_dma, &sc->sc_dma_list, dma_chain) { diff --git a/sys/dev/pci/auixpvar.h b/sys/dev/pci/auixpvar.h index 3b23fd92838..00c4843f0d4 100644 --- a/sys/dev/pci/auixpvar.h +++ b/sys/dev/pci/auixpvar.h @@ -1,4 +1,4 @@ -/* $NetBSD: auixpvar.h,v 1.4 2005/12/11 12:22:48 christos Exp $*/ +/* $NetBSD: auixpvar.h,v 1.5 2007/03/04 06:02:16 christos Exp $*/ /* * Copyright (c) 2004, 2005 Reinoud Zandijk <reinoud@netbsd.org> @@ -64,7 +64,7 @@ static const struct audio_format auixp_formats[AUIXP_NFORMATS] = { struct auixp_dma { /* bus mappings */ bus_dmamap_t map; - caddr_t addr; + void * addr; bus_dma_segment_t segs[1]; int nsegs; size_t size; diff --git a/sys/dev/pci/autrivar.h b/sys/dev/pci/autrivar.h index cb79c11877a..87b2e5d90f4 100644 --- a/sys/dev/pci/autrivar.h +++ b/sys/dev/pci/autrivar.h @@ -1,4 +1,4 @@ -/* $NetBSD: autrivar.h,v 1.2 2001/11/18 17:15:48 augustss Exp $ */ +/* $NetBSD: autrivar.h,v 1.3 2007/03/04 06:02:16 christos Exp $ */ /* * Copyright (c) 2001 SOMEYA Yoshihiko and KUROSAWA Takahiro. @@ -33,7 +33,7 @@ */ struct autri_dma { bus_dmamap_t map; - caddr_t addr; /* VA */ + void * addr; /* VA */ bus_dma_segment_t segs[1]; int nsegs; size_t size; diff --git a/sys/dev/pci/auvia.c b/sys/dev/pci/auvia.c index 0c37721f9a9..bad34ff3308 100644 --- a/sys/dev/pci/auvia.c +++ b/sys/dev/pci/auvia.c @@ -1,4 +1,4 @@ -/* $NetBSD: auvia.c,v 1.59 2007/02/21 23:00:00 thorpej Exp $ */ +/* $NetBSD: auvia.c,v 1.60 2007/03/04 06:02:16 christos Exp $ */ /*- * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -47,7 +47,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: auvia.c,v 1.59 2007/02/21 23:00:00 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: auvia.c,v 1.60 2007/03/04 06:02:16 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -71,7 +71,7 @@ __KERNEL_RCSID(0, "$NetBSD: auvia.c,v 1.59 2007/02/21 23:00:00 thorpej Exp $"); struct auvia_dma { struct auvia_dma *next; - caddr_t addr; + void *addr; size_t size; bus_dmamap_t map; bus_dma_segment_t seg; diff --git a/sys/dev/pci/azalia.c b/sys/dev/pci/azalia.c index af35a887202..ff4b4224f12 100644 --- a/sys/dev/pci/azalia.c +++ b/sys/dev/pci/azalia.c @@ -1,4 +1,4 @@ -/* $NetBSD: azalia.c,v 1.44 2007/02/21 23:00:00 thorpej Exp $ */ +/* $NetBSD: azalia.c,v 1.45 2007/03/04 06:02:17 christos Exp $ */ /*- * Copyright (c) 2005 The NetBSD Foundation, Inc. @@ -48,7 +48,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: azalia.c,v 1.44 2007/02/21 23:00:00 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: azalia.c,v 1.45 2007/03/04 06:02:17 christos Exp $"); #include <sys/param.h> #include <sys/device.h> @@ -78,7 +78,7 @@ __KERNEL_RCSID(0, "$NetBSD: azalia.c,v 1.44 2007/02/21 23:00:00 thorpej Exp $"); typedef struct { bus_dmamap_t map; - caddr_t addr; /* kernel virtual address */ + void *addr; /* kernel virtual address */ bus_dma_segment_t segments[1]; size_t size; } azalia_dma_t; @@ -1870,7 +1870,7 @@ azalia_stream_start(stream_t *this, void *start, void *end, int blk, /* setup BDL */ dmaaddr = AZALIA_DMA_DMAADDR(&this->buffer); - this->dmaend = dmaaddr + ((caddr_t)end - (caddr_t)start); + this->dmaend = dmaaddr + ((char *)end - (char *)start); bdlist = (bdlist_entry_t*)this->bdlist.addr; for (index = 0; index < HDA_BDL_MAX; index++) { bdlist[index].low = dmaaddr; @@ -1893,7 +1893,7 @@ azalia_stream_start(stream_t *this, void *start, void *end, int blk, ctl2 = STR_READ_1(this, CTL2); STR_WRITE_1(this, CTL2, (ctl2 & ~HDA_SD_CTL2_STRM) | (this->number << HDA_SD_CTL2_STRM_SHIFT)); - STR_WRITE_4(this, CBL, ((caddr_t)end - (caddr_t)start)); + STR_WRITE_4(this, CBL, ((char *)end - (char *)start)); STR_WRITE_2(this, FMT, fmt); diff --git a/sys/dev/pci/bktr/bktr_core.c b/sys/dev/pci/bktr/bktr_core.c index b7bb88c8635..8e056a3531c 100644 --- a/sys/dev/pci/bktr/bktr_core.c +++ b/sys/dev/pci/bktr/bktr_core.c @@ -1,6 +1,6 @@ /* $SourceForge: bktr_core.c,v 1.6 2003/03/11 23:11:22 thomasklausner Exp $ */ -/* $NetBSD: bktr_core.c,v 1.41 2007/02/09 21:55:29 ad Exp $ */ +/* $NetBSD: bktr_core.c,v 1.42 2007/03/04 06:02:27 christos Exp $ */ /* $FreeBSD: src/sys/dev/bktr/bktr_core.c,v 1.114 2000/10/31 13:09:56 roger Exp$ */ /* @@ -98,7 +98,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: bktr_core.c,v 1.41 2007/02/09 21:55:29 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: bktr_core.c,v 1.42 2007/03/04 06:02:27 christos Exp $"); #include "opt_bktr.h" /* Include any kernel config options */ @@ -453,7 +453,7 @@ static void remote_read(bktr_ptr_t bktr, struct bktr_remote *remote); /* * ioctls common to both video & tuner. */ -static int common_ioctl(bktr_ptr_t bktr, ioctl_cmd_t cmd, caddr_t arg); +static int common_ioctl(bktr_ptr_t bktr, ioctl_cmd_t cmd, void *arg); #if !defined(BKTR_USE_FREEBSD_SMBUS) @@ -566,7 +566,7 @@ bktr_store_address(unit, BKTR_MEM_BUF, sbuf); if (sbuf != 0) { bktr->bigbuf = sbuf; bktr->alloc_pages = BROOKTREE_ALLOC_PAGES; - bzero((caddr_t) bktr->bigbuf, BROOKTREE_ALLOC); + bzero((void *) bktr->bigbuf, BROOKTREE_ALLOC); } else { bktr->alloc_pages = 0; } @@ -1082,8 +1082,8 @@ vbi_open(bktr_ptr_t bktr) bktr->vbi_sequence_number = 0; bktr->vbi_read_blocked = FALSE; - bzero((caddr_t) bktr->vbibuffer, VBI_BUFFER_SIZE); - bzero((caddr_t) bktr->vbidata, VBI_DATA_SIZE); + bzero((void *) bktr->vbibuffer, VBI_BUFFER_SIZE); + bzero((void *) bktr->vbidata, VBI_DATA_SIZE); return(0); } @@ -1217,7 +1217,7 @@ video_read(bktr_ptr_t bktr, int unit, dev_t dev, status = tsleep(BKTR_SLEEP, BKTRPRI, "captur", 0); if (!status) /* successful capture */ - status = uiomove((caddr_t)bktr->bigbuf, count, uio); + status = uiomove((void *)bktr->bigbuf, count, uio); else printf ("%s: read: tsleep error %d\n", bktr_name(bktr), status); @@ -1267,11 +1267,11 @@ vbi_read(bktr_ptr_t bktr, struct uio *uio, int ioflag) /* We need to wrap around */ readsize2 = VBI_BUFFER_SIZE - bktr->vbistart; - status = uiomove((caddr_t)bktr->vbibuffer + bktr->vbistart, readsize2, uio); - status += uiomove((caddr_t)bktr->vbibuffer, (readsize - readsize2), uio); + status = uiomove((char *)bktr->vbibuffer + bktr->vbistart, readsize2, uio); + status += uiomove((char *)bktr->vbibuffer, (readsize - readsize2), uio); } else { /* We do not need to wrap around */ - status = uiomove((caddr_t)bktr->vbibuffer + bktr->vbistart, readsize, uio); + status = uiomove((char *)bktr->vbibuffer + bktr->vbistart, readsize, uio); } /* Update the number of bytes left to read */ @@ -1292,10 +1292,10 @@ vbi_read(bktr_ptr_t bktr, struct uio *uio, int ioflag) */ #ifdef __FreeBSD__ int -video_ioctl(bktr_ptr_t bktr, int unit, ioctl_cmd_t cmd, caddr_t arg, struct thread* td) +video_ioctl(bktr_ptr_t bktr, int unit, ioctl_cmd_t cmd, void *arg, struct thread* td) #else int -video_ioctl(bktr_ptr_t bktr, int unit, ioctl_cmd_t cmd, caddr_t arg, +video_ioctl(bktr_ptr_t bktr, int unit, ioctl_cmd_t cmd, void *arg, struct lwp* l) #endif { @@ -1915,10 +1915,10 @@ video_ioctl(bktr_ptr_t bktr, int unit, ioctl_cmd_t cmd, caddr_t arg, */ #ifdef __FreeBSD__ int -tuner_ioctl(bktr_ptr_t bktr, int unit, ioctl_cmd_t cmd, caddr_t arg, struct thread* td) +tuner_ioctl(bktr_ptr_t bktr, int unit, ioctl_cmd_t cmd, void *arg, struct thread* td) #else int -tuner_ioctl(bktr_ptr_t bktr, int unit, ioctl_cmd_t cmd, caddr_t arg, +tuner_ioctl(bktr_ptr_t bktr, int unit, ioctl_cmd_t cmd, void *arg, struct lwp* l) #endif { @@ -2330,7 +2330,7 @@ tuner_ioctl(bktr_ptr_t bktr, int unit, ioctl_cmd_t cmd, caddr_t arg, * common ioctls */ static int -common_ioctl(bktr_ptr_t bktr, ioctl_cmd_t cmd, caddr_t arg) +common_ioctl(bktr_ptr_t bktr, ioctl_cmd_t cmd, void *arg) { int pixfmt; unsigned int temp; @@ -3647,7 +3647,7 @@ start_capture(bktr_ptr_t bktr, unsigned type) /* If requested, clear out capture buf first */ if (bktr->clr_on_start && (bktr->video.addr == 0)) { - bzero((caddr_t)bktr->bigbuf, + bzero((void *)bktr->bigbuf, (size_t)bktr->rows * bktr->cols * bktr->frames * pixfmt_table[bktr->pixfmt].public.Bpp); } diff --git a/sys/dev/pci/bktr/bktr_core.h b/sys/dev/pci/bktr/bktr_core.h index c7a04599643..18f69355129 100644 --- a/sys/dev/pci/bktr/bktr_core.h +++ b/sys/dev/pci/bktr/bktr_core.h @@ -1,6 +1,6 @@ /* $SourceForge: bktr_core.h,v 1.3 2003/03/11 23:11:23 thomasklausner Exp $ */ -/* $NetBSD: bktr_core.h,v 1.8 2006/09/03 19:06:32 bouyer Exp $ */ +/* $NetBSD: bktr_core.h,v 1.9 2007/03/04 06:02:27 christos Exp $ */ /* $FreeBSD: src/sys/dev/bktr/bktr_core.h,v 1.4 2000/06/26 09:41:32 roger Exp$ */ /* @@ -67,8 +67,8 @@ void msp_dpl_write(bktr_ptr_t bktr, int i2c_addr, unsigned char dev, * For /dev/vbi[n] use memory address of bktr structure + 1 * this is ok as the bktr structure is > 1 byte */ -#define BKTR_SLEEP ((caddr_t)bktr) -#define VBI_SLEEP ((caddr_t)bktr + 1) +#define BKTR_SLEEP ((void *)bktr) +#define VBI_SLEEP ((char *)bktr + 1) /* device name for printf */ @@ -85,13 +85,13 @@ int video_open(bktr_ptr_t bktr); int video_close(bktr_ptr_t bktr); int video_read(bktr_ptr_t bktr, int unit, dev_t dev, struct uio *uio); int video_ioctl(bktr_ptr_t bktr, int unit, - ioctl_cmd_t cmd, caddr_t arg, struct lwp* pr); + ioctl_cmd_t cmd, void *arg, struct lwp* pr); int tuner_open(bktr_ptr_t bktr); int tuner_close(bktr_ptr_t bktr); int tuner_ioctl(bktr_ptr_t bktr, int unit, - ioctl_cmd_t cmd, caddr_t arg, struct lwp* pr); + ioctl_cmd_t cmd, void *arg, struct lwp* pr); int vbi_open(bktr_ptr_t bktr); int vbi_close(bktr_ptr_t bktr); diff --git a/sys/dev/pci/bktr/bktr_mem.c b/sys/dev/pci/bktr/bktr_mem.c index e9eaac30770..36d68458256 100644 --- a/sys/dev/pci/bktr/bktr_mem.c +++ b/sys/dev/pci/bktr/bktr_mem.c @@ -1,6 +1,6 @@ /* $SourceForge: bktr_mem.c,v 1.3 2003/03/11 23:11:25 thomasklausner Exp $ */ -/* $NetBSD: bktr_mem.c,v 1.3 2003/03/12 00:14:41 wiz Exp $ */ +/* $NetBSD: bktr_mem.c,v 1.4 2007/03/04 06:02:27 christos Exp $ */ /* $FreeBSD: src/sys/dev/bktr/bktr_mem.c,v 1.4 2000/09/11 12:23:50 roger Exp$ */ /* @@ -49,7 +49,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: bktr_mem.c,v 1.3 2003/03/12 00:14:41 wiz Exp $"); +__KERNEL_RCSID(0, "$NetBSD: bktr_mem.c,v 1.4 2007/03/04 06:02:27 christos Exp $"); #include <sys/param.h> #include <sys/kernel.h> @@ -79,7 +79,7 @@ bktr_mem_modevent(module_t mod, int type, void *unused) { printf("bktr_mem: memory holder loaded\n"); /* * bzero causes a panic. - bzero((caddr_t)memory_list, sizeof(memory_list)); + bzero((void *)memory_list, sizeof(memory_list)); * So use a simple for loop for now. */ {int x; diff --git a/sys/dev/pci/bktr/bktr_os.c b/sys/dev/pci/bktr/bktr_os.c index a3ef444c875..31f102778e9 100644 --- a/sys/dev/pci/bktr/bktr_os.c +++ b/sys/dev/pci/bktr/bktr_os.c @@ -1,6 +1,6 @@ /* $SourceForge: bktr_os.c,v 1.5 2003/03/11 23:11:25 thomasklausner Exp $ */ -/* $NetBSD: bktr_os.c,v 1.45 2006/11/16 01:33:20 christos Exp $ */ +/* $NetBSD: bktr_os.c,v 1.46 2007/03/04 06:02:27 christos Exp $ */ /* $FreeBSD: src/sys/dev/bktr/bktr_os.c,v 1.20 2000/10/20 08:16:53 roger Exp$ */ /* @@ -51,7 +51,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: bktr_os.c,v 1.45 2006/11/16 01:33:20 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: bktr_os.c,v 1.46 2007/03/04 06:02:27 christos Exp $"); #ifdef __FreeBSD__ #include "bktr.h" @@ -739,7 +739,7 @@ bktr_write(dev_t dev, struct uio *uio, int ioflag) * */ int -bktr_ioctl(dev_t dev, ioctl_cmd_t cmd, caddr_t arg, int flag, struct proc* pr) +bktr_ioctl(dev_t dev, ioctl_cmd_t cmd, void *arg, int flag, struct proc* pr) { bktr_ptr_t bktr; int unit; @@ -1211,7 +1211,7 @@ bktr_write(dev_t dev, struct uio *uio, int ioflag) * */ int -bktr_ioctl(dev_t dev, ioctl_cmd_t cmd, caddr_t arg, int flag, struct proc* pr) +bktr_ioctl(dev_t dev, ioctl_cmd_t cmd, void *arg, int flag, struct proc* pr) { bktr_ptr_t bktr; int unit; @@ -1557,7 +1557,7 @@ get_bktr_mem(bktr, dmapp, size) bus_dma_segment_t seg; bus_size_t align; int rseg; - caddr_t kva; + void *kva; /* * Allocate a DMA area @@ -1621,9 +1621,9 @@ free_bktr_mem(bktr, dmap, kva) bus_dma_tag_t dmat = bktr->dmat; #ifdef __NetBSD__ - bus_dmamem_unmap(dmat, (caddr_t)kva, dmap->dm_mapsize); + bus_dmamem_unmap(dmat, (void *)kva, dmap->dm_mapsize); #else - bus_dmamem_unmap(dmat, (caddr_t)kva, bktr->dm_mapsize); + bus_dmamem_unmap(dmat, (void *)kva, bktr->dm_mapsize); #endif bus_dmamem_free(dmat, dmap->dm_segs, 1); bus_dmamap_destroy(dmat, dmap); @@ -1743,7 +1743,7 @@ bktr_write(dev_t dev, struct uio *uio, int ioflag) * */ int -bktr_ioctl(dev_t dev, ioctl_cmd_t cmd, caddr_t arg, int flag, +bktr_ioctl(dev_t dev, ioctl_cmd_t cmd, void *arg, int flag, struct lwp *l) { bktr_ptr_t bktr; diff --git a/sys/dev/pci/cac_pci.c b/sys/dev/pci/cac_pci.c index 0e39e5f330f..41630c6911b 100644 --- a/sys/dev/pci/cac_pci.c +++ b/sys/dev/pci/cac_pci.c @@ -1,4 +1,4 @@ -/* $NetBSD: cac_pci.c,v 1.24 2006/11/28 20:29:14 ad Exp $ */ +/* $NetBSD: cac_pci.c,v 1.25 2007/03/04 06:02:17 christos Exp $ */ /*- * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -41,7 +41,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: cac_pci.c,v 1.24 2006/11/28 20:29:14 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cac_pci.c,v 1.25 2007/03/04 06:02:17 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -234,7 +234,8 @@ static void cac_pci_l0_submit(struct cac_softc *sc, struct cac_ccb *ccb) { - bus_dmamap_sync(sc->sc_dmat, sc->sc_dmamap, (caddr_t)ccb - sc->sc_ccbs, + bus_dmamap_sync(sc->sc_dmat, sc->sc_dmamap, + (char *)ccb - (char *)sc->sc_ccbs, sizeof(struct cac_ccb), BUS_DMASYNC_PREWRITE | BUS_DMASYNC_PREREAD); cac_outl(sc, CAC_42REG_CMD_FIFO, ccb->ccb_paddr); } @@ -255,7 +256,7 @@ cac_pci_l0_completed(struct cac_softc *sc) sc->sc_dv.dv_xname, (long)off); off = (off & ~3) - sc->sc_ccbs_paddr; - ccb = (struct cac_ccb *)(sc->sc_ccbs + off); + ccb = (struct cac_ccb *)((char *)sc->sc_ccbs + off); bus_dmamap_sync(sc->sc_dmat, sc->sc_dmamap, off, sizeof(struct cac_ccb), BUS_DMASYNC_PREWRITE | BUS_DMASYNC_PREREAD); diff --git a/sys/dev/pci/chipsfb.c b/sys/dev/pci/chipsfb.c index 42eca855e06..e3dbb3ce9b2 100644 --- a/sys/dev/pci/chipsfb.c +++ b/sys/dev/pci/chipsfb.c @@ -1,4 +1,4 @@ -/* $NetBSD: chipsfb.c,v 1.8 2007/01/22 00:12:24 macallan Exp $ */ +/* $NetBSD: chipsfb.c,v 1.9 2007/03/04 06:02:17 christos Exp $ */ /* * Copyright (c) 2006 Michael Lorenz @@ -33,7 +33,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: chipsfb.c,v 1.8 2007/01/22 00:12:24 macallan Exp $"); +__KERNEL_RCSID(0, "$NetBSD: chipsfb.c,v 1.9 2007/03/04 06:02:17 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -173,7 +173,7 @@ struct wsscreen_list chipsfb_screenlist = { sizeof(_chipsfb_scrlist) / sizeof(struct wsscreen_descr *), _chipsfb_scrlist }; -static int chipsfb_ioctl(void *, void *, u_long, caddr_t, int, +static int chipsfb_ioctl(void *, void *, u_long, void *, int, struct lwp *); static paddr_t chipsfb_mmap(void *, void *, off_t, int); static void chipsfb_clearscreen(struct chipsfb_softc *); @@ -808,7 +808,7 @@ chipsfb_restore_palette(struct chipsfb_softc *sc) */ static int -chipsfb_ioctl(void *v, void *vs, u_long cmd, caddr_t data, int flag, +chipsfb_ioctl(void *v, void *vs, u_long cmd, void *data, int flag, struct lwp *l) { struct vcons_data *vd = v; diff --git a/sys/dev/pci/cmpci.c b/sys/dev/pci/cmpci.c index c7fde5c7828..3dddfc8b05b 100644 --- a/sys/dev/pci/cmpci.c +++ b/sys/dev/pci/cmpci.c @@ -1,4 +1,4 @@ -/* $NetBSD: cmpci.c,v 1.34 2006/11/16 01:33:08 christos Exp $ */ +/* $NetBSD: cmpci.c,v 1.35 2007/03/04 06:02:17 christos Exp $ */ /* * Copyright (c) 2000, 2001 The NetBSD Foundation, Inc. @@ -43,7 +43,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: cmpci.c,v 1.34 2006/11/16 01:33:08 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cmpci.c,v 1.35 2007/03/04 06:02:17 christos Exp $"); #if defined(AUDIO_DEBUG) || defined(DEBUG) #define DPRINTF(x) if (cmpcidebug) printf x @@ -120,11 +120,11 @@ static int cmpci_intr(void *); * DMA stuffs */ static int cmpci_alloc_dmamem(struct cmpci_softc *, size_t, - struct malloc_type *, int, caddr_t *); -static int cmpci_free_dmamem(struct cmpci_softc *, caddr_t, + struct malloc_type *, int, void **); +static int cmpci_free_dmamem(struct cmpci_softc *, void *, struct malloc_type *); static struct cmpci_dmanode * cmpci_find_dmamem(struct cmpci_softc *, - caddr_t); + void *); /* @@ -1011,7 +1011,7 @@ cmpci_query_devinfo(void *handle, mixer_devinfo_t *dip) static int cmpci_alloc_dmamem(struct cmpci_softc *sc, size_t size, struct malloc_type *type, - int flags, caddr_t *r_addr) + int flags, void **r_addr) { int error; struct cmpci_dmanode *n; @@ -1066,7 +1066,7 @@ cmpci_alloc_dmamem(struct cmpci_softc *sc, size_t size, struct malloc_type *type } static int -cmpci_free_dmamem(struct cmpci_softc *sc, caddr_t addr, struct malloc_type *type) +cmpci_free_dmamem(struct cmpci_softc *sc, void *addr, struct malloc_type *type) { struct cmpci_dmanode **nnp; @@ -1086,7 +1086,7 @@ cmpci_free_dmamem(struct cmpci_softc *sc, caddr_t addr, struct malloc_type *type } static struct cmpci_dmanode * -cmpci_find_dmamem(struct cmpci_softc *sc, caddr_t addr) +cmpci_find_dmamem(struct cmpci_softc *sc, void *addr) { struct cmpci_dmanode *p; @@ -1113,7 +1113,7 @@ static void * cmpci_allocm(void *handle, int direction, size_t size, struct malloc_type *type, int flags) { - caddr_t addr; + void *addr; addr = NULL; /* XXX gcc */ @@ -1691,7 +1691,7 @@ cmpci_trigger_output(void *handle, void *start, void *end, int blksize, DMAADDR(p)); delay(10); bus_space_write_2(sc->sc_iot, sc->sc_ioh, CMPCI_REG_DMA0_BYTES, - ((caddr_t)end - (caddr_t)start + 1) / bps - 1); + ((char *)end - (char *)start + 1) / bps - 1); delay(10); /* set interrupt count */ @@ -1730,7 +1730,7 @@ cmpci_trigger_input(void *handle, void *start, void *end, int blksize, DMAADDR(p)); delay(10); bus_space_write_2(sc->sc_iot, sc->sc_ioh, CMPCI_REG_DMA1_BYTES, - ((caddr_t)end - (caddr_t)start + 1) / bps - 1); + ((char *)end - (char *)start + 1) / bps - 1); delay(10); /* set interrupt count */ diff --git a/sys/dev/pci/cmpcivar.h b/sys/dev/pci/cmpcivar.h index 5fcedab7184..4c3233477f2 100644 --- a/sys/dev/pci/cmpcivar.h +++ b/sys/dev/pci/cmpcivar.h @@ -1,4 +1,4 @@ -/* $NetBSD: cmpcivar.h,v 1.9 2005/12/11 12:22:48 christos Exp $ */ +/* $NetBSD: cmpcivar.h,v 1.10 2007/03/04 06:02:17 christos Exp $ */ /* * Copyright (c) 2000, 2001 The NetBSD Foundation, Inc. @@ -47,7 +47,7 @@ struct cmpci_dmanode { int cd_nsegs; bus_dma_segment_t cd_segs[1]; bus_dmamap_t cd_map; - caddr_t cd_addr; + void * cd_addr; size_t cd_size; struct cmpci_dmanode *cd_next; }; diff --git a/sys/dev/pci/cs428x.h b/sys/dev/pci/cs428x.h index ecdf41cfd28..ad9ee3c6574 100644 --- a/sys/dev/pci/cs428x.h +++ b/sys/dev/pci/cs428x.h @@ -1,4 +1,4 @@ -/* $NetBSD: cs428x.h,v 1.11 2006/08/06 16:21:11 jmcneill Exp $ */ +/* $NetBSD: cs428x.h,v 1.12 2007/03/04 06:02:17 christos Exp $ */ /* * Copyright (c) 2000 Tatoku Ogaito. All rights reserved. @@ -48,8 +48,8 @@ /* DMA */ struct cs428x_dma { bus_dmamap_t map; - caddr_t addr; /* real DMA buffer */ - caddr_t dum; /* dummy buffer for audio driver */ + void *addr; /* real DMA buffer */ + void *dum; /* dummy buffer for audio driver */ bus_dma_segment_t segs[1]; int nsegs; size_t size; diff --git a/sys/dev/pci/cz.c b/sys/dev/pci/cz.c index 04a0d583469..cffd3159e4b 100644 --- a/sys/dev/pci/cz.c +++ b/sys/dev/pci/cz.c @@ -1,4 +1,4 @@ -/* $NetBSD: cz.c,v 1.42 2006/11/16 01:33:08 christos Exp $ */ +/* $NetBSD: cz.c,v 1.43 2007/03/04 06:02:17 christos Exp $ */ /*- * Copyright (c) 2000 Zembu Labs, Inc. @@ -73,7 +73,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: cz.c,v 1.42 2006/11/16 01:33:08 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cz.c,v 1.43 2007/03/04 06:02:17 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -1134,7 +1134,7 @@ czttypoll(dev_t dev, int events, struct lwp *l) * Perform a control operation on a Cyclades-Z serial port. */ static int -czttyioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct lwp *l) +czttyioctl(dev_t dev, u_long cmd, void *data, int flag, struct lwp *l) { struct cztty_softc *sc = CZTTY_SOFTC(dev); struct tty *tp = sc->sc_tty; diff --git a/sys/dev/pci/eap.c b/sys/dev/pci/eap.c index 4cfcb8ed792..721935a5ca3 100644 --- a/sys/dev/pci/eap.c +++ b/sys/dev/pci/eap.c @@ -1,4 +1,4 @@ -/* $NetBSD: eap.c,v 1.88 2006/11/16 01:33:08 christos Exp $ */ +/* $NetBSD: eap.c,v 1.89 2007/03/04 06:02:17 christos Exp $ */ /* $OpenBSD: eap.c,v 1.6 1999/10/05 19:24:42 csapuntz Exp $ */ /* @@ -58,7 +58,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: eap.c,v 1.88 2006/11/16 01:33:08 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: eap.c,v 1.89 2007/03/04 06:02:17 christos Exp $"); #include "midi.h" #include "joy_eap.h" @@ -107,7 +107,7 @@ static int eap_intr(void *); struct eap_dma { bus_dmamap_t map; - caddr_t addr; + void *addr; bus_dma_segment_t segs[1]; int nsegs; size_t size; diff --git a/sys/dev/pci/emuxki.c b/sys/dev/pci/emuxki.c index c7c51b75c95..24ed5947b42 100644 --- a/sys/dev/pci/emuxki.c +++ b/sys/dev/pci/emuxki.c @@ -1,4 +1,4 @@ -/* $NetBSD: emuxki.c,v 1.49 2006/11/16 01:33:08 christos Exp $ */ +/* $NetBSD: emuxki.c,v 1.50 2007/03/04 06:02:18 christos Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -56,7 +56,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: emuxki.c,v 1.49 2006/11/16 01:33:08 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: emuxki.c,v 1.50 2007/03/04 06:02:18 christos Exp $"); #include <sys/param.h> #include <sys/device.h> @@ -2432,7 +2432,7 @@ emuxki_trigger_output(void *addr, void *start, void *end, int blksize, params->precision == 16, params->sample_rate))) return error; if ((error = emuxki_voice_set_bufparms(voice, start, - (caddr_t)end - (caddr_t)start, blksize))) + (char *)end - (char *)start, blksize))) return error; emuxki_voice_commit_parms(voice); emuxki_voice_start(voice, inth, inthparam); @@ -2457,7 +2457,7 @@ emuxki_trigger_input(void *addr, void *start, void *end, int blksize, params->precision == 16, params->sample_rate))) return error; if ((error = emuxki_voice_set_bufparms(voice, start, - (caddr_t)end - (caddr_t)start, blksize))) + (char *)end - (char *)start, blksize))) return error; emuxki_voice_start(voice, inth, inthparam); diff --git a/sys/dev/pci/emuxkivar.h b/sys/dev/pci/emuxkivar.h index f2249dc11a5..433f9285a8c 100644 --- a/sys/dev/pci/emuxkivar.h +++ b/sys/dev/pci/emuxkivar.h @@ -1,4 +1,4 @@ -/* $NetBSD: emuxkivar.h,v 1.9 2005/12/11 12:22:49 christos Exp $ */ +/* $NetBSD: emuxkivar.h,v 1.10 2007/03/04 06:02:18 christos Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -54,7 +54,7 @@ struct dmamem { bus_dma_segment_t *segs; int nsegs; int rsegs; - caddr_t kaddr; + void * kaddr; bus_dmamap_t map; }; diff --git a/sys/dev/pci/esa.c b/sys/dev/pci/esa.c index 7346e945f4b..dbd38eae979 100644 --- a/sys/dev/pci/esa.c +++ b/sys/dev/pci/esa.c @@ -1,4 +1,4 @@ -/* $NetBSD: esa.c,v 1.40 2006/11/16 01:33:08 christos Exp $ */ +/* $NetBSD: esa.c,v 1.41 2007/03/04 06:02:18 christos Exp $ */ /* * Copyright (c) 2001, 2002, 2006 Jared D. McNeill <jmcneill@invisible.ca> @@ -39,7 +39,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: esa.c,v 1.40 2006/11/16 01:33:08 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: esa.c,v 1.41 2007/03/04 06:02:18 christos Exp $"); #include <sys/types.h> #include <sys/errno.h> @@ -600,7 +600,7 @@ esa_trigger_output(void *hdl, void *start, void *end, int blksize, vc->play.pos = 0; vc->play.count = 0; vc->play.buf = start; - vc->play.bufsize = size = (size_t)(((caddr_t)end - (caddr_t)start)); + vc->play.bufsize = size = (size_t)(((char *)end - (char *)start)); vc->play.blksize = blksize; bufaddr = DMAADDR(p); vc->play.start = bufaddr; @@ -740,7 +740,7 @@ esa_trigger_input(void *hdl, void *start, void *end, int blksize, vc->rec.pos = 0; vc->rec.count = 0; vc->rec.buf = start; - vc->rec.bufsize = size = (size_t)(((caddr_t)end - (caddr_t)start)); + vc->rec.bufsize = size = (size_t)(((char *)end - (char *)start)); vc->rec.blksize = blksize; bufaddr = DMAADDR(p); vc->rec.start = bufaddr; diff --git a/sys/dev/pci/esavar.h b/sys/dev/pci/esavar.h index 3be838a04b4..bc725c238e3 100644 --- a/sys/dev/pci/esavar.h +++ b/sys/dev/pci/esavar.h @@ -1,4 +1,4 @@ -/* $NetBSD: esavar.h,v 1.7 2005/12/11 12:22:49 christos Exp $ */ +/* $NetBSD: esavar.h,v 1.8 2007/03/04 06:02:18 christos Exp $ */ /* * Copyright (c) 2001, 2002 Jared D. McNeill <jmcneill@invisible.ca> @@ -61,7 +61,7 @@ struct esa_list { struct esa_dma { bus_dmamap_t map; - caddr_t addr; + void * addr; bus_dma_segment_t segs[1]; int nsegs; size_t size; diff --git a/sys/dev/pci/esm.c b/sys/dev/pci/esm.c index b8cc74ab73b..7135bf052d7 100644 --- a/sys/dev/pci/esm.c +++ b/sys/dev/pci/esm.c @@ -1,4 +1,4 @@ -/* $NetBSD: esm.c,v 1.41 2006/11/16 01:33:08 christos Exp $ */ +/* $NetBSD: esm.c,v 1.42 2007/03/04 06:02:18 christos Exp $ */ /*- * Copyright (c) 2002, 2003 Matt Fredette @@ -66,7 +66,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: esm.c,v 1.41 2006/11/16 01:33:08 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: esm.c,v 1.42 2007/03/04 06:02:18 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -685,7 +685,7 @@ esm_init_output (void *sc, void *start, int size) ess = sc; p = &ess->sc_dma; - if ((caddr_t)start != p->addr + MAESTRO_PLAYBUF_OFF) { + if ((char *)start != (char *)p->addr + MAESTRO_PLAYBUF_OFF) { printf("%s: esm_init_output: bad addr %p\n", ess->sc_dev.dv_xname, start); return EINVAL; @@ -707,7 +707,7 @@ esm_init_input (void *sc, void *start, int size) ess = sc; p = &ess->sc_dma; - if ((caddr_t)start != p->addr + MAESTRO_RECBUF_OFF) { + if ((char *)start != (char *)p->addr + MAESTRO_RECBUF_OFF) { printf("%s: esm_init_input: bad addr %p\n", ess->sc_dev.dv_xname, start); return EINVAL; @@ -762,7 +762,7 @@ esm_trigger_output(void *sc, void *start, void *end, int blksize, ess->sc_pintr = intr; ess->sc_parg = arg; p = &ess->sc_dma; - if ((caddr_t)start != p->addr + MAESTRO_PLAYBUF_OFF) { + if ((char *)start != (char *)p->addr + MAESTRO_PLAYBUF_OFF) { printf("%s: esm_trigger_output: bad addr %p\n", ess->sc_dev.dv_xname, start); return EINVAL; @@ -772,7 +772,7 @@ esm_trigger_output(void *sc, void *start, void *end, int blksize, ess->pch.apublk = blksize >> 1; ess->pactive = 1; - size = (size_t)(((caddr_t)end - (caddr_t)start) >> 1); + size = (size_t)(((char *)end - (char *)start) >> 1); choffset = MAESTRO_PLAYBUF_OFF; offset = choffset >> 1; wpwa = APU_USE_SYSMEM | ((offset >> 8) & APU_64KPAGE_MASK); @@ -878,20 +878,20 @@ esm_trigger_input(void *sc, void *start, void *end, int blksize, ess->sc_rintr = intr; ess->sc_rarg = arg; p = &ess->sc_dma; - if ((caddr_t)start != p->addr + MAESTRO_RECBUF_OFF) { + if ((char *)start != (char *)p->addr + MAESTRO_RECBUF_OFF) { printf("%s: esm_trigger_input: bad addr %p\n", ess->sc_dev.dv_xname, start); return EINVAL; } - ess->rch.buffer = (caddr_t)start; + ess->rch.buffer = (void *)start; ess->rch.offset = 0; ess->rch.blocksize = blksize; - ess->rch.bufsize = ((caddr_t)end - (caddr_t)start); + ess->rch.bufsize = ((char *)end - (char *)start); ess->rch.apublk = blksize >> 1; ess->ractive = 1; - size = (size_t)(((caddr_t)end - (caddr_t)start) >> 1); + size = (size_t)(((char *)end - (char *)start) >> 1); choffset = MAESTRO_RECBUF_OFF; switch (ch->aputype) { case APUTYPE_16BITSTEREO: @@ -1149,15 +1149,15 @@ esmch_combine_input(struct esm_softc *ess, struct esm_chinfo *ch) while (resid > 0) { /* The 32-bit words for the left channel. */ - left32s = (const uint32_t *)(ess->sc_dma.addr + + left32s = (const uint32_t *)((char *)ess->sc_dma.addr + MAESTRO_RECBUF_L_OFF + offset / 2); /* The 32-bit words for the right channel. */ - right32s = (const uint32_t *)(ess->sc_dma.addr + + right32s = (const uint32_t *)((char *)ess->sc_dma.addr + MAESTRO_RECBUF_R_OFF + offset / 2); /* The pointer to the 32-bit words we will write. */ - dst32s = (uint32_t *)(ch->buffer + offset); + dst32s = (uint32_t *)((char *)ch->buffer + offset); /* Get the number of bytes we will combine now. */ count = ch->bufsize - offset; @@ -1336,9 +1336,9 @@ esm_malloc(void *sc, int direction, size_t size, off = (direction == AUMODE_PLAY ? MAESTRO_PLAYBUF_OFF : MAESTRO_RECBUF_OFF); DPRINTF(ESM_DEBUG_DMA, (" = %p (DMAADDR 0x%x)\n", - ess->sc_dma.addr + off, + (char *)ess->sc_dma.addr + off, (int)DMAADDR(&ess->sc_dma) + off)); - return ess->sc_dma.addr + off; + return (char *)ess->sc_dma.addr + off; } void @@ -1350,9 +1350,9 @@ esm_free(void *sc, void *ptr, struct malloc_type *pool) ("esm_free(%p, %p, %p)\n", sc, ptr, pool)); ess = sc; - if ((caddr_t)ptr == ess->sc_dma.addr + MAESTRO_PLAYBUF_OFF) + if ((char *)ptr == (char *)ess->sc_dma.addr + MAESTRO_PLAYBUF_OFF) ess->rings_alloced &= ~AUMODE_PLAY; - else if ((caddr_t)ptr == ess->sc_dma.addr + MAESTRO_RECBUF_OFF) + else if ((char *)ptr == (char *)ess->sc_dma.addr + MAESTRO_RECBUF_OFF) ess->rings_alloced &= ~AUMODE_RECORD; } @@ -1379,9 +1379,9 @@ esm_mappage(void *sc, void *mem, off_t off, int prot) if (off < 0) return -1; - if ((caddr_t)mem == ess->sc_dma.addr + MAESTRO_PLAYBUF_OFF) + if ((char *)mem == (char *)ess->sc_dma.addr + MAESTRO_PLAYBUF_OFF) off += MAESTRO_PLAYBUF_OFF; - else if ((caddr_t)mem == ess->sc_dma.addr + MAESTRO_RECBUF_OFF) + else if ((char *)mem == (char *)ess->sc_dma.addr + MAESTRO_RECBUF_OFF) off += MAESTRO_RECBUF_OFF; else return -1; diff --git a/sys/dev/pci/esmvar.h b/sys/dev/pci/esmvar.h index 79a4401cee2..38ce882e0ce 100644 --- a/sys/dev/pci/esmvar.h +++ b/sys/dev/pci/esmvar.h @@ -1,4 +1,4 @@ -/* $NetBSD: esmvar.h,v 1.13 2005/12/11 12:22:49 christos Exp $ */ +/* $NetBSD: esmvar.h,v 1.14 2007/03/04 06:02:18 christos Exp $ */ /*- * Copyright (c) 2002, 2003 Matt Fredette @@ -123,7 +123,7 @@ struct esm_dma { bus_dmamap_t map; - caddr_t addr; + void * addr; bus_dma_segment_t segs[1]; int nsegs; size_t size; @@ -135,7 +135,7 @@ struct esm_dma { struct esm_chinfo { uint32_t base; /* DMA base */ - caddr_t buffer; /* upper layer buffer */ + void * buffer; /* upper layer buffer */ uint32_t offset; /* offset into buffer */ uint32_t blocksize; /* block size in bytes */ uint32_t bufsize; /* buffer size in bytes */ diff --git a/sys/dev/pci/eso.c b/sys/dev/pci/eso.c index c975b92d1f1..513beecafc2 100644 --- a/sys/dev/pci/eso.c +++ b/sys/dev/pci/eso.c @@ -1,4 +1,4 @@ -/* $NetBSD: eso.c,v 1.49 2007/01/11 22:56:49 kleink Exp $ */ +/* $NetBSD: eso.c,v 1.50 2007/03/04 06:02:18 christos Exp $ */ /* * Copyright (c) 1999, 2000, 2004 Klaus J. Klein @@ -33,7 +33,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: eso.c,v 1.49 2007/01/11 22:56:49 kleink Exp $"); +__KERNEL_RCSID(0, "$NetBSD: eso.c,v 1.50 2007/03/04 06:02:18 christos Exp $"); #include "mpu.h" @@ -83,7 +83,7 @@ __KERNEL_RCSID(0, "$NetBSD: eso.c,v 1.49 2007/01/11 22:56:49 kleink Exp $"); struct eso_dma { bus_dma_tag_t ed_dmat; bus_dmamap_t ed_map; - caddr_t ed_kva; + void * ed_kva; bus_dma_segment_t ed_segs[1]; int ed_nsegs; size_t ed_size; @@ -206,7 +206,7 @@ static void eso_write_mixreg(struct eso_softc *, uint8_t, uint8_t); static int eso_allocmem(struct eso_softc *, size_t, size_t, size_t, int, int, struct eso_dma *); static void eso_freemem(struct eso_dma *); -static struct eso_dma * eso_kva2dma(const struct eso_softc *, const caddr_t); +static struct eso_dma * eso_kva2dma(const struct eso_softc *, const void *); static int @@ -1513,7 +1513,7 @@ eso_freemem(struct eso_dma *ed) } static struct eso_dma * -eso_kva2dma(const struct eso_softc *sc, const caddr_t kva) +eso_kva2dma(const struct eso_softc *sc, const void *kva) { struct eso_dma *p; diff --git a/sys/dev/pci/fms.c b/sys/dev/pci/fms.c index a1b5cbdaef9..b0e7eecfd61 100644 --- a/sys/dev/pci/fms.c +++ b/sys/dev/pci/fms.c @@ -1,4 +1,4 @@ -/* $NetBSD: fms.c,v 1.28 2006/11/16 01:33:08 christos Exp $ */ +/* $NetBSD: fms.c,v 1.29 2007/03/04 06:02:18 christos Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -41,7 +41,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: fms.c,v 1.28 2006/11/16 01:33:08 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: fms.c,v 1.29 2007/03/04 06:02:18 christos Exp $"); #include "mpu.h" @@ -72,7 +72,7 @@ __KERNEL_RCSID(0, "$NetBSD: fms.c,v 1.28 2006/11/16 01:33:08 christos Exp $"); struct fms_dma { struct fms_dma *next; - caddr_t addr; + void *addr; size_t size; bus_dmamap_t map; bus_dma_segment_t seg; diff --git a/sys/dev/pci/hifn7751.c b/sys/dev/pci/hifn7751.c index 4c95a0bfdb7..11d0d2554a9 100644 --- a/sys/dev/pci/hifn7751.c +++ b/sys/dev/pci/hifn7751.c @@ -1,4 +1,4 @@ -/* $NetBSD: hifn7751.c,v 1.33 2006/11/16 01:33:08 christos Exp $ */ +/* $NetBSD: hifn7751.c,v 1.34 2007/03/04 06:02:18 christos Exp $ */ /* $FreeBSD: hifn7751.c,v 1.5.2.7 2003/10/08 23:52:00 sam Exp $ */ /* $OpenBSD: hifn7751.c,v 1.140 2003/08/01 17:55:54 deraadt Exp $ */ @@ -48,7 +48,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: hifn7751.c,v 1.33 2006/11/16 01:33:08 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: hifn7751.c,v 1.34 2007/03/04 06:02:18 christos Exp $"); #include "rnd.h" @@ -255,7 +255,7 @@ hifn_attach(struct device *parent, struct device *self, void *aux) bus_dma_segment_t seg; bus_dmamap_t dmamap; int rseg; - caddr_t kva; + void *kva; hp = hifn_lookup(pa); if (hp == NULL) { @@ -2461,7 +2461,7 @@ hifn_abort(struct hifn_softc *sc) if (cmd->srcu.src_m != cmd->dstu.dst_m) { m_freem(cmd->srcu.src_m); - crp->crp_buf = (caddr_t)cmd->dstu.dst_m; + crp->crp_buf = (void *)cmd->dstu.dst_m; } /* non-shared buffers cannot be restarted */ @@ -2522,7 +2522,7 @@ hifn_callback(struct hifn_softc *sc, struct hifn_command *cmd, u_int8_t *resbuf) if (crp->crp_flags & CRYPTO_F_IMBUF) { if (cmd->srcu.src_m != cmd->dstu.dst_m) { - crp->crp_buf = (caddr_t)cmd->dstu.dst_m; + crp->crp_buf = (void *)cmd->dstu.dst_m; totlen = cmd->src_map->dm_mapsize; for (m = cmd->dstu.dst_m; m != NULL; m = m->m_next) { if (totlen < m->m_len) { @@ -2541,11 +2541,11 @@ hifn_callback(struct hifn_softc *sc, struct hifn_command *cmd, u_int8_t *resbuf) if (crp->crp_flags & CRYPTO_F_IMBUF) m_copyback((struct mbuf *)crp->crp_buf, cmd->src_map->dm_mapsize - cmd->sloplen, - cmd->sloplen, (caddr_t)&dma->slop[cmd->slopidx]); + cmd->sloplen, (void *)&dma->slop[cmd->slopidx]); else if (crp->crp_flags & CRYPTO_F_IOV) cuio_copyback((struct uio *)crp->crp_buf, cmd->src_map->dm_mapsize - cmd->sloplen, - cmd->sloplen, (caddr_t)&dma->slop[cmd->slopidx]); + cmd->sloplen, (void *)&dma->slop[cmd->slopidx]); } i = dma->dstk; u = dma->dstu; @@ -2619,7 +2619,7 @@ hifn_callback(struct hifn_softc *sc, struct hifn_command *cmd, u_int8_t *resbuf) m_copyback((struct mbuf *)crp->crp_buf, crd->crd_inject, len, macbuf); else if ((crp->crp_flags & CRYPTO_F_IOV) && crp->crp_mac) - bcopy((caddr_t)macbuf, crp->crp_mac, len); + bcopy((void *)macbuf, crp->crp_mac, len); break; } } @@ -2962,7 +2962,7 @@ hifn_callback_comp(struct hifn_softc *sc, struct hifn_command *cmd, m = cmd->dstu.dst_m; if (m->m_flags & M_PKTHDR) m->m_pkthdr.len = olen; - crp->crp_buf = (caddr_t)m; + crp->crp_buf = (void *)m; for (; m != NULL; m = m->m_next) { if (olen >= m->m_len) olen -= m->m_len; diff --git a/sys/dev/pci/if_bce.c b/sys/dev/pci/if_bce.c index b4b9a0da9ce..587fc4792a5 100644 --- a/sys/dev/pci/if_bce.c +++ b/sys/dev/pci/if_bce.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_bce.c,v 1.13 2007/02/21 20:41:27 mrg Exp $ */ +/* $NetBSD: if_bce.c,v 1.14 2007/03/04 06:02:19 christos Exp $ */ /* * Copyright (c) 2003 Clifford Wright. All rights reserved. @@ -160,7 +160,7 @@ do { \ static int bce_probe(struct device *, struct cfdata *, void *); static void bce_attach(struct device *, struct device *, void *); -static int bce_ioctl(struct ifnet *, u_long, caddr_t); +static int bce_ioctl(struct ifnet *, u_long, void *); static void bce_start(struct ifnet *); static void bce_watchdog(struct ifnet *); static int bce_intr(void *); @@ -276,7 +276,7 @@ bce_attach(struct device *parent, struct device *self, void *aux) pci_chipset_tag_t pc = pa->pa_pc; pci_intr_handle_t ih; const char *intrstr = NULL; - caddr_t kva; + void * kva; bus_dma_segment_t seg; int rseg; u_int32_t command; @@ -420,7 +420,7 @@ bce_attach(struct device *parent, struct device *self, void *aux) } /* save the ring space in softc */ sc->bce_rx_ring = (struct bce_dma_slot *) kva; - sc->bce_tx_ring = (struct bce_dma_slot *) (kva + PAGE_SIZE); + sc->bce_tx_ring = (struct bce_dma_slot *) ((char *)kva + PAGE_SIZE); /* Create the transmit buffer DMA maps. */ for (i = 0; i < BCE_NTXDESC; i++) { @@ -505,7 +505,7 @@ bce_attach(struct device *parent, struct device *self, void *aux) /* handle media, and ethernet requests */ static int -bce_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) +bce_ioctl(struct ifnet *ifp, u_long cmd, void *data) { struct bce_softc *sc = ifp->if_softc; struct ifreq *ifr = (struct ifreq *) data; @@ -819,8 +819,8 @@ bce_rxintr(struct bce_softc *sc) if (m == NULL) goto dropit; m->m_data += 2; - memcpy(mtod(m, caddr_t), - mtod(sc->bce_cdata.bce_rx_chain[i], caddr_t), len); + memcpy(mtod(m, void *), + mtod(sc->bce_cdata.bce_rx_chain[i], void *), len); sc->bce_cdata.bce_rx_chain[i]->m_data -= 30; /* MAGIC */ } else { m = sc->bce_cdata.bce_rx_chain[i]; diff --git a/sys/dev/pci/if_bge.c b/sys/dev/pci/if_bge.c index fe5da32c395..3d4984155fa 100644 --- a/sys/dev/pci/if_bge.c +++ b/sys/dev/pci/if_bge.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_bge.c,v 1.125 2007/02/19 18:44:05 bouyer Exp $ */ +/* $NetBSD: if_bge.c,v 1.126 2007/03/04 06:02:19 christos Exp $ */ /* * Copyright (c) 2001 Wind River Systems @@ -79,7 +79,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_bge.c,v 1.125 2007/02/19 18:44:05 bouyer Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_bge.c,v 1.126 2007/03/04 06:02:19 christos Exp $"); #include "bpfilter.h" #include "vlan.h" @@ -194,7 +194,7 @@ static int bge_encap(struct bge_softc *, struct mbuf *, u_int32_t *); static int bge_intr(void *); static void bge_start(struct ifnet *); -static int bge_ioctl(struct ifnet *, u_long, caddr_t); +static int bge_ioctl(struct ifnet *, u_long, void *); static int bge_init(struct ifnet *); static void bge_stop(struct bge_softc *); static void bge_watchdog(struct ifnet *); @@ -210,7 +210,7 @@ static int bge_alloc_jumbo_mem(struct bge_softc *); static void bge_free_jumbo_mem(struct bge_softc *); #endif static void *bge_jalloc(struct bge_softc *); -static void bge_jfree(struct mbuf *, caddr_t, size_t, void *); +static void bge_jfree(struct mbuf *, void *, size_t, void *); static int bge_newbuf_std(struct bge_softc *, int, struct mbuf *, bus_dmamap_t); static int bge_newbuf_jumbo(struct bge_softc *, int, struct mbuf *); @@ -465,10 +465,11 @@ bge_eeprom_getbyte(struct bge_softc *sc, int addr, u_int8_t *dest) * Read a sequence of bytes from the EEPROM. */ static int -bge_read_eeprom(struct bge_softc *sc, caddr_t dest, int off, int cnt) +bge_read_eeprom(struct bge_softc *sc, void *destv, int off, int cnt) { int err = 0, i; u_int8_t byte = 0; + char *dest = destv; for (i = 0; i < cnt; i++) { err = bge_eeprom_getbyte(sc, off + i, &byte); @@ -682,7 +683,7 @@ bge_handle_events(struct bge_softc *sc) static int bge_alloc_jumbo_mem(struct bge_softc *sc) { - caddr_t ptr, kva; + char *ptr, *kva; bus_dma_segment_t seg; int i, rseg, state, error; struct bge_jpool_entry *entry; @@ -697,7 +698,7 @@ bge_alloc_jumbo_mem(struct bge_softc *sc) } state = 1; - if (bus_dmamem_map(sc->bge_dmatag, &seg, rseg, BGE_JMEM, &kva, + if (bus_dmamem_map(sc->bge_dmatag, &seg, rseg, BGE_JMEM, (void **)&kva, BUS_DMA_NOWAIT)) { printf("%s: can't map DMA buffers (%d bytes)\n", sc->bge_dev.dv_xname, (int)BGE_JMEM); @@ -722,7 +723,7 @@ bge_alloc_jumbo_mem(struct bge_softc *sc) } state = 4; - sc->bge_cdata.bge_jumbo_buf = (caddr_t)kva; + sc->bge_cdata.bge_jumbo_buf = (void *)kva; DPRINTFN(1,("bge_jumbo_buf = %p\n", sc->bge_cdata.bge_jumbo_buf)); SLIST_INIT(&sc->bge_jfree_listhead); @@ -794,7 +795,7 @@ bge_jalloc(struct bge_softc *sc) * Release a jumbo buffer. */ static void -bge_jfree(struct mbuf *m, caddr_t buf, size_t size, void *arg) +bge_jfree(struct mbuf *m, void *buf, size_t size, void *arg) { struct bge_jpool_entry *entry; struct bge_softc *sc; @@ -808,8 +809,8 @@ bge_jfree(struct mbuf *m, caddr_t buf, size_t size, void *arg) /* calculate the slot this buffer belongs to */ - i = ((caddr_t)buf - - (caddr_t)sc->bge_cdata.bge_jumbo_buf) / BGE_JLEN; + i = ((char *)buf + - (char *)sc->bge_cdata.bge_jumbo_buf) / BGE_JLEN; if ((i < 0) || (i >= BGE_JSLOTS)) panic("bge_jfree: asked to free buffer that we don't manage!"); @@ -899,7 +900,7 @@ bge_newbuf_jumbo(struct bge_softc *sc, int i, struct mbuf *m) { struct mbuf *m_new = NULL; struct bge_rx_bd *r; - caddr_t buf = NULL; + void *buf = NULL; if (m == NULL) { @@ -931,7 +932,7 @@ bge_newbuf_jumbo(struct bge_softc *sc, int i, struct mbuf *m) if (!sc->bge_rx_alignment_bug) m_adj(m_new, ETHER_ALIGN); bus_dmamap_sync(sc->bge_dmatag, sc->bge_cdata.bge_rx_jumbo_map, - mtod(m_new, caddr_t) - sc->bge_cdata.bge_jumbo_buf, BGE_JLEN, + mtod(m_new, char *) - (char *)sc->bge_cdata.bge_jumbo_buf, BGE_JLEN, BUS_DMASYNC_PREREAD); /* Set up the descriptor. */ r = &sc->bge_rdata->bge_rx_jumbo_ring[i]; @@ -2338,7 +2339,7 @@ bge_attach(device_t parent, device_t self, void *aux) u_int32_t mac_addr = 0; u_int32_t command; struct ifnet *ifp; - caddr_t kva; + void * kva; u_char eaddr[ETHER_ADDR_LEN]; pcireg_t memtype; bus_addr_t memaddr; @@ -2461,7 +2462,7 @@ bge_attach(device_t parent, device_t self, void *aux) eaddr[3] = (u_char)(mac_addr >> 16); eaddr[4] = (u_char)(mac_addr >> 8); eaddr[5] = (u_char)(mac_addr >> 0); - } else if (bge_read_eeprom(sc, (caddr_t)eaddr, + } else if (bge_read_eeprom(sc, (void *)eaddr, BGE_EE_MAC_OFFSET + 2, ETHER_ADDR_LEN)) { aprint_error("%s: failed to read station address\n", sc->bge_dev.dv_xname); @@ -2601,7 +2602,7 @@ bge_attach(device_t parent, device_t self, void *aux) if (bge_readmem_ind(sc, BGE_SOFTWARE_GENCOMM_SIG) == BGE_MAGIC_NUMBER) { hwcfg = bge_readmem_ind(sc, BGE_SOFTWARE_GENCOMM_NICCFG); } else { - bge_read_eeprom(sc, (caddr_t)&hwcfg, + bge_read_eeprom(sc, (void *)&hwcfg, BGE_EE_HWCFG_OFFSET, sizeof(hwcfg)); hwcfg = be32toh(hwcfg); } @@ -2925,7 +2926,7 @@ bge_rxeof(struct bge_softc *sc) jumbocnt++; bus_dmamap_sync(sc->bge_dmatag, sc->bge_cdata.bge_rx_jumbo_map, - mtod(m, caddr_t) - sc->bge_cdata.bge_jumbo_buf, + mtod(m, char *) - (char *)sc->bge_cdata.bge_jumbo_buf, BGE_JLEN, BUS_DMASYNC_POSTREAD); if (cur_rx->bge_flags & BGE_RXBDFLAG_ERROR) { ifp->if_ierrors++; @@ -2970,7 +2971,7 @@ bge_rxeof(struct bge_softc *sc) * If our CPU requires alignment, re-align by copying. */ if (sc->bge_rx_alignment_bug) { - memmove(mtod(m, caddr_t) + ETHER_ALIGN, m->m_data, + memmove(mtod(m, void *) + ETHER_ALIGN, m->m_data, cur_rx->bge_len); m->m_data += ETHER_ALIGN; } @@ -3344,7 +3345,7 @@ bge_cksum_pad(struct mbuf *pkt) KDASSERT(M_TRAILINGSPACE(last) >= padlen); /* Now zero the pad area, to avoid the bge cksum-assist bug */ - memset(mtod(last, caddr_t) + last->m_len, 0, padlen); + memset(mtod(last, char *) + last->m_len, 0, padlen); last->m_len += padlen; pkt->m_pkthdr.len += padlen; return 0; @@ -3607,8 +3608,8 @@ doit: return ENOBUFS; #endif } else { - ip = (struct ip *) (mtod(m0, caddr_t) + offset); - th = (struct tcphdr *) (mtod(m0, caddr_t) + hlen); + ip = (struct ip *) (mtod(m0, char *) + offset); + th = (struct tcphdr *) (mtod(m0, char *) + hlen); ip_tcp_hlen = iphl + (th->th_off << 2); /* Total IP/TCP options, in 32-bit words */ @@ -3998,7 +3999,7 @@ bge_ifmedia_sts(struct ifnet *ifp, struct ifmediareq *ifmr) } static int -bge_ioctl(struct ifnet *ifp, u_long command, caddr_t data) +bge_ioctl(struct ifnet *ifp, u_long command, void *data) { struct bge_softc *sc = ifp->if_softc; struct ifreq *ifr = (struct ifreq *) data; diff --git a/sys/dev/pci/if_bgereg.h b/sys/dev/pci/if_bgereg.h index 23686ba8c7a..5c01eb96343 100644 --- a/sys/dev/pci/if_bgereg.h +++ b/sys/dev/pci/if_bgereg.h @@ -1,4 +1,4 @@ -/* $NetBSD: if_bgereg.h,v 1.40 2007/02/17 19:47:07 bouyer Exp $ */ +/* $NetBSD: if_bgereg.h,v 1.41 2007/03/04 06:02:19 christos Exp $ */ /* * Copyright (c) 2001 Wind River Systems * Copyright (c) 1997, 1998, 1999, 2001 @@ -2336,8 +2336,8 @@ struct bge_chain_data { bus_dmamap_t bge_rx_std_map[BGE_STD_RX_RING_CNT]; bus_dmamap_t bge_rx_jumbo_map; /* Stick the jumbo mem management stuff here too. */ - caddr_t bge_jslots[BGE_JSLOTS]; - caddr_t bge_jumbo_buf; + void * bge_jslots[BGE_JSLOTS]; + void * bge_jumbo_buf; }; #define BGE_JUMBO_DMA_ADDR(sc, m) \ diff --git a/sys/dev/pci/if_bnx.c b/sys/dev/pci/if_bnx.c index 234ad078e02..493d2a6ab00 100644 --- a/sys/dev/pci/if_bnx.c +++ b/sys/dev/pci/if_bnx.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_bnx.c,v 1.2 2007/02/15 19:24:47 bouyer Exp $ */ +/* $NetBSD: if_bnx.c,v 1.3 2007/03/04 06:02:19 christos Exp $ */ /* $OpenBSD: if_bnx.c,v 1.21 2006/08/21 03:32:11 brad Exp $ */ /*- @@ -35,7 +35,7 @@ #if 0 __FBSDID("$FreeBSD: src/sys/dev/bce/if_bce.c,v 1.3 2006/04/13 14:12:26 ru Exp $"); #endif -__KERNEL_RCSID(0, "$NetBSD: if_bnx.c,v 1.2 2007/02/15 19:24:47 bouyer Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_bnx.c,v 1.3 2007/03/04 06:02:19 christos Exp $"); /* * The following controllers are supported by this driver: @@ -331,7 +331,7 @@ void bnx_free_tx_chain(struct bnx_softc *); int bnx_tx_encap(struct bnx_softc *, struct mbuf *, u_int16_t *, u_int16_t *, u_int32_t *); void bnx_start(struct ifnet *); -int bnx_ioctl(struct ifnet *, u_long, caddr_t); +int bnx_ioctl(struct ifnet *, u_long, void *); void bnx_watchdog(struct ifnet *); int bnx_ifmedia_upd(struct ifnet *); void bnx_ifmedia_sts(struct ifnet *, struct ifmediareq *); @@ -1883,7 +1883,7 @@ bnx_dma_free(struct bnx_softc *sc) /* Destroy the status block. */ if (sc->status_block != NULL && sc->status_map != NULL) { bus_dmamap_unload(sc->bnx_dmatag, sc->status_map); - bus_dmamem_unmap(sc->bnx_dmatag, (caddr_t)sc->status_block, + bus_dmamem_unmap(sc->bnx_dmatag, (void *)sc->status_block, BNX_STATUS_BLK_SZ); bus_dmamem_free(sc->bnx_dmatag, &sc->status_seg, sc->status_rseg); @@ -1895,7 +1895,7 @@ bnx_dma_free(struct bnx_softc *sc) /* Destroy the statistics block. */ if (sc->stats_block != NULL && sc->stats_map != NULL) { bus_dmamap_unload(sc->bnx_dmatag, sc->stats_map); - bus_dmamem_unmap(sc->bnx_dmatag, (caddr_t)sc->stats_block, + bus_dmamem_unmap(sc->bnx_dmatag, (void *)sc->stats_block, BNX_STATS_BLK_SZ); bus_dmamem_free(sc->bnx_dmatag, &sc->stats_seg, sc->stats_rseg); @@ -1911,7 +1911,7 @@ bnx_dma_free(struct bnx_softc *sc) bus_dmamap_unload(sc->bnx_dmatag, sc->tx_bd_chain_map[i]); bus_dmamem_unmap(sc->bnx_dmatag, - (caddr_t)sc->tx_bd_chain[i], BNX_TX_CHAIN_PAGE_SZ); + (void *)sc->tx_bd_chain[i], BNX_TX_CHAIN_PAGE_SZ); bus_dmamem_free(sc->bnx_dmatag, &sc->tx_bd_chain_seg[i], sc->tx_bd_chain_rseg[i]); bus_dmamap_destroy(sc->bnx_dmatag, @@ -1936,7 +1936,7 @@ bnx_dma_free(struct bnx_softc *sc) bus_dmamap_unload(sc->bnx_dmatag, sc->rx_bd_chain_map[i]); bus_dmamem_unmap(sc->bnx_dmatag, - (caddr_t)sc->rx_bd_chain[i], BNX_RX_CHAIN_PAGE_SZ); + (void *)sc->rx_bd_chain[i], BNX_RX_CHAIN_PAGE_SZ); bus_dmamem_free(sc->bnx_dmatag, &sc->rx_bd_chain_seg[i], sc->rx_bd_chain_rseg[i]); @@ -2112,7 +2112,7 @@ bnx_dma_alloc(struct bnx_softc *sc) } if (bus_dmamem_map(sc->bnx_dmatag, &sc->status_seg, sc->status_rseg, - BNX_STATUS_BLK_SZ, (caddr_t *)&sc->status_block, BUS_DMA_NOWAIT)) { + BNX_STATUS_BLK_SZ, (void **)&sc->status_block, BUS_DMA_NOWAIT)) { aprint_error("%s: Could not map status block DMA memory!\n", sc->bnx_dev.dv_xname); rc = ENOMEM; @@ -2156,7 +2156,7 @@ bnx_dma_alloc(struct bnx_softc *sc) } if (bus_dmamem_map(sc->bnx_dmatag, &sc->stats_seg, sc->stats_rseg, - BNX_STATS_BLK_SZ, (caddr_t *)&sc->stats_block, BUS_DMA_NOWAIT)) { + BNX_STATS_BLK_SZ, (void **)&sc->stats_block, BUS_DMA_NOWAIT)) { aprint_error("%s: Could not map stats block DMA memory!\n", sc->bnx_dev.dv_xname); rc = ENOMEM; @@ -2205,7 +2205,7 @@ bnx_dma_alloc(struct bnx_softc *sc) if (bus_dmamem_map(sc->bnx_dmatag, &sc->tx_bd_chain_seg[i], sc->tx_bd_chain_rseg[i], BNX_TX_CHAIN_PAGE_SZ, - (caddr_t *)&sc->tx_bd_chain[i], BUS_DMA_NOWAIT)) { + (void **)&sc->tx_bd_chain[i], BUS_DMA_NOWAIT)) { aprint_error( "%s: Could not map TX desc %d DMA memory!\n", sc->bnx_dev.dv_xname, i); @@ -2214,7 +2214,7 @@ bnx_dma_alloc(struct bnx_softc *sc) } if (bus_dmamap_load(sc->bnx_dmatag, sc->tx_bd_chain_map[i], - (caddr_t)sc->tx_bd_chain[i], BNX_TX_CHAIN_PAGE_SZ, NULL, + (void *)sc->tx_bd_chain[i], BNX_TX_CHAIN_PAGE_SZ, NULL, BUS_DMA_NOWAIT)) { aprint_error( "%s: Could not load TX desc %d DMA memory!\n", @@ -2275,7 +2275,7 @@ bnx_dma_alloc(struct bnx_softc *sc) if (bus_dmamem_map(sc->bnx_dmatag, &sc->rx_bd_chain_seg[i], sc->rx_bd_chain_rseg[i], BNX_RX_CHAIN_PAGE_SZ, - (caddr_t *)&sc->rx_bd_chain[i], BUS_DMA_NOWAIT)) { + (void **)&sc->rx_bd_chain[i], BUS_DMA_NOWAIT)) { aprint_error( "%s: Could not map Rx desc %d DMA memory!\n", sc->bnx_dev.dv_xname, i); @@ -2284,7 +2284,7 @@ bnx_dma_alloc(struct bnx_softc *sc) } if (bus_dmamap_load(sc->bnx_dmatag, sc->rx_bd_chain_map[i], - (caddr_t)sc->rx_bd_chain[i], BNX_RX_CHAIN_PAGE_SZ, NULL, + (void *)sc->rx_bd_chain[i], BNX_RX_CHAIN_PAGE_SZ, NULL, BUS_DMA_NOWAIT)) { aprint_error( "%s: Could not load Rx desc %d DMA memory!\n", @@ -3930,7 +3930,7 @@ bnx_rx_intr(struct bnx_softc *sc) m_freem(m); goto bnx_rx_int_next_rx; } - m_copydata(m, 0, ETHER_HDR_LEN, (caddr_t)&vh); + m_copydata(m, 0, ETHER_HDR_LEN, (void *)&vh); vh.evl_proto = vh.evl_encap_proto; vh.evl_tag = l2fhdr->l2_fhdr_vlan_tag >> 16; vh.evl_encap_proto = htons(ETHERTYPE_VLAN); @@ -4428,7 +4428,7 @@ bnx_start_locked_exit: /* 0 for success, positive value for failure. */ /****************************************************************************/ int -bnx_ioctl(struct ifnet *ifp, u_long command, caddr_t data) +bnx_ioctl(struct ifnet *ifp, u_long command, void *data) { struct bnx_softc *sc = ifp->if_softc; struct ifreq *ifr = (struct ifreq *) data; diff --git a/sys/dev/pci/if_de.c b/sys/dev/pci/if_de.c index 41b5fbb213a..404928b22de 100644 --- a/sys/dev/pci/if_de.c +++ b/sys/dev/pci/if_de.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_de.c,v 1.122 2006/10/24 19:18:33 drochner Exp $ */ +/* $NetBSD: if_de.c,v 1.123 2007/03/04 06:02:19 christos Exp $ */ /*- * Copyright (c) 1994-1997 Matt Thomas (matt@3am-software.com) @@ -37,7 +37,7 @@ * board which support 21040, 21041, or 21140 (mostly). */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_de.c,v 1.122 2006/10/24 19:18:33 drochner Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_de.c,v 1.123 2007/03/04 06:02:19 christos Exp $"); #define TULIP_HDR_DATA @@ -2509,7 +2509,7 @@ tulip_srom_decode( /* * Save the hardware address. */ - memcpy((caddr_t) sc->tulip_enaddr, shp->sh_ieee802_address, + memcpy((void *) sc->tulip_enaddr, shp->sh_ieee802_address, ETHER_ADDR_LEN); /* * If this is a multiple port card, add the adapter index to the last @@ -3072,7 +3072,7 @@ tulip_read_macaddr( * Check for various boards based on OUI. Did I say braindead? */ for (idx = 0; tulip_vendors[idx].vendor_identify_nic != NULL; idx++) { - if (memcmp((caddr_t) sc->tulip_enaddr, + if (memcmp((void *) sc->tulip_enaddr, tulip_vendors[idx].vendor_oui, 3) == 0) { (*tulip_vendors[idx].vendor_identify_nic)(sc); break; @@ -3629,7 +3629,7 @@ tulip_rx_intr( #if NBPFILTER > 0 if (sc->tulip_bpf != NULL) { if (me == ms) - TULIP_BPF_TAP(sc, mtod(ms, caddr_t), total_len); + TULIP_BPF_TAP(sc, mtod(ms, void *), total_len); else TULIP_BPF_MTAP(sc, ms); } @@ -3747,7 +3747,7 @@ tulip_rx_intr( #error BIG_PACKET is incompatible with TULIP_COPY_RXDATA #endif m0->m_data += 2; /* align data after header */ - m_copydata(ms, 0, total_len, mtod(m0, caddr_t)); + m_copydata(ms, 0, total_len, mtod(m0, void *)); m0->m_len = m0->m_pkthdr.len = total_len; m0->m_pkthdr.rcvif = ifp; #if defined(__NetBSD__) @@ -3810,7 +3810,7 @@ tulip_rx_intr( } TULIP_RXDESC_POSTSYNC(sc, nextout, sizeof(*nextout)); #else /* TULIP_BUS_DMA */ - nextout->d_addr1 = TULIP_KVATOPHYS(sc, mtod(ms, caddr_t)); + nextout->d_addr1 = TULIP_KVATOPHYS(sc, mtod(ms, void *)); nextout->d_length1 = TULIP_RX_BUFLEN; #endif /* TULIP_BUS_DMA */ nextout->d_status = TULIP_DSTS_OWNER; @@ -4282,7 +4282,7 @@ tulip_mbuf_compress( return NULL; } } - m_copydata(m, 0, m->m_pkthdr.len, mtod(m0, caddr_t)); + m_copydata(m, 0, m->m_pkthdr.len, mtod(m0, void *)); m0->m_pkthdr.len = m0->m_len = m->m_pkthdr.len; } #else @@ -4313,7 +4313,7 @@ tulip_mbuf_compress( (*mp)->m_len = len <= mlen ? len : mlen; } m_copydata(m, m->m_pkthdr.len - len, - (*mp)->m_len, mtod((*mp), caddr_t)); + (*mp)->m_len, mtod((*mp), void *)); len -= (*mp)->m_len; mp = &(*mp)->m_next; mlen = MLEN; @@ -4472,7 +4472,7 @@ tulip_txput( do { int len = m0->m_len; - caddr_t addr = mtod(m0, caddr_t); + void *addr = mtod(m0, void *); unsigned clsize = PAGE_SIZE - (((u_long) addr) & PAGE_MASK); while (len > 0) { @@ -4581,12 +4581,12 @@ tulip_txput( #if defined(TULIP_BUS_MAP) && !defined(TULIP_BUS_DMA_NOTX) if (eop < ri->ri_nextout) { TULIP_TXDESC_PRESYNC(sc, ri->ri_nextout, - (caddr_t) ri->ri_last - (caddr_t) ri->ri_nextout); + (void *) ri->ri_last - (void *) ri->ri_nextout); TULIP_TXDESC_PRESYNC(sc, ri->ri_first, - (caddr_t) (eop + 1) - (caddr_t) ri->ri_first); + (void *) (eop + 1) - (void *) ri->ri_first); } else { TULIP_TXDESC_PRESYNC(sc, ri->ri_nextout, - (caddr_t) (eop + 1) - (caddr_t) ri->ri_nextout); + (void *) (eop + 1) - (void *) ri->ri_nextout); } #endif ri->ri_nextout->d_status = TULIP_DSTS_OWNER; @@ -4747,7 +4747,7 @@ static int tulip_ifioctl( struct ifnet * ifp, ioctl_cmd_t cmd, - caddr_t data) + void *data) { TULIP_PERFSTART(ifioctl) tulip_softc_t * const sc = TULIP_IFP_TO_SOFTC(ifp); @@ -4782,8 +4782,8 @@ tulip_ifioctl( break; } case SIOCGIFADDR: { - memcpy((caddr_t) ((struct sockaddr *)&ifr->ifr_data)->sa_data, - (caddr_t) sc->tulip_enaddr, ETHER_ADDR_LEN); + memcpy((void *) ((struct sockaddr *)&ifr->ifr_data)->sa_data, + (void *) sc->tulip_enaddr, ETHER_ADDR_LEN); break; } @@ -5316,7 +5316,7 @@ tulip_initring( ri->ri_max = ndescs; ri->ri_first = descs; ri->ri_last = ri->ri_first + ri->ri_max; - memset((caddr_t) ri->ri_first, 0, sizeof(ri->ri_first[0]) * ri->ri_max); + memset((void *) ri->ri_first, 0, sizeof(ri->ri_first[0]) * ri->ri_max); ri->ri_last[-1].d_flag = TULIP_DFLAG_ENDRING; } @@ -5342,7 +5342,7 @@ static const int tulip_eisa_irqs[4] = { IRQ5, IRQ9, IRQ10, IRQ11 }; #if defined(__FreeBSD__) #define TULIP_PCI_ATTACH_ARGS pcici_t config_id, int unit -#define TULIP_SHUTDOWN_ARGS int howto, void * arg +#define TULIP_SHUTDOWN_ARGS int howto, void *arg #if defined(TULIP_DEVCONF) static void tulip_shutdown(TULIP_SHUTDOWN_ARGS); @@ -5407,7 +5407,7 @@ DATA_SET (pcidevice_set, dedevice); #endif /* __FreeBSD__ */ #if defined(__bsdi__) -#define TULIP_PCI_ATTACH_ARGS struct device * const parent, struct device * const self, void * const aux +#define TULIP_PCI_ATTACH_ARGS struct device * const parent, struct device * const self, void *const aux #define TULIP_SHUTDOWN_ARGS void *arg static int @@ -5465,7 +5465,7 @@ tulip_probe( /* Disable memory space access */ pci_outl(pa, PCI_COMMAND, pci_inl(pa, PCI_COMMAND) & ~2); #else - ia->ia_maddr = (caddr_t) (pci_inl(pa, PCI_CBMA) & ~7); + ia->ia_maddr = (void *) (pci_inl(pa, PCI_CBMA) & ~7); pci_outl(pa, PCI_CBMA, 0xFFFFFFFF); ia->ia_msize = ((~pci_inl(pa, PCI_CBMA)) | 7) + 1; pci_outl(pa, PCI_CBMA, (int) ia->ia_maddr); @@ -5553,7 +5553,7 @@ struct cfdriver decd = { #endif /* __bsdi__ */ #if defined(__NetBSD__) -#define TULIP_PCI_ATTACH_ARGS struct device * const parent, struct device * const self, void * const aux +#define TULIP_PCI_ATTACH_ARGS struct device * const parent, struct device * const self, void *const aux #define TULIP_SHUTDOWN_ARGS void *arg static int tulip_pci_probe( @@ -5774,7 +5774,7 @@ tulip_pci_attach( retval = pci_map_mem(config_id, PCI_CBMA, (vaddr_t *) &csr_base, &pa_csrs); #endif if (!retval) { - free((caddr_t) sc, M_DEVBUF); + free((void *) sc, M_DEVBUF); return; } tulips[unit] = sc; diff --git a/sys/dev/pci/if_devar.h b/sys/dev/pci/if_devar.h index 65a8aa8153f..68a7063c56a 100644 --- a/sys/dev/pci/if_devar.h +++ b/sys/dev/pci/if_devar.h @@ -1,4 +1,4 @@ -/* $NetBSD: if_devar.h,v 1.46 2006/11/22 01:54:09 uebayasi Exp $ */ +/* $NetBSD: if_devar.h,v 1.47 2007/03/04 06:02:20 christos Exp $ */ /*- * Copyright (c) 1994-1997 Matt Thomas (matt@3am-software.com) @@ -480,7 +480,7 @@ struct _tulip_softc_t { struct intrhand tulip_ih; /* intrrupt vectoring */ struct atshutdown tulip_ats; /* shutdown hook */ #if _BSDI_VERSION < 199401 - caddr_t tulip_bpf; /* for BPF */ + void *tulip_bpf; /* for BPF */ #else prf_t tulip_pf; /* printf function */ #if _BSDI_VERSION >= 199701 @@ -878,11 +878,11 @@ static void tulip_softintr(void); #if defined(TULIP_BUS_DMA) && !defined(TULIP_BUS_DMA_NORX) #define TULIP_RXDESC_PRESYNC(sc, di, s) \ bus_dmamap_sync((sc)->tulip_dmatag, (sc)->tulip_rxdescmap, \ - (caddr_t) di - (caddr_t) (sc)->tulip_rxdescs, \ + (void *) di - (void *) (sc)->tulip_rxdescs, \ (s), BUS_DMASYNC_PREREAD|BUS_DMASYNC_PREWRITE) #define TULIP_RXDESC_POSTSYNC(sc, di, s) \ bus_dmamap_sync((sc)->tulip_dmatag, (sc)->tulip_rxdescmap, \ - (caddr_t) di - (caddr_t) (sc)->tulip_rxdescs, \ + (void *) di - (void *) (sc)->tulip_rxdescs, \ (s), BUS_DMASYNC_POSTREAD|BUS_DMASYNC_POSTWRITE) #define TULIP_RXMAP_PRESYNC(sc, map) \ bus_dmamap_sync((sc)->tulip_dmatag, (map), 0, (map)->dm_mapsize, \ @@ -905,11 +905,11 @@ static void tulip_softintr(void); #if defined(TULIP_BUS_DMA) && !defined(TULIP_BUS_DMA_NOTX) #define TULIP_TXDESC_PRESYNC(sc, di, s) \ bus_dmamap_sync((sc)->tulip_dmatag, (sc)->tulip_txdescmap, \ - (caddr_t) di - (caddr_t) (sc)->tulip_txdescs, \ + (void *) di - (void *) (sc)->tulip_txdescs, \ (s), BUS_DMASYNC_PREREAD|BUS_DMASYNC_PREWRITE) #define TULIP_TXDESC_POSTSYNC(sc, di, s) \ bus_dmamap_sync((sc)->tulip_dmatag, (sc)->tulip_txdescmap, \ - (caddr_t) di - (caddr_t) (sc)->tulip_txdescs, \ + (void *) di - (void *) (sc)->tulip_txdescs, \ (s), BUS_DMASYNC_POSTREAD|BUS_DMASYNC_POSTWRITE) #define TULIP_TXMAP_PRESYNC(sc, map) \ bus_dmamap_sync((sc)->tulip_dmatag, (map), 0, (map)->dm_mapsize, \ diff --git a/sys/dev/pci/if_dge.c b/sys/dev/pci/if_dge.c index 5d1d082c72b..ef7a4f4baa6 100644 --- a/sys/dev/pci/if_dge.c +++ b/sys/dev/pci/if_dge.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_dge.c,v 1.14 2006/11/16 01:33:08 christos Exp $ */ +/* $NetBSD: if_dge.c,v 1.15 2007/03/04 06:02:20 christos Exp $ */ /* * Copyright (c) 2004, SUNET, Swedish University Computer Network. @@ -80,7 +80,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_dge.c,v 1.14 2006/11/16 01:33:08 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_dge.c,v 1.15 2007/03/04 06:02:20 christos Exp $"); #include "bpfilter.h" #include "rnd.h" @@ -343,7 +343,7 @@ struct dge_softc { rndsource_element_t rnd_source; /* random source */ #endif #ifdef DGE_OFFBYONE_RXBUG - caddr_t sc_bugbuf; + void *sc_bugbuf; SLIST_HEAD(, rxbugentry) sc_buglist; bus_dmamap_t sc_bugmap; struct rxbugentry *sc_entry; @@ -483,7 +483,7 @@ struct rxbugentry { static int dge_alloc_rcvmem(struct dge_softc *sc) { - caddr_t ptr, kva; + char *ptr, *kva; bus_dma_segment_t seg; int i, rseg, state, error; struct rxbugentry *entry; @@ -497,7 +497,7 @@ dge_alloc_rcvmem(struct dge_softc *sc) } state = 1; - if (bus_dmamem_map(sc->sc_dmat, &seg, rseg, DGE_RXMEM, &kva, + if (bus_dmamem_map(sc->sc_dmat, &seg, rseg, DGE_RXMEM, (void **)&kva, BUS_DMA_NOWAIT)) { printf("%s: can't map DMA buffers (%d bytes)\n", sc->sc_dev.dv_xname, (int)DGE_RXMEM); @@ -522,7 +522,7 @@ dge_alloc_rcvmem(struct dge_softc *sc) } state = 4; - sc->sc_bugbuf = (caddr_t)kva; + sc->sc_bugbuf = (void *)kva; SLIST_INIT(&sc->sc_buglist); /* @@ -576,14 +576,14 @@ dge_getbuf(struct dge_softc *sc) } SLIST_REMOVE_HEAD(&sc->sc_buglist, rb_entry); - return sc->sc_bugbuf + entry->rb_slot * DGE_BUFFER_SIZE; + return (char *)sc->sc_bugbuf + entry->rb_slot * DGE_BUFFER_SIZE; } /* * Release a jumbo buffer. */ static void -dge_freebuf(struct mbuf *m, caddr_t buf, size_t size, void *arg) +dge_freebuf(struct mbuf *m, void *buf, size_t size, void *arg) { struct rxbugentry *entry; struct dge_softc *sc; @@ -597,7 +597,7 @@ dge_freebuf(struct mbuf *m, caddr_t buf, size_t size, void *arg) /* calculate the slot this buffer belongs to */ - i = (buf - sc->sc_bugbuf) / DGE_BUFFER_SIZE; + i = ((char *)buf - (char *)sc->sc_bugbuf) / DGE_BUFFER_SIZE; if ((i < 0) || (i >= DGE_NBUFFERS)) panic("dge_freebuf: asked to free buffer %d!", i); @@ -614,7 +614,7 @@ dge_freebuf(struct mbuf *m, caddr_t buf, size_t size, void *arg) static void dge_start(struct ifnet *); static void dge_watchdog(struct ifnet *); -static int dge_ioctl(struct ifnet *, u_long, caddr_t); +static int dge_ioctl(struct ifnet *, u_long, void *); static int dge_init(struct ifnet *); static void dge_stop(struct ifnet *, int); @@ -774,7 +774,7 @@ dge_attach(struct device *parent, struct device *self, void *aux) } if ((error = bus_dmamem_map(sc->sc_dmat, &seg, rseg, - sizeof(struct dge_control_data), (caddr_t *)&sc->sc_control_data, + sizeof(struct dge_control_data), (void **)&sc->sc_control_data, 0)) != 0) { aprint_error("%s: unable to map control data, error = %d\n", sc->sc_dev.dv_xname, error); @@ -993,7 +993,7 @@ dge_attach(struct device *parent, struct device *self, void *aux) fail_3: bus_dmamap_destroy(sc->sc_dmat, sc->sc_cddmamap); fail_2: - bus_dmamem_unmap(sc->sc_dmat, (caddr_t)sc->sc_control_data, + bus_dmamem_unmap(sc->sc_dmat, (void *)sc->sc_control_data, sizeof(struct dge_control_data)); fail_1: bus_dmamem_free(sc->sc_dmat, &seg, rseg); @@ -1406,7 +1406,7 @@ dge_watchdog(struct ifnet *ifp) * Handle control requests from the operator. */ static int -dge_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) +dge_ioctl(struct ifnet *ifp, u_long cmd, void *data) { struct dge_softc *sc = ifp->if_softc; struct ifreq *ifr = (struct ifreq *) data; @@ -2106,7 +2106,7 @@ dge_add_rxbuf(struct dge_softc *sc, int idx) struct mbuf *m; int error; #ifdef DGE_OFFBYONE_RXBUG - caddr_t buf; + void *buf; #endif MGETHDR(m, M_DONTWAIT, MT_DATA); diff --git a/sys/dev/pci/if_fpa.c b/sys/dev/pci/if_fpa.c index 56d2a0cdb29..a458099540b 100644 --- a/sys/dev/pci/if_fpa.c +++ b/sys/dev/pci/if_fpa.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_fpa.c,v 1.47 2006/11/16 01:33:08 christos Exp $ */ +/* $NetBSD: if_fpa.c,v 1.48 2007/03/04 06:02:20 christos Exp $ */ /*- * Copyright (c) 1995, 1996 Matt Thomas <matt@3am-software.com> @@ -34,7 +34,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_fpa.c,v 1.47 2006/11/16 01:33:08 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_fpa.c,v 1.48 2007/03/04 06:02:20 christos Exp $"); #ifdef __NetBSD__ #include "opt_inet.h" @@ -223,7 +223,7 @@ pdq_pci_attach( free((void *) sc, M_DEVBUF); return; } - bcopy((caddr_t) sc->sc_pdq->pdq_hwaddr.lanaddr_bytes, sc->sc_ac.ac_enaddr, 6); + bcopy((void *) sc->sc_pdq->pdq_hwaddr.lanaddr_bytes, sc->sc_ac.ac_enaddr, 6); pdqs_pci[unit] = sc; pdq_ifattach(sc, pdq_pci_ifwatchdog); pci_map_int(config_id, pdq_pci_ifintr, (void*) sc, &net_imask); @@ -319,7 +319,7 @@ pdq_pci_probe( ia->ia_drq = DRQNONE; /* Get the memory base address; assume the BIOS set it up correctly */ - ia->ia_maddr = (caddr_t) (pci_inl(pa, PCI_CBMA) & ~7); + ia->ia_maddr = (void *) (pci_inl(pa, PCI_CBMA) & ~7); pci_outl(pa, PCI_CBMA, 0xFFFFFFFF); ia->ia_msize = ((~pci_inl(pa, PCI_CBMA)) | 7) + 1; pci_outl(pa, PCI_CBMA, (int) ia->ia_maddr); @@ -365,7 +365,7 @@ pdq_pci_attach( return; } - bcopy((caddr_t) sc->sc_pdq->pdq_hwaddr.lanaddr_bytes, sc->sc_ac.ac_enaddr, 6); + bcopy((void *) sc->sc_pdq->pdq_hwaddr.lanaddr_bytes, sc->sc_ac.ac_enaddr, 6); pdq_ifattach(sc, pdq_pci_ifwatchdog); @@ -410,7 +410,7 @@ static void pdq_pci_attach( struct device * const parent, struct device * const self, - void * const aux) + void *const aux) { pdq_softc_t * const sc = (pdq_softc_t *)self; struct pci_attach_args * const pa = (struct pci_attach_args *) aux; diff --git a/sys/dev/pci/if_ipw.c b/sys/dev/pci/if_ipw.c index ff318602e70..a8f2f182d27 100644 --- a/sys/dev/pci/if_ipw.c +++ b/sys/dev/pci/if_ipw.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_ipw.c,v 1.31 2006/11/16 01:33:08 christos Exp $ */ +/* $NetBSD: if_ipw.c,v 1.32 2007/03/04 06:02:20 christos Exp $ */ /* FreeBSD: src/sys/dev/ipw/if_ipw.c,v 1.15 2005/11/13 17:17:40 damien Exp */ /*- @@ -29,7 +29,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_ipw.c,v 1.31 2006/11/16 01:33:08 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_ipw.c,v 1.32 2007/03/04 06:02:20 christos Exp $"); /*- * Intel(R) PRO/Wireless 2100 MiniPCI driver @@ -116,7 +116,7 @@ static int ipw_tx_start(struct ifnet *, struct mbuf *, struct ieee80211_node *); static void ipw_start(struct ifnet *); static void ipw_watchdog(struct ifnet *); -static int ipw_ioctl(struct ifnet *, u_long, caddr_t); +static int ipw_ioctl(struct ifnet *, u_long, void *); static int ipw_get_table1(struct ipw_softc *, uint32_t *); static int ipw_get_radio(struct ipw_softc *, int *); static void ipw_stop_master(struct ipw_softc *); @@ -417,7 +417,7 @@ ipw_dma_alloc(struct ipw_softc *sc) } error = bus_dmamem_map(sc->sc_dmat, &sc->tbd_seg, nsegs, IPW_TBD_SZ, - (caddr_t *)&sc->tbd_list, BUS_DMA_NOWAIT); + (void **)&sc->tbd_list, BUS_DMA_NOWAIT); if (error != 0) { aprint_error("%s: could not map tbd dma memory\n", sc->sc_dev.dv_xname); @@ -454,7 +454,7 @@ ipw_dma_alloc(struct ipw_softc *sc) } error = bus_dmamem_map(sc->sc_dmat, &sc->rbd_seg, nsegs, IPW_RBD_SZ, - (caddr_t *)&sc->rbd_list, BUS_DMA_NOWAIT); + (void **)&sc->rbd_list, BUS_DMA_NOWAIT); if (error != 0) { aprint_error("%s: could not map rbd dma memory\n", sc->sc_dev.dv_xname); @@ -491,7 +491,7 @@ ipw_dma_alloc(struct ipw_softc *sc) } error = bus_dmamem_map(sc->sc_dmat, &sc->status_seg, nsegs, - IPW_STATUS_SZ, (caddr_t *)&sc->status_list, BUS_DMA_NOWAIT); + IPW_STATUS_SZ, (void **)&sc->status_list, BUS_DMA_NOWAIT); if (error != 0) { aprint_error("%s: could not map status dma memory\n", sc->sc_dev.dv_xname); @@ -528,7 +528,7 @@ ipw_dma_alloc(struct ipw_softc *sc) } error = bus_dmamem_map(sc->sc_dmat, &sc->cmd_seg, nsegs, - sizeof (struct ipw_cmd), (caddr_t *)&sc->cmd, BUS_DMA_NOWAIT); + sizeof (struct ipw_cmd), (void **)&sc->cmd, BUS_DMA_NOWAIT); if (error != 0) { aprint_error("%s: could not map cmd dma memory\n", sc->sc_dev.dv_xname); @@ -567,7 +567,7 @@ ipw_dma_alloc(struct ipw_softc *sc) } error = bus_dmamem_map(sc->sc_dmat, &sc->hdr_seg, nsegs, - IPW_NDATA * sizeof(struct ipw_hdr), (caddr_t *)&sc->hdr_list, + IPW_NDATA * sizeof(struct ipw_hdr), (void **)&sc->hdr_list, BUS_DMA_NOWAIT); if (error != 0) { aprint_error("%s: could not map hdr memory\n", @@ -697,7 +697,7 @@ ipw_release(struct ipw_softc *sc) if (sc->tbd_map != NULL) { if (sc->tbd_list != NULL) { bus_dmamap_unload(sc->sc_dmat, sc->tbd_map); - bus_dmamem_unmap(sc->sc_dmat, (caddr_t)sc->tbd_list, + bus_dmamem_unmap(sc->sc_dmat, (void *)sc->tbd_list, IPW_TBD_SZ); bus_dmamem_free(sc->sc_dmat, &sc->tbd_seg, 1); } @@ -707,7 +707,7 @@ ipw_release(struct ipw_softc *sc) if (sc->rbd_map != NULL) { if (sc->rbd_list != NULL) { bus_dmamap_unload(sc->sc_dmat, sc->rbd_map); - bus_dmamem_unmap(sc->sc_dmat, (caddr_t)sc->rbd_list, + bus_dmamem_unmap(sc->sc_dmat, (void *)sc->rbd_list, IPW_RBD_SZ); bus_dmamem_free(sc->sc_dmat, &sc->rbd_seg, 1); } @@ -717,7 +717,7 @@ ipw_release(struct ipw_softc *sc) if (sc->status_map != NULL) { if (sc->status_list != NULL) { bus_dmamap_unload(sc->sc_dmat, sc->status_map); - bus_dmamem_unmap(sc->sc_dmat, (caddr_t)sc->status_list, + bus_dmamem_unmap(sc->sc_dmat, (void *)sc->status_list, IPW_RBD_SZ); bus_dmamem_free(sc->sc_dmat, &sc->status_seg, 1); } @@ -732,7 +732,7 @@ ipw_release(struct ipw_softc *sc) if (sc->hdr_list != NULL) { bus_dmamap_unload(sc->sc_dmat, sc->hdr_map); - bus_dmamem_unmap(sc->sc_dmat, (caddr_t)sc->hdr_list, + bus_dmamem_unmap(sc->sc_dmat, (void *)sc->hdr_list, IPW_NDATA * sizeof(struct ipw_hdr)); } if (sc->hdr_map != NULL) { @@ -1496,7 +1496,7 @@ ipw_tx_start(struct ifnet *ifp, struct mbuf *m0, struct ieee80211_node *ni) return ENOMEM; } } - m_copydata(m0, 0, m0->m_pkthdr.len, mtod(mnew, caddr_t)); + m_copydata(m0, 0, m0->m_pkthdr.len, mtod(mnew, void *)); m_freem(m0); mnew->m_len = mnew->m_pkthdr.len; m0 = mnew; @@ -1708,7 +1708,7 @@ ipw_get_radio(struct ipw_softc *sc, int *ret) } static int -ipw_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) +ipw_ioctl(struct ifnet *ifp, u_long cmd, void *data) { #define IS_RUNNING(ifp) \ ((ifp->if_flags & IFF_UP) && (ifp->if_flags & IFF_RUNNING)) diff --git a/sys/dev/pci/if_iwi.c b/sys/dev/pci/if_iwi.c index 3a5d3325ffe..689106e8fc8 100644 --- a/sys/dev/pci/if_iwi.c +++ b/sys/dev/pci/if_iwi.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_iwi.c,v 1.60 2007/01/23 15:02:50 skrll Exp $ */ +/* $NetBSD: if_iwi.c,v 1.61 2007/03/04 06:02:20 christos Exp $ */ /*- * Copyright (c) 2004, 2005 @@ -28,7 +28,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_iwi.c,v 1.60 2007/01/23 15:02:50 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_iwi.c,v 1.61 2007/03/04 06:02:20 christos Exp $"); /*- * Intel(R) PRO/Wireless 2200BG/2225BG/2915ABG driver @@ -143,7 +143,7 @@ static void iwi_free_unr(struct iwi_softc *, int); static int iwi_get_table0(struct iwi_softc *, uint32_t *); -static int iwi_ioctl(struct ifnet *, u_long, caddr_t); +static int iwi_ioctl(struct ifnet *, u_long, void *); static void iwi_stop_master(struct iwi_softc *); static int iwi_reset(struct iwi_softc *); static int iwi_load_ucode(struct iwi_softc *, void *, int); @@ -535,7 +535,7 @@ iwi_alloc_cmd_ring(struct iwi_softc *sc, struct iwi_cmd_ring *ring, error = bus_dmamem_map(sc->sc_dmat, &sc->cmdq.desc_seg, nsegs, IWI_CMD_DESC_SIZE * count, - (caddr_t *)&sc->cmdq.desc, BUS_DMA_NOWAIT); + (void **)&sc->cmdq.desc, BUS_DMA_NOWAIT); if (error != 0) { aprint_error("%s: could not map command ring DMA memory\n", sc->sc_dev.dv_xname); @@ -584,7 +584,7 @@ iwi_free_cmd_ring(struct iwi_softc *sc, struct iwi_cmd_ring *ring) if (ring->desc_map != NULL) { if (ring->desc != NULL) { bus_dmamap_unload(sc->sc_dmat, ring->desc_map); - bus_dmamem_unmap(sc->sc_dmat, (caddr_t)ring->desc, + bus_dmamem_unmap(sc->sc_dmat, (void *)ring->desc, IWI_CMD_DESC_SIZE * ring->count); bus_dmamem_free(sc->sc_dmat, &ring->desc_seg, 1); } @@ -628,7 +628,7 @@ iwi_alloc_tx_ring(struct iwi_softc *sc, struct iwi_tx_ring *ring, error = bus_dmamem_map(sc->sc_dmat, &ring->desc_seg, nsegs, IWI_TX_DESC_SIZE * count, - (caddr_t *)&ring->desc, BUS_DMA_NOWAIT); + (void **)&ring->desc, BUS_DMA_NOWAIT); if (error != 0) { aprint_error("%s: could not map tx ring DMA memory\n", sc->sc_dev.dv_xname); @@ -708,7 +708,7 @@ iwi_free_tx_ring(struct iwi_softc *sc, struct iwi_tx_ring *ring) if (ring->desc_map != NULL) { if (ring->desc != NULL) { bus_dmamap_unload(sc->sc_dmat, ring->desc_map); - bus_dmamem_unmap(sc->sc_dmat, (caddr_t)ring->desc, + bus_dmamem_unmap(sc->sc_dmat, (void *)ring->desc, IWI_TX_DESC_SIZE * ring->count); bus_dmamem_free(sc->sc_dmat, &ring->desc_seg, 1); } @@ -1687,7 +1687,7 @@ iwi_tx_start(struct ifnet *ifp, struct mbuf *m0, struct ieee80211_node *ni, desc = &txq->desc[txq->cur]; /* save and trim IEEE802.11 header */ - m_copydata(m0, 0, hdrlen, (caddr_t)&desc->wh); + m_copydata(m0, 0, hdrlen, (void *)&desc->wh); m_adj(m0, hdrlen); error = bus_dmamap_load_mbuf(sc->sc_dmat, data->map, m0, @@ -1718,7 +1718,7 @@ iwi_tx_start(struct ifnet *ifp, struct mbuf *m0, struct ieee80211_node *ni, return ENOMEM; } } - m_copydata(m0, 0, m0->m_pkthdr.len, mtod(mnew, caddr_t)); + m_copydata(m0, 0, m0->m_pkthdr.len, mtod(mnew, void *)); m_freem(m0); mnew->m_len = mnew->m_pkthdr.len; m0 = mnew; @@ -1908,7 +1908,7 @@ iwi_get_table0(struct iwi_softc *sc, uint32_t *tbl) } static int -iwi_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) +iwi_ioctl(struct ifnet *ifp, u_long cmd, void *data) { #define IS_RUNNING(ifp) \ ((ifp->if_flags & IFF_UP) && (ifp->if_flags & IFF_RUNNING)) diff --git a/sys/dev/pci/if_kse.c b/sys/dev/pci/if_kse.c index d2347170b3e..e13b4dea673 100644 --- a/sys/dev/pci/if_kse.c +++ b/sys/dev/pci/if_kse.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_kse.c,v 1.2 2006/09/29 08:49:30 tsutsui Exp $ */ +/* $NetBSD: if_kse.c,v 1.3 2007/03/04 06:02:20 christos Exp $ */ /* * Copyright (c) 2006 Tohru Nishimura @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_kse.c,v 1.2 2006/09/29 08:49:30 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_kse.c,v 1.3 2007/03/04 06:02:20 christos Exp $"); #include "bpfilter.h" @@ -283,7 +283,7 @@ static void kse_attach(struct device *, struct device *, void *); CFATTACH_DECL(kse, sizeof(struct kse_softc), kse_match, kse_attach, NULL, NULL); -static int kse_ioctl(struct ifnet *, u_long, caddr_t); +static int kse_ioctl(struct ifnet *, u_long, void *); static void kse_start(struct ifnet *); static void kse_watchdog(struct ifnet *); static int kse_init(struct ifnet *); @@ -416,7 +416,7 @@ kse_attach(struct device *parent, struct device *self, void *aux) goto fail_0; } error = bus_dmamem_map(sc->sc_dmat, &seg, nseg, - sizeof(struct kse_control_data), (caddr_t *)&sc->sc_control_data, + sizeof(struct kse_control_data), (void **)&sc->sc_control_data, BUS_DMA_COHERENT); if (error != 0) { printf("%s: unable to map control data, error = %d\n", @@ -511,7 +511,7 @@ kse_attach(struct device *parent, struct device *self, void *aux) fail_3: bus_dmamap_destroy(sc->sc_dmat, sc->sc_cddmamap); fail_2: - bus_dmamem_unmap(sc->sc_dmat, (caddr_t)sc->sc_control_data, + bus_dmamem_unmap(sc->sc_dmat, (void *)sc->sc_control_data, sizeof(struct kse_control_data)); fail_1: bus_dmamem_free(sc->sc_dmat, &seg, nseg); @@ -520,7 +520,7 @@ kse_attach(struct device *parent, struct device *self, void *aux) } static int -kse_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) +kse_ioctl(struct ifnet *ifp, u_long cmd, void *data) { struct kse_softc *sc = ifp->if_softc; struct ifreq *ifr = (struct ifreq *)data; diff --git a/sys/dev/pci/if_le_pci.c b/sys/dev/pci/if_le_pci.c index f81b9e82870..f0cd672e896 100644 --- a/sys/dev/pci/if_le_pci.c +++ b/sys/dev/pci/if_le_pci.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_le_pci.c,v 1.45 2006/11/16 01:33:09 christos Exp $ */ +/* $NetBSD: if_le_pci.c,v 1.46 2007/03/04 06:02:20 christos Exp $ */ /*- * Copyright (c) 1997, 1998 The NetBSD Foundation, Inc. @@ -72,7 +72,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_le_pci.c,v 1.45 2006/11/16 01:33:09 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_le_pci.c,v 1.46 2007/03/04 06:02:20 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -284,7 +284,7 @@ le_pci_attach(struct device *parent, struct device *self, void *aux) return; } if (bus_dmamem_map(dmat, &seg, rseg, LE_PCI_MEMSIZE, - (caddr_t *)&sc->sc_mem, + (void **)&sc->sc_mem, BUS_DMA_NOWAIT|BUS_DMA_COHERENT)) { printf("%s: couldn't map memory for card\n", sc->sc_dev.dv_xname); diff --git a/sys/dev/pci/if_lmc.c b/sys/dev/pci/if_lmc.c index eaa245cef0b..c2c32f5125a 100644 --- a/sys/dev/pci/if_lmc.c +++ b/sys/dev/pci/if_lmc.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_lmc.c,v 1.33 2007/02/17 22:34:07 dyoung Exp $ */ +/* $NetBSD: if_lmc.c,v 1.34 2007/03/04 06:02:20 christos Exp $ */ /*- * Copyright (c) 2002-2006 David Boggs. <boggs@boggs.palo-alto.ca.us> @@ -2654,7 +2654,7 @@ static struct stack netgraph_stack = }; static int /* context: process */ -netgraph_ioctl(softc_t *sc, u_long cmd, caddr_t data) +netgraph_ioctl(softc_t *sc, u_long cmd, void *data) { if (sc->config.debug) printf("%s: netgraph_ioctl() was called\n", NAME_UNIT); @@ -3130,7 +3130,7 @@ static struct stack p2p_stack = }; static int /* context: process */ -p2p_stack_ioctl(softc_t *sc, u_long cmd, caddr_t data) +p2p_stack_ioctl(softc_t *sc, u_long cmd, void *data) { return p2p_ioctl(sc->ifp, cmd, data); } @@ -3279,7 +3279,7 @@ p2p_stack_detach(softc_t *sc) /* Callout from P2P: */ /* Get the state of DCD (Data Carrier Detect). */ static int /* never fails */ -p2p_getmdm(struct p2pcom *p2p, caddr_t result) +p2p_getmdm(struct p2pcom *p2p, void *result) { softc_t *sc = IFP2SC(&p2p->p2p_if); @@ -3327,7 +3327,7 @@ static struct stack sppp_stack = # endif static int /* context: process */ -sppp_stack_ioctl(softc_t *sc, u_long cmd, caddr_t data) +sppp_stack_ioctl(softc_t *sc, u_long cmd, void *data) { return sppp_ioctl(sc->ifp, cmd, data); } @@ -3537,7 +3537,7 @@ static struct stack rawip_stack = #if IFNET static int /* context: process */ -rawip_ioctl(softc_t *sc, u_long cmd, caddr_t data) +rawip_ioctl(softc_t *sc, u_long cmd, void *data) { struct ifreq *ifr = (struct ifreq *) data; int error = 0; @@ -3788,7 +3788,7 @@ ifnet_output(struct ifnet *ifp, struct mbuf *m, } static int /* context: process */ -ifnet_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) +ifnet_ioctl(struct ifnet *ifp, u_long cmd, void *data) { softc_t *sc = IFP2SC(ifp); struct ifreq *ifr = (struct ifreq *) data; @@ -4939,7 +4939,7 @@ create_ring(softc_t *sc, struct desc_ring *ring, int num_descs) /* Map physical address to kernel virtual address. */ if ((error = bus_dmamem_map(ring->tag, ring->segs, ring->nsegs, - size_descs, (caddr_t *)&ring->first, BUS_DMA_NOWAIT | BUS_DMA_COHERENT))) + size_descs, (void **)&ring->first, BUS_DMA_NOWAIT | BUS_DMA_COHERENT))) { printf("%s: bus_dmamem_map(): error %d\n", NAME_UNIT, error); return error; @@ -5058,7 +5058,7 @@ destroy_ring(softc_t *sc, struct desc_ring *ring) bus_dmamap_destroy(ring->tag, ring->map); /* Unmap kernel address for DMA descriptor array. */ if (ring->first) - bus_dmamem_unmap(ring->tag, (caddr_t)ring->first, ring->size_descs); + bus_dmamem_unmap(ring->tag, (void *)ring->first, ring->size_descs); /* Free kernel memory for DMA descriptor array. */ if (ring->segs[0].ds_addr) bus_dmamem_free(ring->tag, ring->segs, ring->nsegs); @@ -6239,7 +6239,7 @@ attach_stack(softc_t *sc, struct config *config) * Always called with top_lock held. */ static int /* context: process */ -lmc_ioctl(softc_t *sc, u_long cmd, caddr_t data) +lmc_ioctl(softc_t *sc, u_long cmd, void *data) { struct iohdr *iohdr = (struct iohdr *) data; struct ioctl *ioctl = (struct ioctl *) data; diff --git a/sys/dev/pci/if_lmc.h b/sys/dev/pci/if_lmc.h index 2dd283552ad..b8806a2af2f 100644 --- a/sys/dev/pci/if_lmc.h +++ b/sys/dev/pci/if_lmc.h @@ -1,5 +1,5 @@ /*- - * $NetBSD: if_lmc.h,v 1.8 2007/02/17 22:34:07 dyoung Exp $ + * $NetBSD: if_lmc.h,v 1.9 2007/03/04 06:02:21 christos Exp $ * * Copyright (c) 2002-2006 David Boggs. (boggs@boggs.palo-alto.ca.us) * All rights reserved. @@ -1248,7 +1248,7 @@ struct card /* an object */ struct stack /* an object */ { #if IFNET || NETGRAPH - int (*ioctl) (softc_t *, u_long, caddr_t); + int (*ioctl) (softc_t *, u_long, void *); void (*input) (softc_t *, struct mbuf *); void (*output) (softc_t *); #elif NETDEV @@ -1491,7 +1491,7 @@ static void t1_attach(softc_t *, struct config *); static void t1_detach(softc_t *); #if NETGRAPH -static int netgraph_ioctl(softc_t *, u_long, caddr_t); +static int netgraph_ioctl(softc_t *, u_long, void *); static void netgraph_input(softc_t *, struct mbuf *); static void netgraph_output(softc_t *); static void netgraph_watchdog(softc_t *); @@ -1523,19 +1523,19 @@ static int gen_hdlc_card_params(struct net_device *, unsigned short, #endif /* GEN_HDLC */ #if P2P -static int p2p_stack_ioctl(softc_t *, u_long, caddr_t); +static int p2p_stack_ioctl(softc_t *, u_long, void *); static void p2p_stack_input(softc_t *, struct mbuf *); static void p2p_stack_output(softc_t *); static void p2p_stack_watchdog(softc_t *); static int p2p_stack_open(softc_t *, struct config *); static int p2p_stack_attach(softc_t *, struct config *); static int p2p_stack_detach(softc_t *); -static int p2p_getmdm(struct p2pcom *, caddr_t); +static int p2p_getmdm(struct p2pcom *, void *); static int p2p_mdmctl(struct p2pcom *, int); #endif /* P2P */ #if SPPP -static int sppp_stack_ioctl(softc_t *, u_long, caddr_t); +static int sppp_stack_ioctl(softc_t *, u_long, void *); static void sppp_stack_input(softc_t *, struct mbuf *); static void sppp_stack_output(softc_t *); static void sppp_stack_watchdog(softc_t *); @@ -1547,7 +1547,7 @@ static void sppp_tlf(struct sppp *); #endif /* SPPP */ #if IFNET -static int rawip_ioctl(softc_t *, u_long, caddr_t); +static int rawip_ioctl(softc_t *, u_long, void *); static void rawip_input(softc_t *, struct mbuf *); static void rawip_output(softc_t *); #elif NETDEV @@ -1564,7 +1564,7 @@ static int rawip_detach(softc_t *); static void ifnet_input(struct ifnet *, struct mbuf *); static int ifnet_output(struct ifnet *, struct mbuf *, const struct sockaddr *, struct rtentry *); -static int ifnet_ioctl(struct ifnet *, u_long, caddr_t); +static int ifnet_ioctl(struct ifnet *, u_long, void *); static void ifnet_start(struct ifnet *); static void ifnet_watchdog(struct ifnet *); @@ -1647,7 +1647,7 @@ static irqreturn_t linux_interrupt(int, void *, struct pt_regs *); static int open_proto(softc_t *, struct config *); static int attach_stack(softc_t *, struct config *); -static int lmc_ioctl(softc_t *, u_long, caddr_t); +static int lmc_ioctl(softc_t *, u_long, void *); static void lmc_watchdog(softc_t *); static void set_ready(softc_t *, int); diff --git a/sys/dev/pci/if_msk.c b/sys/dev/pci/if_msk.c index 74bf8dd92cf..06454466d9d 100644 --- a/sys/dev/pci/if_msk.c +++ b/sys/dev/pci/if_msk.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_msk.c,v 1.7 2007/01/31 09:57:45 msaitoh Exp $ */ +/* $NetBSD: if_msk.c,v 1.8 2007/03/04 06:02:21 christos Exp $ */ /* $OpenBSD: if_msk.c,v 1.42 2007/01/17 02:43:02 krw Exp $ */ /* @@ -108,7 +108,7 @@ void msk_rxeof(struct sk_if_softc *, u_int16_t, u_int32_t); void msk_txeof(struct sk_if_softc *, int); int msk_encap(struct sk_if_softc *, struct mbuf *, u_int32_t *); void msk_start(struct ifnet *); -int msk_ioctl(struct ifnet *, u_long, caddr_t); +int msk_ioctl(struct ifnet *, u_long, void *); int msk_init(struct ifnet *); void msk_init_yukon(struct sk_if_softc *); void msk_stop(struct ifnet *, int); @@ -119,7 +119,7 @@ void msk_reset(struct sk_softc *); int msk_newbuf(struct sk_if_softc *, int, struct mbuf *, bus_dmamap_t); int msk_alloc_jumbo_mem(struct sk_if_softc *); void *msk_jalloc(struct sk_if_softc *); -void msk_jfree(struct mbuf *, caddr_t, size_t, void *); +void msk_jfree(struct mbuf *, void *, size_t, void *); int msk_init_rx_ring(struct sk_if_softc *); int msk_init_tx_ring(struct sk_if_softc *); @@ -129,7 +129,7 @@ int msk_miibus_readreg(struct device *, int, int); void msk_miibus_writereg(struct device *, int, int, int); void msk_miibus_statchg(struct device *); -void msk_setfilt(struct sk_if_softc *, caddr_t, int); +void msk_setfilt(struct sk_if_softc *, void *, int); void msk_setmulti(struct sk_if_softc *); void msk_setpromisc(struct sk_if_softc *); void msk_tick(void *); @@ -324,8 +324,9 @@ msk_miibus_statchg(struct device *dev) #define HASH_BITS 6 void -msk_setfilt(struct sk_if_softc *sc_if, caddr_t addr, int slot) +msk_setfilt(struct sk_if_softc *sc_if, void *addrv, int slot) { + char *addr = addrv; int base = XM_RXFILT_ENTRY(slot); SK_XM_WRITE_2(sc_if, base, *(u_int16_t *)(&addr[0])); @@ -491,7 +492,7 @@ msk_newbuf(struct sk_if_softc *sc_if, int i, struct mbuf *m, struct msk_rx_desc *r; if (m == NULL) { - caddr_t buf = NULL; + void *buf = NULL; MGETHDR(m_new, M_DONTWAIT, MT_DATA); if (m_new == NULL) @@ -544,7 +545,7 @@ int msk_alloc_jumbo_mem(struct sk_if_softc *sc_if) { struct sk_softc *sc = sc_if->sk_softc; - caddr_t ptr, kva; + char *ptr, *kva; bus_dma_segment_t seg; int i, rseg, state, error; struct sk_jpool_entry *entry; @@ -559,7 +560,7 @@ msk_alloc_jumbo_mem(struct sk_if_softc *sc_if) } state = 1; - if (bus_dmamem_map(sc->sc_dmatag, &seg, rseg, MSK_JMEM, &kva, + if (bus_dmamem_map(sc->sc_dmatag, &seg, rseg, MSK_JMEM, (void **)&kva, BUS_DMA_NOWAIT)) { aprint_error(": can't map dma buffers (%d bytes)", MSK_JMEM); error = ENOBUFS; @@ -583,8 +584,8 @@ msk_alloc_jumbo_mem(struct sk_if_softc *sc_if) } state = 4; - sc_if->sk_cdata.sk_jumbo_buf = (caddr_t)kva; - DPRINTFN(1,("msk_jumbo_buf = %p\n", (caddr_t)sc_if->sk_cdata.sk_jumbo_buf)); + sc_if->sk_cdata.sk_jumbo_buf = (void *)kva; + DPRINTFN(1,("msk_jumbo_buf = %p\n", (void *)sc_if->sk_cdata.sk_jumbo_buf)); LIST_INIT(&sc_if->sk_jfree_listhead); LIST_INIT(&sc_if->sk_jinuse_listhead); @@ -653,7 +654,7 @@ msk_jalloc(struct sk_if_softc *sc_if) * Release a jumbo buffer. */ void -msk_jfree(struct mbuf *m, caddr_t buf, size_t size, void *arg) +msk_jfree(struct mbuf *m, void *buf, size_t size, void *arg) { struct sk_jpool_entry *entry; struct sk_if_softc *sc; @@ -711,7 +712,7 @@ msk_ifmedia_sts(struct ifnet *ifp, struct ifmediareq *ifmr) } int -msk_ioctl(struct ifnet *ifp, u_long command, caddr_t data) +msk_ioctl(struct ifnet *ifp, u_long command, void *data) { struct sk_if_softc *sc_if = ifp->if_softc; struct ifreq *ifr = (struct ifreq *) data; @@ -989,7 +990,7 @@ msk_attach(struct device *parent, struct device *self, void *aux) struct sk_softc *sc = (struct sk_softc *)parent; struct skc_attach_args *sa = aux; struct ifnet *ifp; - caddr_t kva; + void *kva; bus_dma_segment_t seg; int i, rseg; u_int32_t chunk, val; @@ -1175,7 +1176,7 @@ mskc_attach(struct device *parent, struct device *self, void *aux) u_int8_t hw, skrs; const char *revstr = NULL; const struct sysctlnode *node; - caddr_t kva; + void *kva; bus_dma_segment_t seg; int rseg; diff --git a/sys/dev/pci/if_mskvar.h b/sys/dev/pci/if_mskvar.h index c06724517ea..707eb49f364 100644 --- a/sys/dev/pci/if_mskvar.h +++ b/sys/dev/pci/if_mskvar.h @@ -1,5 +1,5 @@ /* $OpenBSD: if_mskvar.h,v 1.3 2006/12/28 16:34:42 kettenis Exp $ */ -/* $NetBSD: if_mskvar.h,v 1.3 2007/01/30 11:58:10 msaitoh Exp $ */ +/* $NetBSD: if_mskvar.h,v 1.4 2007/03/04 06:02:22 christos Exp $ */ /*- * Copyright (c) 2003 The NetBSD Foundation, Inc. @@ -132,7 +132,7 @@ struct msk_chain_data { int sk_rx_cons; int sk_rx_cnt; /* Stick the jumbo mem management stuff here too. */ - caddr_t sk_jslots[MSK_JSLOTS]; + void * sk_jslots[MSK_JSLOTS]; void *sk_jumbo_buf; }; diff --git a/sys/dev/pci/if_nfe.c b/sys/dev/pci/if_nfe.c index c9e93bd1518..83720347f73 100644 --- a/sys/dev/pci/if_nfe.c +++ b/sys/dev/pci/if_nfe.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_nfe.c,v 1.14 2007/02/28 17:40:11 tsutsui Exp $ */ +/* $NetBSD: if_nfe.c,v 1.15 2007/03/04 06:02:22 christos Exp $ */ /* $OpenBSD: if_nfe.c,v 1.52 2006/03/02 09:04:00 jsg Exp $ */ /*- @@ -21,7 +21,7 @@ /* Driver for NVIDIA nForce MCP Fast Ethernet and Gigabit Ethernet */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_nfe.c,v 1.14 2007/02/28 17:40:11 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_nfe.c,v 1.15 2007/03/04 06:02:22 christos Exp $"); #include "opt_inet.h" #include "bpfilter.h" @@ -80,7 +80,7 @@ void nfe_miibus_statchg(struct device *); int nfe_miibus_readreg(struct device *, int, int); void nfe_miibus_writereg(struct device *, int, int, int); int nfe_intr(void *); -int nfe_ioctl(struct ifnet *, u_long, caddr_t); +int nfe_ioctl(struct ifnet *, u_long, void *); void nfe_txdesc32_sync(struct nfe_softc *, struct nfe_desc32 *, int); void nfe_txdesc64_sync(struct nfe_softc *, struct nfe_desc64 *, int); void nfe_txdesc32_rsync(struct nfe_softc *, int, int, int); @@ -95,7 +95,7 @@ void nfe_watchdog(struct ifnet *); int nfe_init(struct ifnet *); void nfe_stop(struct ifnet *, int); struct nfe_jbuf *nfe_jalloc(struct nfe_softc *); -void nfe_jfree(struct mbuf *, caddr_t, size_t, void *); +void nfe_jfree(struct mbuf *, void *, size_t, void *); int nfe_jpool_alloc(struct nfe_softc *); void nfe_jpool_free(struct nfe_softc *); int nfe_alloc_rx_ring(struct nfe_softc *, struct nfe_rx_ring *); @@ -537,7 +537,7 @@ nfe_intr(void *arg) } int -nfe_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) +nfe_ioctl(struct ifnet *ifp, u_long cmd, void *data) { struct nfe_softc *sc = ifp->if_softc; struct ifreq *ifr = (struct ifreq *)data; @@ -625,7 +625,7 @@ void nfe_txdesc32_sync(struct nfe_softc *sc, struct nfe_desc32 *desc32, int ops) { bus_dmamap_sync(sc->sc_dmat, sc->txq.map, - (caddr_t)desc32 - (caddr_t)sc->txq.desc32, + (char *)desc32 - (char *)sc->txq.desc32, sizeof (struct nfe_desc32), ops); } @@ -633,7 +633,7 @@ void nfe_txdesc64_sync(struct nfe_softc *sc, struct nfe_desc64 *desc64, int ops) { bus_dmamap_sync(sc->sc_dmat, sc->txq.map, - (caddr_t)desc64 - (caddr_t)sc->txq.desc64, + (char *)desc64 - (char *)sc->txq.desc64, sizeof (struct nfe_desc64), ops); } @@ -642,20 +642,20 @@ nfe_txdesc32_rsync(struct nfe_softc *sc, int start, int end, int ops) { if (end > start) { bus_dmamap_sync(sc->sc_dmat, sc->txq.map, - (caddr_t)&sc->txq.desc32[start] - (caddr_t)sc->txq.desc32, - (caddr_t)&sc->txq.desc32[end] - - (caddr_t)&sc->txq.desc32[start], ops); + (char *)&sc->txq.desc32[start] - (char *)sc->txq.desc32, + (char *)&sc->txq.desc32[end] - + (char *)&sc->txq.desc32[start], ops); return; } /* sync from 'start' to end of ring */ bus_dmamap_sync(sc->sc_dmat, sc->txq.map, - (caddr_t)&sc->txq.desc32[start] - (caddr_t)sc->txq.desc32, - (caddr_t)&sc->txq.desc32[NFE_TX_RING_COUNT] - - (caddr_t)&sc->txq.desc32[start], ops); + (char *)&sc->txq.desc32[start] - (char *)sc->txq.desc32, + (char *)&sc->txq.desc32[NFE_TX_RING_COUNT] - + (char *)&sc->txq.desc32[start], ops); /* sync from start of ring to 'end' */ bus_dmamap_sync(sc->sc_dmat, sc->txq.map, 0, - (caddr_t)&sc->txq.desc32[end] - (caddr_t)sc->txq.desc32, ops); + (char *)&sc->txq.desc32[end] - (char *)sc->txq.desc32, ops); } void @@ -663,27 +663,27 @@ nfe_txdesc64_rsync(struct nfe_softc *sc, int start, int end, int ops) { if (end > start) { bus_dmamap_sync(sc->sc_dmat, sc->txq.map, - (caddr_t)&sc->txq.desc64[start] - (caddr_t)sc->txq.desc64, - (caddr_t)&sc->txq.desc64[end] - - (caddr_t)&sc->txq.desc64[start], ops); + (char *)&sc->txq.desc64[start] - (char *)sc->txq.desc64, + (char *)&sc->txq.desc64[end] - + (char *)&sc->txq.desc64[start], ops); return; } /* sync from 'start' to end of ring */ bus_dmamap_sync(sc->sc_dmat, sc->txq.map, - (caddr_t)&sc->txq.desc64[start] - (caddr_t)sc->txq.desc64, - (caddr_t)&sc->txq.desc64[NFE_TX_RING_COUNT] - - (caddr_t)&sc->txq.desc64[start], ops); + (char *)&sc->txq.desc64[start] - (char *)sc->txq.desc64, + (char *)&sc->txq.desc64[NFE_TX_RING_COUNT] - + (char *)&sc->txq.desc64[start], ops); /* sync from start of ring to 'end' */ bus_dmamap_sync(sc->sc_dmat, sc->txq.map, 0, - (caddr_t)&sc->txq.desc64[end] - (caddr_t)sc->txq.desc64, ops); + (char *)&sc->txq.desc64[end] - (char *)sc->txq.desc64, ops); } void nfe_rxdesc32_sync(struct nfe_softc *sc, struct nfe_desc32 *desc32, int ops) { bus_dmamap_sync(sc->sc_dmat, sc->rxq.map, - (caddr_t)desc32 - (caddr_t)sc->rxq.desc32, + (char *)desc32 - (char *)sc->rxq.desc32, sizeof (struct nfe_desc32), ops); } @@ -691,7 +691,7 @@ void nfe_rxdesc64_sync(struct nfe_softc *sc, struct nfe_desc64 *desc64, int ops) { bus_dmamap_sync(sc->sc_dmat, sc->rxq.map, - (caddr_t)desc64 - (caddr_t)sc->rxq.desc64, + (char *)desc64 - (char *)sc->rxq.desc64, sizeof (struct nfe_desc64), ops); } @@ -777,8 +777,8 @@ nfe_rxeof(struct nfe_softc *sc) MEXTADD(mnew, jbuf->buf, NFE_JBYTES, 0, nfe_jfree, sc); bus_dmamap_sync(sc->sc_dmat, sc->rxq.jmap, - mtod(data->m, caddr_t) - sc->rxq.jpool, NFE_JBYTES, - BUS_DMASYNC_POSTREAD); + mtod(data->m, char *) - (char *)sc->rxq.jpool, + NFE_JBYTES, BUS_DMASYNC_POSTREAD); physaddr = jbuf->physaddr; } else { @@ -1330,7 +1330,7 @@ nfe_alloc_rx_ring(struct nfe_softc *sc, struct nfe_rx_ring *ring) } error = bus_dmamem_map(sc->sc_dmat, &ring->seg, nsegs, - NFE_RX_RING_COUNT * descsize, (caddr_t *)desc, BUS_DMA_NOWAIT); + NFE_RX_RING_COUNT * descsize, (void **)desc, BUS_DMA_NOWAIT); if (error != 0) { printf("%s: could not map desc DMA memory\n", sc->sc_dev.dv_xname); @@ -1473,7 +1473,7 @@ nfe_free_rx_ring(struct nfe_softc *sc, struct nfe_rx_ring *ring) bus_dmamap_sync(sc->sc_dmat, ring->map, 0, ring->map->dm_mapsize, BUS_DMASYNC_POSTWRITE); bus_dmamap_unload(sc->sc_dmat, ring->map); - bus_dmamem_unmap(sc->sc_dmat, (caddr_t)desc, + bus_dmamem_unmap(sc->sc_dmat, (void *)desc, NFE_RX_RING_COUNT * descsize); bus_dmamem_free(sc->sc_dmat, &ring->seg, 1); } @@ -1510,14 +1510,14 @@ nfe_jalloc(struct nfe_softc *sc) * freed. */ void -nfe_jfree(struct mbuf *m, caddr_t buf, size_t size, void *arg) +nfe_jfree(struct mbuf *m, void *buf, size_t size, void *arg) { struct nfe_softc *sc = arg; struct nfe_jbuf *jbuf; int i; /* find the jbuf from the base pointer */ - i = (buf - sc->rxq.jpool) / NFE_JBYTES; + i = ((char *)buf - (char *)sc->rxq.jpool) / NFE_JBYTES; if (i < 0 || i >= NFE_JPOOL_COUNT) { printf("%s: request to free a buffer (%p) not managed by us\n", sc->sc_dev.dv_xname, buf); @@ -1538,7 +1538,7 @@ nfe_jpool_alloc(struct nfe_softc *sc) struct nfe_rx_ring *ring = &sc->rxq; struct nfe_jbuf *jbuf; bus_addr_t physaddr; - caddr_t buf; + char *buf; int i, nsegs, error; /* @@ -1652,7 +1652,7 @@ nfe_alloc_tx_ring(struct nfe_softc *sc, struct nfe_tx_ring *ring) } error = bus_dmamem_map(sc->sc_dmat, &ring->seg, nsegs, - NFE_TX_RING_COUNT * descsize, (caddr_t *)desc, BUS_DMA_NOWAIT); + NFE_TX_RING_COUNT * descsize, (void **)desc, BUS_DMA_NOWAIT); if (error != 0) { printf("%s: could not map desc DMA memory\n", sc->sc_dev.dv_xname); @@ -1736,7 +1736,7 @@ nfe_free_tx_ring(struct nfe_softc *sc, struct nfe_tx_ring *ring) bus_dmamap_sync(sc->sc_dmat, ring->map, 0, ring->map->dm_mapsize, BUS_DMASYNC_POSTWRITE); bus_dmamap_unload(sc->sc_dmat, ring->map); - bus_dmamem_unmap(sc->sc_dmat, (caddr_t)desc, + bus_dmamem_unmap(sc->sc_dmat, (void *)desc, NFE_TX_RING_COUNT * descsize); bus_dmamem_free(sc->sc_dmat, &ring->seg, 1); } diff --git a/sys/dev/pci/if_nfevar.h b/sys/dev/pci/if_nfevar.h index 885182223ee..cd10a3f390b 100644 --- a/sys/dev/pci/if_nfevar.h +++ b/sys/dev/pci/if_nfevar.h @@ -1,4 +1,4 @@ -/* $NetBSD: if_nfevar.h,v 1.1 2006/03/12 22:40:42 chs Exp $ */ +/* $NetBSD: if_nfevar.h,v 1.2 2007/03/04 06:02:22 christos Exp $ */ /* $OpenBSD: if_nfevar.h,v 1.11 2006/02/19 13:57:02 damien Exp $ */ /*- @@ -38,7 +38,7 @@ struct nfe_tx_ring { }; struct nfe_jbuf { - caddr_t buf; + void * buf; bus_addr_t physaddr; SLIST_ENTRY(nfe_jbuf) jnext; }; @@ -56,7 +56,7 @@ struct nfe_rx_ring { bus_addr_t physaddr; struct nfe_desc32 *desc32; struct nfe_desc64 *desc64; - caddr_t jpool; + void * jpool; struct nfe_rx_data data[NFE_RX_RING_COUNT]; struct nfe_jbuf jbuf[NFE_JPOOL_COUNT]; SLIST_HEAD(, nfe_jbuf) jfreelist; diff --git a/sys/dev/pci/if_pcn.c b/sys/dev/pci/if_pcn.c index 854a7f75165..8102304bb3a 100644 --- a/sys/dev/pci/if_pcn.c +++ b/sys/dev/pci/if_pcn.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_pcn.c,v 1.37 2007/02/21 23:00:01 thorpej Exp $ */ +/* $NetBSD: if_pcn.c,v 1.38 2007/03/04 06:02:22 christos Exp $ */ /* * Copyright (c) 2001 Wasabi Systems, Inc. @@ -65,7 +65,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_pcn.c,v 1.37 2007/02/21 23:00:01 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_pcn.c,v 1.38 2007/03/04 06:02:22 christos Exp $"); #include "bpfilter.h" #include "rnd.h" @@ -394,7 +394,7 @@ do { \ static void pcn_start(struct ifnet *); static void pcn_watchdog(struct ifnet *); -static int pcn_ioctl(struct ifnet *, u_long, caddr_t); +static int pcn_ioctl(struct ifnet *, u_long, void *); static int pcn_init(struct ifnet *); static void pcn_stop(struct ifnet *, int); @@ -722,7 +722,7 @@ pcn_attach(struct device *parent, struct device *self, void *aux) } if ((error = bus_dmamem_map(sc->sc_dmat, &seg, rseg, - sizeof(struct pcn_control_data), (caddr_t *)&sc->sc_control_data, + sizeof(struct pcn_control_data), (void **)&sc->sc_control_data, BUS_DMA_COHERENT)) != 0) { printf("%s: unable to map control data, error = %d\n", sc->sc_dev.dv_xname, error); @@ -891,7 +891,7 @@ pcn_attach(struct device *parent, struct device *self, void *aux) fail_3: bus_dmamap_destroy(sc->sc_dmat, sc->sc_cddmamap); fail_2: - bus_dmamem_unmap(sc->sc_dmat, (caddr_t)sc->sc_control_data, + bus_dmamem_unmap(sc->sc_dmat, (void *)sc->sc_control_data, sizeof(struct pcn_control_data)); fail_1: bus_dmamem_free(sc->sc_dmat, &seg, rseg); @@ -982,7 +982,7 @@ pcn_start(struct ifnet *ifp) break; } } - m_copydata(m0, 0, m0->m_pkthdr.len, mtod(m, caddr_t)); + m_copydata(m0, 0, m0->m_pkthdr.len, mtod(m, void *)); m->m_pkthdr.len = m->m_len = m0->m_pkthdr.len; error = bus_dmamap_load_mbuf(sc->sc_dmat, dmamap, m, BUS_DMA_WRITE|BUS_DMA_NOWAIT); @@ -1186,7 +1186,7 @@ pcn_watchdog(struct ifnet *ifp) * Handle control requests from the operator. */ static int -pcn_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) +pcn_ioctl(struct ifnet *ifp, u_long cmd, void *data) { struct pcn_softc *sc = ifp->if_softc; struct ifreq *ifr = (struct ifreq *) data; @@ -1535,8 +1535,8 @@ pcn_rxintr(struct pcn_softc *sc) if (m == NULL) goto dropit; m->m_data += 2; - memcpy(mtod(m, caddr_t), - mtod(rxs->rxs_mbuf, caddr_t), len); + memcpy(mtod(m, void *), + mtod(rxs->rxs_mbuf, void *), len); PCN_INIT_RXDESC(sc, i); bus_dmamap_sync(sc->sc_dmat, rxs->rxs_dmamap, 0, rxs->rxs_dmamap->dm_mapsize, diff --git a/sys/dev/pci/if_sip.c b/sys/dev/pci/if_sip.c index eddcae73ef5..0e13b17aaa7 100644 --- a/sys/dev/pci/if_sip.c +++ b/sys/dev/pci/if_sip.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_sip.c,v 1.110 2006/11/16 01:33:09 christos Exp $ */ +/* $NetBSD: if_sip.c,v 1.111 2007/03/04 06:02:22 christos Exp $ */ /*- * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc. @@ -80,7 +80,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_sip.c,v 1.110 2006/11/16 01:33:09 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_sip.c,v 1.111 2007/03/04 06:02:22 christos Exp $"); #include "bpfilter.h" #include "rnd.h" @@ -424,7 +424,7 @@ do { \ static void SIP_DECL(start)(struct ifnet *); static void SIP_DECL(watchdog)(struct ifnet *); -static int SIP_DECL(ioctl)(struct ifnet *, u_long, caddr_t); +static int SIP_DECL(ioctl)(struct ifnet *, u_long, void *); static int SIP_DECL(init)(struct ifnet *); static void SIP_DECL(stop)(struct ifnet *, int); @@ -784,7 +784,7 @@ SIP_DECL(attach)(struct device *parent, struct device *self, void *aux) } if ((error = bus_dmamem_map(sc->sc_dmat, &seg, rseg, - sizeof(struct sip_control_data), (caddr_t *)&sc->sc_control_data, + sizeof(struct sip_control_data), (void **)&sc->sc_control_data, BUS_DMA_COHERENT)) != 0) { printf("%s: unable to map control data, error = %d\n", sc->sc_dev.dv_xname, error); @@ -1126,7 +1126,7 @@ SIP_DECL(attach)(struct device *parent, struct device *self, void *aux) fail_3: bus_dmamap_destroy(sc->sc_dmat, sc->sc_cddmamap); fail_2: - bus_dmamem_unmap(sc->sc_dmat, (caddr_t)sc->sc_control_data, + bus_dmamem_unmap(sc->sc_dmat, (void *)sc->sc_control_data, sizeof(struct sip_control_data)); fail_1: bus_dmamem_free(sc->sc_dmat, &seg, rseg); @@ -1257,7 +1257,7 @@ SIP_DECL(start)(struct ifnet *ifp) break; } } - m_copydata(m0, 0, m0->m_pkthdr.len, mtod(m, caddr_t)); + m_copydata(m0, 0, m0->m_pkthdr.len, mtod(m, void *)); m->m_pkthdr.len = m->m_len = m0->m_pkthdr.len; error = bus_dmamap_load_mbuf(sc->sc_dmat, dmamap, m, BUS_DMA_WRITE|BUS_DMA_NOWAIT); @@ -1519,7 +1519,7 @@ SIP_DECL(watchdog)(struct ifnet *ifp) * Handle control requests from the operator. */ static int -SIP_DECL(ioctl)(struct ifnet *ifp, u_long cmd, caddr_t data) +SIP_DECL(ioctl)(struct ifnet *ifp, u_long cmd, void *data) { struct sip_softc *sc = ifp->if_softc; struct ifreq *ifr = (struct ifreq *)data; @@ -1967,7 +1967,7 @@ SIP_DECL(rxintr)(struct sip_softc *sc) MCLAIM(m, &sc->sc_ethercom.ec_rx_mowner); nm->m_data += 2; nm->m_pkthdr.len = nm->m_len = len; - m_copydata(m, 0, len, mtod(nm, caddr_t)); + m_copydata(m, 0, len, mtod(nm, void *)); m_freem(m); m = nm; } @@ -1982,7 +1982,7 @@ SIP_DECL(rxintr)(struct sip_softc *sc) * of the data two bytes further in (in the first * buffer of the chain only). */ - memmove(mtod(m, caddr_t) + 2, mtod(m, caddr_t), + memmove(mtod(m, void *) + 2, mtod(m, void *), m->m_len); m->m_data += 2; } @@ -2145,8 +2145,8 @@ SIP_DECL(rxintr)(struct sip_softc *sc) if (m == NULL) goto dropit; MCLAIM(m, &sc->sc_ethercom.ec_rx_mowner); - memcpy(mtod(m, caddr_t), - mtod(rxs->rxs_mbuf, caddr_t), len); + memcpy(mtod(m, void *), + mtod(rxs->rxs_mbuf, void *), len); SIP_INIT_RXDESC(sc, i); bus_dmamap_sync(sc->sc_dmat, rxs->rxs_dmamap, 0, rxs->rxs_dmamap->dm_mapsize, @@ -2194,7 +2194,7 @@ SIP_DECL(rxintr)(struct sip_softc *sc) * Note that we use clusters for incoming frames, so the * buffer is virtually contiguous. */ - memcpy(mtod(m, caddr_t), mtod(rxs->rxs_mbuf, caddr_t), len); + memcpy(mtod(m, void *), mtod(rxs->rxs_mbuf, void *), len); /* Allow the receive descriptor to continue using its mbuf. */ SIP_INIT_RXDESC(sc, i); diff --git a/sys/dev/pci/if_sk.c b/sys/dev/pci/if_sk.c index 0defff42b86..08ce5efab67 100644 --- a/sys/dev/pci/if_sk.c +++ b/sys/dev/pci/if_sk.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_sk.c,v 1.36 2007/01/30 11:42:06 msaitoh Exp $ */ +/* $NetBSD: if_sk.c,v 1.37 2007/03/04 06:02:22 christos Exp $ */ /*- * Copyright (c) 2003 The NetBSD Foundation, Inc. @@ -176,7 +176,7 @@ void sk_rxeof(struct sk_if_softc *); void sk_txeof(struct sk_if_softc *); int sk_encap(struct sk_if_softc *, struct mbuf *, u_int32_t *); void sk_start(struct ifnet *); -int sk_ioctl(struct ifnet *, u_long, caddr_t); +int sk_ioctl(struct ifnet *, u_long, void *); int sk_init(struct ifnet *); void sk_init_xmac(struct sk_if_softc *); void sk_init_yukon(struct sk_if_softc *); @@ -190,7 +190,7 @@ int sk_newbuf(struct sk_if_softc *, int, struct mbuf *, bus_dmamap_t); int sk_alloc_jumbo_mem(struct sk_if_softc *); void sk_free_jumbo_mem(struct sk_if_softc *); void *sk_jalloc(struct sk_if_softc *); -void sk_jfree(struct mbuf *, caddr_t, size_t, void *); +void sk_jfree(struct mbuf *, void *, size_t, void *); int sk_init_rx_ring(struct sk_if_softc *); int sk_init_tx_ring(struct sk_if_softc *); u_int8_t sk_vpd_readbyte(struct sk_softc *, int); @@ -208,9 +208,9 @@ int sk_marv_miibus_readreg(struct device *, int, int); void sk_marv_miibus_writereg(struct device *, int, int, int); void sk_marv_miibus_statchg(struct device *); -u_int32_t sk_xmac_hash(caddr_t); -u_int32_t sk_yukon_hash(caddr_t); -void sk_setfilt(struct sk_if_softc *, caddr_t, int); +u_int32_t sk_xmac_hash(void *); +u_int32_t sk_yukon_hash(void *); +void sk_setfilt(struct sk_if_softc *, void *, int); void sk_setmulti(struct sk_if_softc *); void sk_tick(void *); @@ -557,7 +557,7 @@ sk_marv_miibus_statchg(struct device *dev) #define SK_HASH_BITS 6 u_int32_t -sk_xmac_hash(caddr_t addr) +sk_xmac_hash(void *addr) { u_int32_t crc; @@ -568,7 +568,7 @@ sk_xmac_hash(caddr_t addr) } u_int32_t -sk_yukon_hash(caddr_t addr) +sk_yukon_hash(void *addr) { u_int32_t crc; @@ -579,8 +579,9 @@ sk_yukon_hash(caddr_t addr) } void -sk_setfilt(struct sk_if_softc *sc_if, caddr_t addr, int slot) +sk_setfilt(struct sk_if_softc *sc_if, void *addrv, int slot) { + char *addr = addrv; int base = XM_RXFILT_ENTRY(slot); SK_XM_WRITE_2(sc_if, base, *(u_int16_t *)(&addr[0])); @@ -604,7 +605,7 @@ sk_setmulti(struct sk_if_softc *sc_if) switch (sc->sk_type) { case SK_GENESIS: for (i = 1; i < XM_RXFILT_MAX; i++) - sk_setfilt(sc_if, (caddr_t)&dummy, i); + sk_setfilt(sc_if, (void *)&dummy, i); SK_XM_WRITE_4(sc_if, XM_MAR0, 0); SK_XM_WRITE_4(sc_if, XM_MAR2, 0); @@ -763,7 +764,7 @@ sk_newbuf(struct sk_if_softc *sc_if, int i, struct mbuf *m, struct sk_rx_desc *r; if (m == NULL) { - caddr_t buf = NULL; + void *buf = NULL; MGETHDR(m_new, M_DONTWAIT, MT_DATA); if (m_new == NULL) { @@ -818,7 +819,7 @@ int sk_alloc_jumbo_mem(struct sk_if_softc *sc_if) { struct sk_softc *sc = sc_if->sk_softc; - caddr_t ptr, kva; + char *ptr, *kva; bus_dma_segment_t seg; int i, rseg, state, error; struct sk_jpool_entry *entry; @@ -833,7 +834,7 @@ sk_alloc_jumbo_mem(struct sk_if_softc *sc_if) } state = 1; - if (bus_dmamem_map(sc->sc_dmatag, &seg, rseg, SK_JMEM, &kva, + if (bus_dmamem_map(sc->sc_dmatag, &seg, rseg, SK_JMEM, (void **)&kva, BUS_DMA_NOWAIT)) { aprint_error("%s: can't map dma buffers (%d bytes)\n", sc->sk_dev.dv_xname, SK_JMEM); @@ -858,7 +859,7 @@ sk_alloc_jumbo_mem(struct sk_if_softc *sc_if) } state = 4; - sc_if->sk_cdata.sk_jumbo_buf = (caddr_t)kva; + sc_if->sk_cdata.sk_jumbo_buf = (void *)kva; DPRINTFN(1,("sk_jumbo_buf = 0x%p\n", sc_if->sk_cdata.sk_jumbo_buf)); LIST_INIT(&sc_if->sk_jfree_listhead); @@ -932,7 +933,7 @@ sk_jalloc(struct sk_if_softc *sc_if) * Release a jumbo buffer. */ void -sk_jfree(struct mbuf *m, caddr_t buf, size_t size, void *arg) +sk_jfree(struct mbuf *m, void *buf, size_t size, void *arg) { struct sk_jpool_entry *entry; struct sk_if_softc *sc; @@ -992,7 +993,7 @@ sk_ifmedia_sts(struct ifnet *ifp, struct ifmediareq *ifmr) } int -sk_ioctl(struct ifnet *ifp, u_long command, caddr_t data) +sk_ioctl(struct ifnet *ifp, u_long command, void *data) { struct sk_if_softc *sc_if = ifp->if_softc; struct sk_softc *sc = sc_if->sk_softc; @@ -1220,7 +1221,7 @@ sk_attach(struct device *parent, struct device *self, void *aux) struct ifnet *ifp; bus_dma_segment_t seg; bus_dmamap_t dmamap; - caddr_t kva; + void *kva; int i, rseg; sc_if->sk_port = sa->skc_port; @@ -1997,7 +1998,7 @@ sk_watchdog(struct ifnet *ifp) } void -sk_shutdown(void * v) +sk_shutdown(void *v) { struct sk_if_softc *sc_if = (struct sk_if_softc *)v; struct sk_softc *sc = sc_if->sk_softc; diff --git a/sys/dev/pci/if_skvar.h b/sys/dev/pci/if_skvar.h index 16c8c739191..db3c0ae1262 100644 --- a/sys/dev/pci/if_skvar.h +++ b/sys/dev/pci/if_skvar.h @@ -1,4 +1,4 @@ -/* $NetBSD: if_skvar.h,v 1.11 2006/09/04 00:54:40 riz Exp $ */ +/* $NetBSD: if_skvar.h,v 1.12 2007/03/04 06:02:22 christos Exp $ */ /*- * Copyright (c) 2003 The NetBSD Foundation, Inc. @@ -131,7 +131,7 @@ struct sk_chain_data { int sk_rx_cons; int sk_rx_cnt; /* Stick the jumbo mem management stuff here too. */ - caddr_t sk_jslots[SK_JSLOTS]; + void * sk_jslots[SK_JSLOTS]; void *sk_jumbo_buf; }; diff --git a/sys/dev/pci/if_ste.c b/sys/dev/pci/if_ste.c index cbabc1f71c6..b39377da45a 100644 --- a/sys/dev/pci/if_ste.c +++ b/sys/dev/pci/if_ste.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_ste.c,v 1.26 2007/01/07 12:57:20 mlelstv Exp $ */ +/* $NetBSD: if_ste.c,v 1.27 2007/03/04 06:02:22 christos Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -42,7 +42,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_ste.c,v 1.26 2007/01/07 12:57:20 mlelstv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_ste.c,v 1.27 2007/03/04 06:02:22 christos Exp $"); #include "bpfilter.h" @@ -206,7 +206,7 @@ do { \ static void ste_start(struct ifnet *); static void ste_watchdog(struct ifnet *); -static int ste_ioctl(struct ifnet *, u_long, caddr_t); +static int ste_ioctl(struct ifnet *, u_long, void *); static int ste_init(struct ifnet *); static void ste_stop(struct ifnet *, int); @@ -397,7 +397,7 @@ ste_attach(struct device *parent, struct device *self, void *aux) } if ((error = bus_dmamem_map(sc->sc_dmat, &seg, rseg, - sizeof(struct ste_control_data), (caddr_t *)&sc->sc_control_data, + sizeof(struct ste_control_data), (void **)&sc->sc_control_data, BUS_DMA_COHERENT)) != 0) { printf("%s: unable to map control data, error = %d\n", sc->sc_dev.dv_xname, error); @@ -544,7 +544,7 @@ ste_attach(struct device *parent, struct device *self, void *aux) fail_3: bus_dmamap_destroy(sc->sc_dmat, sc->sc_cddmamap); fail_2: - bus_dmamem_unmap(sc->sc_dmat, (caddr_t)sc->sc_control_data, + bus_dmamem_unmap(sc->sc_dmat, (void *)sc->sc_control_data, sizeof(struct ste_control_data)); fail_1: bus_dmamem_free(sc->sc_dmat, &seg, rseg); @@ -652,7 +652,7 @@ ste_start(struct ifnet *ifp) break; } } - m_copydata(m0, 0, m0->m_pkthdr.len, mtod(m, caddr_t)); + m_copydata(m0, 0, m0->m_pkthdr.len, mtod(m, void *)); m->m_pkthdr.len = m->m_len = m0->m_pkthdr.len; error = bus_dmamap_load_mbuf(sc->sc_dmat, dmamap, m, BUS_DMA_WRITE|BUS_DMA_NOWAIT); @@ -798,7 +798,7 @@ ste_watchdog(struct ifnet *ifp) * Handle control requests from the operator. */ static int -ste_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) +ste_ioctl(struct ifnet *ifp, u_long cmd, void *data) { struct ste_softc *sc = ifp->if_softc; struct ifreq *ifr = (struct ifreq *)data; @@ -1040,8 +1040,8 @@ ste_rxintr(struct ste_softc *sc) if (m == NULL) goto dropit; m->m_data += 2; - memcpy(mtod(m, caddr_t), - mtod(ds->ds_mbuf, caddr_t), len); + memcpy(mtod(m, void *), + mtod(ds->ds_mbuf, void *), len); STE_INIT_RXDESC(sc, i); bus_dmamap_sync(sc->sc_dmat, ds->ds_dmamap, 0, ds->ds_dmamap->dm_mapsize, diff --git a/sys/dev/pci/if_stge.c b/sys/dev/pci/if_stge.c index 7f4886d9375..30800454575 100644 --- a/sys/dev/pci/if_stge.c +++ b/sys/dev/pci/if_stge.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_stge.c,v 1.35 2006/11/16 01:33:09 christos Exp $ */ +/* $NetBSD: if_stge.c,v 1.36 2007/03/04 06:02:23 christos Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -42,7 +42,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_stge.c,v 1.35 2006/11/16 01:33:09 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_stge.c,v 1.36 2007/03/04 06:02:23 christos Exp $"); #include "bpfilter.h" @@ -269,7 +269,7 @@ do { \ static void stge_start(struct ifnet *); static void stge_watchdog(struct ifnet *); -static int stge_ioctl(struct ifnet *, u_long, caddr_t); +static int stge_ioctl(struct ifnet *, u_long, void *); static int stge_init(struct ifnet *); static void stge_stop(struct ifnet *, int); @@ -481,7 +481,7 @@ stge_attach(struct device *parent, struct device *self, void *aux) } if ((error = bus_dmamem_map(sc->sc_dmat, &seg, rseg, - sizeof(struct stge_control_data), (caddr_t *)&sc->sc_control_data, + sizeof(struct stge_control_data), (void **)&sc->sc_control_data, BUS_DMA_COHERENT)) != 0) { printf("%s: unable to map control data, error = %d\n", sc->sc_dev.dv_xname, error); @@ -728,7 +728,7 @@ stge_attach(struct device *parent, struct device *self, void *aux) fail_3: bus_dmamap_destroy(sc->sc_dmat, sc->sc_cddmamap); fail_2: - bus_dmamem_unmap(sc->sc_dmat, (caddr_t)sc->sc_control_data, + bus_dmamem_unmap(sc->sc_dmat, (void *)sc->sc_control_data, sizeof(struct stge_control_data)); fail_1: bus_dmamem_free(sc->sc_dmat, &seg, rseg); @@ -1016,7 +1016,7 @@ stge_watchdog(struct ifnet *ifp) * Handle control requests from the operator. */ static int -stge_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) +stge_ioctl(struct ifnet *ifp, u_long cmd, void *data) { struct stge_softc *sc = ifp->if_softc; struct ifreq *ifr = (struct ifreq *)data; @@ -1319,7 +1319,7 @@ stge_rxintr(struct stge_softc *sc) } nm->m_data += 2; nm->m_pkthdr.len = nm->m_len = len; - m_copydata(m, 0, len, mtod(nm, caddr_t)); + m_copydata(m, 0, len, mtod(nm, void *)); m_freem(m); m = nm; } diff --git a/sys/dev/pci/if_ti.c b/sys/dev/pci/if_ti.c index eb8bc5a126a..5e94700ea83 100644 --- a/sys/dev/pci/if_ti.c +++ b/sys/dev/pci/if_ti.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_ti.c,v 1.73 2006/11/16 01:33:09 christos Exp $ */ +/* $NetBSD: if_ti.c,v 1.74 2007/03/04 06:02:23 christos Exp $ */ /* * Copyright (c) 1997, 1998, 1999 @@ -81,7 +81,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_ti.c,v 1.73 2006/11/16 01:33:09 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_ti.c,v 1.74 2007/03/04 06:02:23 christos Exp $"); #include "bpfilter.h" #include "opt_inet.h" @@ -162,7 +162,7 @@ static int ti_encap_tigon2(struct ti_softc *, struct mbuf *, u_int32_t *); static int ti_intr(void *); static void ti_start(struct ifnet *); -static int ti_ioctl(struct ifnet *, u_long, caddr_t); +static int ti_ioctl(struct ifnet *, u_long, void *); static void ti_init(void *); static void ti_init2(struct ti_softc *); static void ti_stop(struct ti_softc *); @@ -172,7 +172,7 @@ static void ti_ifmedia_sts(struct ifnet *, struct ifmediareq *); static u_int32_t ti_eeprom_putbyte(struct ti_softc *, int); static u_int8_t ti_eeprom_getbyte(struct ti_softc *, int, u_int8_t *); -static int ti_read_eeprom(struct ti_softc *, caddr_t, int, int); +static int ti_read_eeprom(struct ti_softc *, void *, int, int); static void ti_add_mcast(struct ti_softc *, struct ether_addr *); static void ti_del_mcast(struct ti_softc *, struct ether_addr *); @@ -181,11 +181,11 @@ static void ti_setmulti(struct ti_softc *); static void ti_mem(struct ti_softc *, u_int32_t, u_int32_t, const void *); static void ti_loadfw(struct ti_softc *); static void ti_cmd(struct ti_softc *, struct ti_cmd_desc *); -static void ti_cmd_ext(struct ti_softc *, struct ti_cmd_desc *, caddr_t, int); +static void ti_cmd_ext(struct ti_softc *, struct ti_cmd_desc *, void *, int); static void ti_handle_events(struct ti_softc *); static int ti_alloc_jumbo_mem(struct ti_softc *); static void *ti_jalloc(struct ti_softc *); -static void ti_jfree(struct mbuf *, caddr_t, size_t, void *); +static void ti_jfree(struct mbuf *, void *, size_t, void *); static int ti_newbuf_std(struct ti_softc *, int, struct mbuf *, bus_dmamap_t); static int ti_newbuf_mini(struct ti_softc *, int, struct mbuf *, bus_dmamap_t); static int ti_newbuf_jumbo(struct ti_softc *, int, struct mbuf *); @@ -202,7 +202,7 @@ static int ti_64bitslot_war(struct ti_softc *); static int ti_chipinit(struct ti_softc *); static int ti_gibinit(struct ti_softc *); -static int ti_ether_ioctl(struct ifnet *, u_long, caddr_t); +static int ti_ether_ioctl(struct ifnet *, u_long, void *); CFATTACH_DECL(ti, sizeof(struct ti_softc), ti_probe, ti_attach, NULL, NULL); @@ -330,14 +330,15 @@ static u_int8_t ti_eeprom_getbyte(sc, addr, dest) /* * Read a sequence of bytes from the EEPROM. */ -static int ti_read_eeprom(sc, dest, off, cnt) +static int ti_read_eeprom(sc, destv, off, cnt) struct ti_softc *sc; - caddr_t dest; + void * destv; int off; int cnt; { - int err = 0, i; - u_int8_t byte = 0; + char *dest = destv; + int err = 0, i; + u_int8_t byte = 0; for (i = 0; i < cnt; i++) { err = ti_eeprom_getbyte(sc, off + i, &byte); @@ -472,12 +473,13 @@ static void ti_cmd(sc, cmd) * Send the NIC an extended command. The 'len' parameter specifies the * number of command slots to include after the initial command. */ -static void ti_cmd_ext(sc, cmd, arg, len) +static void ti_cmd_ext(sc, cmd, argv, len) struct ti_softc *sc; struct ti_cmd_desc *cmd; - caddr_t arg; + void *argv; int len; { + char *arg = argv; u_int32_t index; int i; @@ -581,8 +583,8 @@ static void ti_handle_events(sc) static int ti_alloc_jumbo_mem(sc) struct ti_softc *sc; { - caddr_t ptr; - int i; + char *ptr; + int i; struct ti_jpool_entry *entry; bus_dma_segment_t dmaseg; int error, dmanseg; @@ -597,7 +599,7 @@ static int ti_alloc_jumbo_mem(sc) } if ((error = bus_dmamem_map(sc->sc_dmat, &dmaseg, dmanseg, - TI_JMEM, (caddr_t *)&sc->ti_cdata.ti_jumbo_buf, + TI_JMEM, (void **)&sc->ti_cdata.ti_jumbo_buf, BUS_DMA_NOWAIT|BUS_DMA_COHERENT)) != 0) { printf("%s: can't map jumbo buffer, error = %d\n", sc->sc_dev.dv_xname, error); @@ -673,7 +675,7 @@ static void *ti_jalloc(sc) /* * Release a jumbo buffer. */ -static void ti_jfree(struct mbuf *m, caddr_t tbuf, size_t size, +static void ti_jfree(struct mbuf *m, void *tbuf, size_t size, void *arg) { struct ti_softc *sc; @@ -688,8 +690,8 @@ static void ti_jfree(struct mbuf *m, caddr_t tbuf, size_t size, /* calculate the slot this buffer belongs to */ - i = ((caddr_t)tbuf - - (caddr_t)sc->ti_cdata.ti_jumbo_buf) / TI_JLEN; + i = ((char *)tbuf + - (char *)sc->ti_cdata.ti_jumbo_buf) / TI_JLEN; if ((i < 0) || (i >= TI_JSLOTS)) panic("ti_jfree: asked to free buffer that we don't manage!"); @@ -753,7 +755,7 @@ static int ti_newbuf_std(sc, i, m, dmamap) m_adj(m_new, ETHER_ALIGN); if ((error = bus_dmamap_load(sc->sc_dmat, dmamap, - mtod(m_new, caddr_t), m_new->m_len, NULL, + mtod(m_new, void *), m_new->m_len, NULL, BUS_DMA_READ|BUS_DMA_NOWAIT)) != 0) { printf("%s: can't load recv map, error = %d\n", sc->sc_dev.dv_xname, error); @@ -822,7 +824,7 @@ static int ti_newbuf_mini(sc, i, m, dmamap) m_adj(m_new, ETHER_ALIGN); if ((error = bus_dmamap_load(sc->sc_dmat, dmamap, - mtod(m_new, caddr_t), m_new->m_len, NULL, + mtod(m_new, void *), m_new->m_len, NULL, BUS_DMA_READ|BUS_DMA_NOWAIT)) != 0) { printf("%s: can't load recv map, error = %d\n", sc->sc_dev.dv_xname, error); @@ -866,7 +868,7 @@ static int ti_newbuf_jumbo(sc, i, m) struct ti_rx_desc *r; if (m == NULL) { - caddr_t tbuf = NULL; + void * tbuf = NULL; /* Allocate the mbuf. */ MGETHDR(m_new, M_DONTWAIT, MT_DATA); @@ -901,8 +903,7 @@ static int ti_newbuf_jumbo(sc, i, m) r = &sc->ti_rdata->ti_rx_jumbo_ring[i]; sc->ti_cdata.ti_rx_jumbo_chain[i] = m_new; TI_HOSTADDR(r->ti_addr) = sc->jumbo_dmaaddr + - ((caddr_t)mtod(m_new, caddr_t) - - (caddr_t)sc->ti_cdata.ti_jumbo_buf); + (mtod(m_new, char *) - (char *)sc->ti_cdata.ti_jumbo_buf); r->ti_type = TI_BDTYPE_RECV_JUMBO_BD; r->ti_flags = TI_BDFLAG_JUMBO_RING; if (sc->ethercom.ec_if.if_capenable & IFCAP_CSUM_IPv4_Rx) @@ -1122,7 +1123,7 @@ void ti_add_mcast(sc, addr) case TI_HWREV_TIGON_II: ext[0] = htons(m[0]); ext[1] = (htons(m[1]) << 16) | htons(m[2]); - TI_DO_CMD_EXT(TI_CMD_EXT_ADD_MCAST, 0, 0, (caddr_t)&ext, 2); + TI_DO_CMD_EXT(TI_CMD_EXT_ADD_MCAST, 0, 0, (void *)&ext, 2); break; default: printf("%s: unknown hwrev\n", sc->sc_dev.dv_xname); @@ -1151,7 +1152,7 @@ void ti_del_mcast(sc, addr) case TI_HWREV_TIGON_II: ext[0] = htons(m[0]); ext[1] = (htons(m[1]) << 16) | htons(m[2]); - TI_DO_CMD_EXT(TI_CMD_EXT_DEL_MCAST, 0, 0, (caddr_t)&ext, 2); + TI_DO_CMD_EXT(TI_CMD_EXT_DEL_MCAST, 0, 0, (void *)&ext, 2); break; default: printf("%s: unknown hwrev\n", sc->sc_dev.dv_xname); @@ -1757,7 +1758,7 @@ ti_attach(struct device *parent, struct device *self, void *aux) * the NIC). This means the MAC address is actually preceded * by two zero bytes. We need to skip over those. */ - if (ti_read_eeprom(sc, (caddr_t)&eaddr, + if (ti_read_eeprom(sc, (void *)&eaddr, TI_EE_MAC_OFFSET + 2, ETHER_ADDR_LEN)) { printf("%s: failed to read station address\n", self->dv_xname); goto fail2; @@ -1781,7 +1782,7 @@ ti_attach(struct device *parent, struct device *self, void *aux) } if ((error = bus_dmamem_map(sc->sc_dmat, &dmaseg, dmanseg, - sizeof(struct ti_ring_data), (caddr_t *)&sc->ti_rdata, + sizeof(struct ti_ring_data), (void **)&sc->ti_rdata, BUS_DMA_NOWAIT|BUS_DMA_COHERENT)) != 0) { printf("%s: can't map ring buffer, error = %d\n", sc->sc_dev.dv_xname, error); @@ -2746,7 +2747,7 @@ static int ti_ether_ioctl(ifp, cmd, data) struct ifnet *ifp; u_long cmd; - caddr_t data; + void *data; { struct ifaddr *ifa = (struct ifaddr *) data; struct ti_softc *sc = ifp->if_softc; @@ -2780,7 +2781,7 @@ ti_ether_ioctl(ifp, cmd, data) static int ti_ioctl(ifp, command, data) struct ifnet *ifp; u_long command; - caddr_t data; + void * data; { struct ti_softc *sc = ifp->if_softc; struct ifreq *ifr = (struct ifreq *) data; diff --git a/sys/dev/pci/if_tireg.h b/sys/dev/pci/if_tireg.h index 71774382791..ec494ca556f 100644 --- a/sys/dev/pci/if_tireg.h +++ b/sys/dev/pci/if_tireg.h @@ -1,4 +1,4 @@ -/* $NetBSD: if_tireg.h,v 1.17 2005/12/11 12:22:49 christos Exp $ */ +/* $NetBSD: if_tireg.h,v 1.18 2007/03/04 06:02:23 christos Exp $ */ /* * Copyright (c) 1997, 1998, 1999 @@ -1064,7 +1064,7 @@ struct ti_chain_data { struct mbuf *ti_rx_jumbo_chain[TI_JUMBO_RX_RING_CNT]; struct mbuf *ti_rx_mini_chain[TI_MINI_RX_RING_CNT]; /* Stick the jumbo mem management stuff here too. */ - caddr_t ti_jslots[TI_JSLOTS]; + void * ti_jslots[TI_JSLOTS]; void *ti_jumbo_buf; }; diff --git a/sys/dev/pci/if_tl.c b/sys/dev/pci/if_tl.c index 163a6250772..4d993715a9b 100644 --- a/sys/dev/pci/if_tl.c +++ b/sys/dev/pci/if_tl.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_tl.c,v 1.81 2006/12/25 18:36:05 wiz Exp $ */ +/* $NetBSD: if_tl.c,v 1.82 2007/03/04 06:02:23 christos Exp $ */ /* * Copyright (c) 1997 Manuel Bouyer. All rights reserved. @@ -36,7 +36,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_tl.c,v 1.81 2006/12/25 18:36:05 wiz Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_tl.c,v 1.82 2007/03/04 06:02:23 christos Exp $"); #undef TLDEBUG #define TL_PRIV_STATS @@ -122,7 +122,7 @@ static int tl_pci_match(struct device *, struct cfdata *, void *); static void tl_pci_attach(struct device *, struct device *, void *); static int tl_intr(void *); -static int tl_ifioctl(struct ifnet *, ioctl_cmd_t, caddr_t); +static int tl_ifioctl(struct ifnet *, ioctl_cmd_t, void *); static int tl_mediachange(struct ifnet *); static void tl_mediastatus(struct ifnet *, struct ifmediareq *); static void tl_ifwatchdog(struct ifnet *); @@ -427,7 +427,7 @@ tl_pci_attach(struct device *parent, struct device *self, void *aux) PAGE_SIZE, 0, PAGE_SIZE, &sc->ctrl_segs, 1, &sc->ctrl_nsegs, BUS_DMA_NOWAIT) != 0 || bus_dmamem_map(sc->tl_dmatag, &sc->ctrl_segs, - sc->ctrl_nsegs, PAGE_SIZE, (caddr_t*)&sc->ctrl, + sc->ctrl_nsegs, PAGE_SIZE, (void **)&sc->ctrl, BUS_DMA_NOWAIT | BUS_DMA_COHERENT) != 0) { printf("%s: can't allocate DMA memory for lists\n", sc->sc_dev.dv_xname); @@ -1255,7 +1255,7 @@ static int tl_ifioctl(ifp, cmd, data) struct ifnet *ifp; ioctl_cmd_t cmd; - caddr_t data; + void *data; { struct tl_softc *sc = ifp->if_softc; struct ifreq *ifr = (struct ifreq *)data; @@ -1357,7 +1357,7 @@ tbdinit: } } m_copydata(mb_head, 0, mb_head->m_pkthdr.len, - mtod(mn, caddr_t)); + mtod(mn, void *)); mn->m_pkthdr.len = mn->m_len = mb_head->m_pkthdr.len; m_freem(mb_head); mb_head = mn; diff --git a/sys/dev/pci/if_txp.c b/sys/dev/pci/if_txp.c index fc950b1c08b..aecc084e425 100644 --- a/sys/dev/pci/if_txp.c +++ b/sys/dev/pci/if_txp.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_txp.c,v 1.18 2006/11/16 01:33:09 christos Exp $ */ +/* $NetBSD: if_txp.c,v 1.19 2007/03/04 06:02:23 christos Exp $ */ /* * Copyright (c) 2001 @@ -32,7 +32,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_txp.c,v 1.18 2006/11/16 01:33:09 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_txp.c,v 1.19 2007/03/04 06:02:23 christos Exp $"); #include "bpfilter.h" #include "opt_inet.h" @@ -92,7 +92,7 @@ void txp_attach(struct device *, struct device *, void *); int txp_intr(void *); void txp_tick(void *); void txp_shutdown(void *); -int txp_ioctl(struct ifnet *, u_long, caddr_t); +int txp_ioctl(struct ifnet *, u_long, void *); void txp_start(struct ifnet *); void txp_stop(struct txp_softc *); void txp_init(struct txp_softc *); @@ -1259,7 +1259,7 @@ int txp_ioctl(ifp, command, data) struct ifnet *ifp; u_long command; - caddr_t data; + void *data; { struct txp_softc *sc = ifp->if_softc; struct ifreq *ifr = (struct ifreq *)data; @@ -1445,7 +1445,7 @@ txp_start(ifp) goto oactive1; } } - m_copydata(m, 0, m->m_pkthdr.len, mtod(mnew, caddr_t)); + m_copydata(m, 0, m->m_pkthdr.len, mtod(mnew, void *)); mnew->m_pkthdr.len = mnew->m_len = m->m_pkthdr.len; IFQ_DEQUEUE(&ifp->if_snd, m); m_freem(m); diff --git a/sys/dev/pci/if_txpreg.h b/sys/dev/pci/if_txpreg.h index 3b9f5f14708..ff595f10df2 100644 --- a/sys/dev/pci/if_txpreg.h +++ b/sys/dev/pci/if_txpreg.h @@ -1,4 +1,4 @@ -/* $NetBSD: if_txpreg.h,v 1.3 2005/12/11 12:22:50 christos Exp $ */ +/* $NetBSD: if_txpreg.h,v 1.4 2007/03/04 06:02:23 christos Exp $ */ /* * Copyright (c) 2001 Aaron Campbell <aaron@monkey.org>. @@ -526,7 +526,7 @@ struct txp_hostvar { struct txp_dma_alloc { u_int64_t dma_paddr; - caddr_t dma_vaddr; + void * dma_vaddr; bus_dmamap_t dma_map; bus_dma_segment_t dma_seg; int dma_nseg; diff --git a/sys/dev/pci/if_vge.c b/sys/dev/pci/if_vge.c index a9f481a1490..cee13a0bf62 100644 --- a/sys/dev/pci/if_vge.c +++ b/sys/dev/pci/if_vge.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_vge.c,v 1.33 2006/12/01 11:30:55 tsutsui Exp $ */ +/* $NetBSD: if_vge.c,v 1.34 2007/03/04 06:02:23 christos Exp $ */ /*- * Copyright (c) 2004 @@ -35,7 +35,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_vge.c,v 1.33 2006/12/01 11:30:55 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_vge.c,v 1.34 2007/03/04 06:02:23 christos Exp $"); /* * VIA Networking Technologies VT612x PCI gigabit ethernet NIC driver. @@ -310,7 +310,7 @@ static void vge_txeof(struct vge_softc *); static int vge_intr(void *); static void vge_tick(void *); static void vge_start(struct ifnet *); -static int vge_ioctl(struct ifnet *, u_long, caddr_t); +static int vge_ioctl(struct ifnet *, u_long, void *); static int vge_init(struct ifnet *); static void vge_stop(struct vge_softc *); static void vge_watchdog(struct ifnet *); @@ -398,7 +398,7 @@ vge_m_defrag(struct mbuf *mold, int flags) mn->m_len = MIN(sz, MCLBYTES); m_copydata(mold, mold->m_pkthdr.len - sz, mn->m_len, - mtod(mn, caddr_t)); + mtod(mn, void *)); sz -= mn->m_len; @@ -845,7 +845,7 @@ vge_allocmem(struct vge_softc *sc) /* Map the memory to kernel VA space */ error = bus_dmamem_map(sc->sc_dmat, &seg, nseg, - sizeof(struct vge_control_data), (caddr_t *)&sc->sc_control_data, + sizeof(struct vge_control_data), (void **)&sc->sc_control_data, BUS_DMA_NOWAIT); if (error) { aprint_error("%s: could not map control data dma memory\n", @@ -922,7 +922,7 @@ vge_allocmem(struct vge_softc *sc) fail_4: bus_dmamap_destroy(sc->sc_dmat, sc->sc_cddmamap); fail_3: - bus_dmamem_unmap(sc->sc_dmat, (caddr_t)sc->sc_control_data, + bus_dmamem_unmap(sc->sc_dmat, (void *)sc->sc_control_data, sizeof(struct vge_control_data)); fail_2: bus_dmamem_free(sc->sc_dmat, &seg, nseg); @@ -2042,7 +2042,7 @@ vge_miibus_statchg(struct device *self) } static int -vge_ioctl(struct ifnet *ifp, u_long command, caddr_t data) +vge_ioctl(struct ifnet *ifp, u_long command, void *data) { struct vge_softc *sc; struct ifreq *ifr; diff --git a/sys/dev/pci/if_vr.c b/sys/dev/pci/if_vr.c index 0e220f45907..d64fc4dee00 100644 --- a/sys/dev/pci/if_vr.c +++ b/sys/dev/pci/if_vr.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_vr.c,v 1.84 2006/11/16 01:33:09 christos Exp $ */ +/* $NetBSD: if_vr.c,v 1.85 2007/03/04 06:02:23 christos Exp $ */ /*- * Copyright (c) 1998, 1999 The NetBSD Foundation, Inc. @@ -104,7 +104,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_vr.c,v 1.84 2006/11/16 01:33:09 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_vr.c,v 1.85 2007/03/04 06:02:23 christos Exp $"); #include "rnd.h" @@ -315,7 +315,7 @@ static void vr_rxeoc(struct vr_softc *); static void vr_txeof(struct vr_softc *); static int vr_intr(void *); static void vr_start(struct ifnet *); -static int vr_ioctl(struct ifnet *, u_long, caddr_t); +static int vr_ioctl(struct ifnet *, u_long, void *); static int vr_init(struct ifnet *); static void vr_stop(struct ifnet *, int); static void vr_rxdrain(struct vr_softc *); @@ -714,8 +714,8 @@ vr_rxeof(struct vr_softc *sc) MGETHDR(m, M_DONTWAIT, MT_DATA); if (m == NULL) goto dropit; - memcpy(mtod(m, caddr_t), - mtod(ds->ds_mbuf, caddr_t), total_len); + memcpy(mtod(m, void *), + mtod(ds->ds_mbuf, void *), total_len); VR_INIT_RXDESC(sc, i); bus_dmamap_sync(sc->vr_dmat, ds->ds_dmamap, 0, ds->ds_dmamap->dm_mapsize, @@ -762,7 +762,7 @@ vr_rxeof(struct vr_softc *sc) * Note that we use clusters for incoming frames, so the * buffer is virtually contiguous. */ - memcpy(mtod(m, caddr_t), mtod(ds->ds_mbuf, caddr_t), + memcpy(mtod(m, void *), mtod(ds->ds_mbuf, void *), total_len); /* Allow the receive descriptor to continue using its mbuf. */ @@ -1061,14 +1061,14 @@ vr_start(struct ifnet *ifp) break; } } - m_copydata(m0, 0, m0->m_pkthdr.len, mtod(m, caddr_t)); + m_copydata(m0, 0, m0->m_pkthdr.len, mtod(m, void *)); m->m_pkthdr.len = m->m_len = m0->m_pkthdr.len; /* * The Rhine doesn't auto-pad, so we have to do this * ourselves. */ if (m0->m_pkthdr.len < VR_MIN_FRAMELEN) { - memset(mtod(m, caddr_t) + m0->m_pkthdr.len, + memset(mtod(m, char *) + m0->m_pkthdr.len, 0, VR_MIN_FRAMELEN - m0->m_pkthdr.len); m->m_pkthdr.len = m->m_len = VR_MIN_FRAMELEN; } @@ -1312,7 +1312,7 @@ vr_ifmedia_sts(struct ifnet *ifp, struct ifmediareq *ifmr) } static int -vr_ioctl(struct ifnet *ifp, u_long command, caddr_t data) +vr_ioctl(struct ifnet *ifp, u_long command, void *data) { struct vr_softc *sc = ifp->if_softc; struct ifreq *ifr = (struct ifreq *)data; @@ -1665,7 +1665,7 @@ vr_attach(struct device *parent, struct device *self, void *aux) } if ((error = bus_dmamem_map(sc->vr_dmat, &seg, rseg, - sizeof(struct vr_control_data), (caddr_t *)&sc->vr_control_data, + sizeof(struct vr_control_data), (void **)&sc->vr_control_data, BUS_DMA_COHERENT)) != 0) { printf("%s: unable to map control data, error = %d\n", sc->vr_dev.dv_xname, error); @@ -1778,7 +1778,7 @@ vr_attach(struct device *parent, struct device *self, void *aux) fail_3: bus_dmamap_destroy(sc->vr_dmat, sc->vr_cddmamap); fail_2: - bus_dmamem_unmap(sc->vr_dmat, (caddr_t)sc->vr_control_data, + bus_dmamem_unmap(sc->vr_dmat, (void *)sc->vr_control_data, sizeof(struct vr_control_data)); fail_1: bus_dmamem_free(sc->vr_dmat, &seg, rseg); diff --git a/sys/dev/pci/if_wm.c b/sys/dev/pci/if_wm.c index 1cffc683612..0d06065e2f3 100644 --- a/sys/dev/pci/if_wm.c +++ b/sys/dev/pci/if_wm.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_wm.c,v 1.134 2007/02/23 08:22:06 msaitoh Exp $ */ +/* $NetBSD: if_wm.c,v 1.135 2007/03/04 06:02:23 christos Exp $ */ /* * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc. @@ -47,7 +47,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.134 2007/02/23 08:22:06 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.135 2007/03/04 06:02:23 christos Exp $"); #include "bpfilter.h" #include "rnd.h" @@ -470,7 +470,7 @@ do { \ static void wm_start(struct ifnet *); static void wm_watchdog(struct ifnet *); -static int wm_ioctl(struct ifnet *, u_long, caddr_t); +static int wm_ioctl(struct ifnet *, u_long, void *); static int wm_init(struct ifnet *); static void wm_stop(struct ifnet *, int); @@ -1096,7 +1096,7 @@ wm_attach(struct device *parent, struct device *self, void *aux) } if ((error = bus_dmamem_map(sc->sc_dmat, &seg, rseg, cdata_size, - (caddr_t *)&sc->sc_control_data, 0)) != 0) { + (void **)&sc->sc_control_data, 0)) != 0) { aprint_error("%s: unable to map control data, error = %d\n", sc->sc_dev.dv_xname, error); goto fail_1; @@ -1533,7 +1533,7 @@ wm_attach(struct device *parent, struct device *self, void *aux) fail_3: bus_dmamap_destroy(sc->sc_dmat, sc->sc_cddmamap); fail_2: - bus_dmamem_unmap(sc->sc_dmat, (caddr_t)sc->sc_control_data, + bus_dmamem_unmap(sc->sc_dmat, (void *)sc->sc_control_data, cdata_size); fail_1: bus_dmamem_free(sc->sc_dmat, &seg, rseg); @@ -1689,8 +1689,8 @@ wm_tx_offload(struct wm_softc *sc, struct wm_txsoft *txs, uint32_t *cmdp, if (v4) { struct ip *ip = - (void *)(mtod(m0, caddr_t) + offset); - th = (void *)(mtod(m0, caddr_t) + hlen); + (void *)(mtod(m0, char *) + offset); + th = (void *)(mtod(m0, char *) + hlen); ip->ip_len = 0; th->th_sum = in_cksum_phdr(ip->ip_src.s_addr, @@ -2234,7 +2234,7 @@ wm_watchdog(struct ifnet *ifp) * Handle control requests from the operator. */ static int -wm_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) +wm_ioctl(struct ifnet *ifp, u_long cmd, void *data) { struct wm_softc *sc = ifp->if_softc; struct ifreq *ifr = (struct ifreq *) data; diff --git a/sys/dev/pci/if_wpi.c b/sys/dev/pci/if_wpi.c index c18666327da..806bc1895ab 100644 --- a/sys/dev/pci/if_wpi.c +++ b/sys/dev/pci/if_wpi.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_wpi.c,v 1.8 2007/01/25 21:17:38 njoly Exp $ */ +/* $NetBSD: if_wpi.c,v 1.9 2007/03/04 06:02:24 christos Exp $ */ /*- * Copyright (c) 2006 @@ -18,7 +18,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_wpi.c,v 1.8 2007/01/25 21:17:38 njoly Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_wpi.c,v 1.9 2007/03/04 06:02:24 christos Exp $"); /* * Driver for Intel PRO/Wireless 3945ABG 802.11 network adapters. @@ -106,7 +106,7 @@ static void wpi_dma_contig_free(struct wpi_dma_info *); static int wpi_alloc_shared(struct wpi_softc *); static void wpi_free_shared(struct wpi_softc *); static struct wpi_rbuf *wpi_alloc_rbuf(struct wpi_softc *); -static void wpi_free_rbuf(struct mbuf *, caddr_t, size_t, void *); +static void wpi_free_rbuf(struct mbuf *, void *, size_t, void *); static int wpi_alloc_rpool(struct wpi_softc *); static void wpi_free_rpool(struct wpi_softc *); static int wpi_alloc_rx_ring(struct wpi_softc *, struct wpi_rx_ring *); @@ -139,7 +139,7 @@ static int wpi_tx_data(struct wpi_softc *, struct mbuf *, struct ieee80211_node *, int); static void wpi_start(struct ifnet *); static void wpi_watchdog(struct ifnet *); -static int wpi_ioctl(struct ifnet *, u_long, caddr_t); +static int wpi_ioctl(struct ifnet *, u_long, void *); static void wpi_read_eeprom(struct wpi_softc *); static int wpi_cmd(struct wpi_softc *, int, const void *, int, int); static int wpi_wme_update(struct ieee80211com *); @@ -561,7 +561,7 @@ wpi_alloc_rbuf(struct wpi_softc *sc) * Rx buffer is attached is freed. */ static void -wpi_free_rbuf(struct mbuf* m, caddr_t buf, size_t size, void *arg) +wpi_free_rbuf(struct mbuf* m, void *buf, size_t size, void *arg) { struct wpi_rbuf *rbuf = arg; struct wpi_softc *sc = rbuf->sc; @@ -598,7 +598,7 @@ wpi_alloc_rpool(struct wpi_softc *sc) for (i = 0; i < WPI_RBUF_COUNT; i++) { rbuf = &ring->rbuf[i]; rbuf->sc = sc; /* backpointer for callbacks */ - rbuf->vaddr = ring->buf_dma.vaddr + i * WPI_RBUF_SIZE; + rbuf->vaddr = (char *)ring->buf_dma.vaddr + i * WPI_RBUF_SIZE; rbuf->paddr = ring->buf_dma.paddr + i * WPI_RBUF_SIZE; SLIST_INSERT_HEAD(&ring->freelist, rbuf, next); @@ -1075,7 +1075,7 @@ wpi_load_firmware(struct wpi_softc *sc, uint32_t target, const char *fw, { bus_dmamap_t map; bus_dma_segment_t seg; - caddr_t virtaddr; + void *virtaddr; struct wpi_tx_desc desc; int i, ntries, nsegs, error; @@ -1190,8 +1190,8 @@ wpi_rx_intr(struct wpi_softc *sc, struct wpi_rx_desc *desc, return; } - head = (struct wpi_rx_head *)((caddr_t)(stat + 1) + stat->len); - tail = (struct wpi_rx_tail *)((caddr_t)(head + 1) + le16toh(head->len)); + head = (struct wpi_rx_head *)((char *)(stat + 1) + stat->len); + tail = (struct wpi_rx_tail *)((char *)(head + 1) + le16toh(head->len)); DPRINTFN(4, ("rx intr: idx=%d len=%d stat len=%d rssi=%d rate=%x " "chan=%d tstamp=%llu\n", ring->cur, le32toh(desc->len), @@ -1233,7 +1233,7 @@ wpi_rx_intr(struct wpi_softc *sc, struct wpi_rx_desc *desc, /* finalize mbuf */ m->m_pkthdr.rcvif = ifp; - m->m_data = (caddr_t)(head + 1); + m->m_data = (void *)(head + 1); m->m_pkthdr.len = m->m_len = le16toh(head->len); #if NBPFILTER > 0 @@ -1646,7 +1646,7 @@ wpi_tx_data(struct wpi_softc *sc, struct mbuf *m0, struct ieee80211_node *ni, tx->len = htole16(m0->m_pkthdr.len); /* save and trim IEEE802.11 header */ - m_copydata(m0, 0, hdrlen, (caddr_t)&tx->wh); + m_copydata(m0, 0, hdrlen, (void *)&tx->wh); m_adj(m0, hdrlen); error = bus_dmamap_load_mbuf(sc->sc_dmat, data->map, m0, @@ -1675,7 +1675,7 @@ wpi_tx_data(struct wpi_softc *sc, struct mbuf *m0, struct ieee80211_node *ni, } } - m_copydata(m0, 0, m0->m_pkthdr.len, mtod(mnew, caddr_t)); + m_copydata(m0, 0, m0->m_pkthdr.len, mtod(mnew, void *)); m_freem(m0); mnew->m_len = mnew->m_pkthdr.len; m0 = mnew; @@ -1845,7 +1845,7 @@ wpi_watchdog(struct ifnet *ifp) } static int -wpi_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) +wpi_ioctl(struct ifnet *ifp, u_long cmd, void *data) { #define IS_RUNNING(ifp) \ ((ifp->if_flags & IFF_UP) && (ifp->if_flags & IFF_RUNNING)) @@ -2127,7 +2127,7 @@ wpi_setup_beacon(struct wpi_softc *sc, struct ieee80211_node *ni) bcn->flags = htole32(WPI_TX_AUTO_SEQ | WPI_TX_INSERT_TSTAMP); /* save and trim IEEE802.11 header */ - m_copydata(m0, 0, sizeof (struct ieee80211_frame), (caddr_t)&bcn->wh); + m_copydata(m0, 0, sizeof (struct ieee80211_frame), (void *)&bcn->wh); m_adj(m0, sizeof (struct ieee80211_frame)); /* assume beacon frame is contiguous */ diff --git a/sys/dev/pci/if_wpivar.h b/sys/dev/pci/if_wpivar.h index 54a915280ab..4e18fb69963 100644 --- a/sys/dev/pci/if_wpivar.h +++ b/sys/dev/pci/if_wpivar.h @@ -1,4 +1,4 @@ -/* $NetBSD: if_wpivar.h,v 1.3 2007/01/13 09:39:06 degroote Exp $ */ +/* $NetBSD: if_wpivar.h,v 1.4 2007/03/04 06:02:24 christos Exp $ */ /*- * Copyright (c) 2006 @@ -57,7 +57,7 @@ struct wpi_dma_info { bus_dmamap_t map; bus_dma_segment_t seg; bus_addr_t paddr; - caddr_t vaddr; + void * vaddr; bus_size_t size; }; @@ -85,7 +85,7 @@ struct wpi_softc; struct wpi_rbuf { struct wpi_softc *sc; - caddr_t vaddr; + void * vaddr; bus_addr_t paddr; SLIST_ENTRY(wpi_rbuf) next; }; @@ -149,7 +149,7 @@ struct wpi_softc { void *powerhook; #if NBPFILTER > 0 - caddr_t sc_drvbpf; + void * sc_drvbpf; union { struct wpi_rx_radiotap_header th; diff --git a/sys/dev/pci/if_xge.c b/sys/dev/pci/if_xge.c index 53c54e579f1..ceea57f1714 100644 --- a/sys/dev/pci/if_xge.c +++ b/sys/dev/pci/if_xge.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_xge.c,v 1.4 2006/11/16 01:33:09 christos Exp $ */ +/* $NetBSD: if_xge.c,v 1.5 2007/03/04 06:02:24 christos Exp $ */ /* * Copyright (c) 2004, SUNET, Swedish University Computer Network. @@ -43,7 +43,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_xge.c,v 1.4 2006/11/16 01:33:09 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_xge.c,v 1.5 2007/03/04 06:02:24 christos Exp $"); #include "bpfilter.h" #include "rnd.h" @@ -190,7 +190,7 @@ static void xge_stop(struct ifnet *, int); static int xge_add_rxbuf(struct xge_softc *, int); static void xge_mcast_filter(struct xge_softc *sc); static int xge_setup_xgxs(struct xge_softc *sc); -static int xge_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data); +static int xge_ioctl(struct ifnet *ifp, u_long cmd, void *data); static int xge_init(struct ifnet *ifp); static void xge_ifmedia_status(struct ifnet *, struct ifmediareq *); static int xge_xgmii_mediachange(struct ifnet *); @@ -831,7 +831,7 @@ xge_intr(void *pv) } int -xge_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) +xge_ioctl(struct ifnet *ifp, u_long cmd, void *data) { struct xge_softc *sc = ifp->if_softc; struct ifreq *ifr = (struct ifreq *) data; @@ -1014,7 +1014,7 @@ xge_alloc_txmem(struct xge_softc *sc) struct txd *txp; bus_dma_segment_t seg; bus_addr_t txdp; - caddr_t kva; + void *kva; int i, rseg, state; #define TXMAPSZ (NTXDESCS*NTXFRAGS*sizeof(struct txd)) @@ -1068,7 +1068,7 @@ xge_alloc_rxmem(struct xge_softc *sc) { struct rxd_4k *rxpp; bus_dma_segment_t seg; - caddr_t kva; + void *kva; int i, rseg, state; /* sanity check */ diff --git a/sys/dev/pci/ifpci.c b/sys/dev/pci/ifpci.c index 07bb754fcd6..26fd76457e0 100644 --- a/sys/dev/pci/ifpci.c +++ b/sys/dev/pci/ifpci.c @@ -1,4 +1,4 @@ -/* $NetBSD: ifpci.c,v 1.21 2006/11/16 01:33:09 christos Exp $ */ +/* $NetBSD: ifpci.c,v 1.22 2007/03/04 06:02:24 christos Exp $ */ /* * Copyright (c) 1999 Gary Jennejohn. All rights reserved. * @@ -36,14 +36,14 @@ * Fritz!Card PCI driver * ------------------------------------------------ * - * $Id: ifpci.c,v 1.21 2006/11/16 01:33:09 christos Exp $ + * $Id: ifpci.c,v 1.22 2007/03/04 06:02:24 christos Exp $ * * last edit-date: [Fri Jan 5 11:38:58 2001] * *---------------------------------------------------------------------------*/ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ifpci.c,v 1.21 2006/11/16 01:33:09 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ifpci.c,v 1.22 2007/03/04 06:02:24 christos Exp $"); #include <sys/param.h> @@ -914,7 +914,7 @@ avma1pp_disable(struct isic_softc *sc) } static int -avma1pp_intr(void * parm) +avma1pp_intr(void *parm) { struct isic_softc *sc = parm; int ret = 0; diff --git a/sys/dev/pci/ifpci2.c b/sys/dev/pci/ifpci2.c index 42cc76b59f5..c3751eb8374 100644 --- a/sys/dev/pci/ifpci2.c +++ b/sys/dev/pci/ifpci2.c @@ -1,4 +1,4 @@ -/* $NetBSD: ifpci2.c,v 1.9 2006/11/16 01:33:09 christos Exp $ */ +/* $NetBSD: ifpci2.c,v 1.10 2007/03/04 06:02:24 christos Exp $ */ /* * Copyright (c) 1999 Gary Jennejohn. All rights reserved. * @@ -36,14 +36,14 @@ * Fritz!Card PCI driver * ------------------------------------------------ * - * $Id: ifpci2.c,v 1.9 2006/11/16 01:33:09 christos Exp $ + * $Id: ifpci2.c,v 1.10 2007/03/04 06:02:24 christos Exp $ * * last edit-date: [Fri Jan 5 11:38:58 2001] * *---------------------------------------------------------------------------*/ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ifpci2.c,v 1.9 2006/11/16 01:33:09 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ifpci2.c,v 1.10 2007/03/04 06:02:24 christos Exp $"); #include <sys/param.h> @@ -879,7 +879,7 @@ avma1pp2_disable(struct isic_softc *sc) } static int -avma1pp2_intr(void * parm) +avma1pp2_intr(void *parm) { struct isic_softc *sc = parm; int ret = 0; diff --git a/sys/dev/pci/isp_pci.c b/sys/dev/pci/isp_pci.c index e989dc59419..f86736ab569 100644 --- a/sys/dev/pci/isp_pci.c +++ b/sys/dev/pci/isp_pci.c @@ -1,4 +1,4 @@ -/* $NetBSD: isp_pci.c,v 1.99 2007/01/13 19:01:55 cube Exp $ */ +/* $NetBSD: isp_pci.c,v 1.100 2007/03/04 06:02:24 christos Exp $ */ /* * This driver, which is contained in NetBSD in the files: * @@ -57,7 +57,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: isp_pci.c,v 1.99 2007/01/13 19:01:55 cube Exp $"); +__KERNEL_RCSID(0, "$NetBSD: isp_pci.c,v 1.100 2007/03/04 06:02:24 christos Exp $"); #include <dev/ic/isp_netbsd.h> #include <dev/pci/pcireg.h> @@ -988,13 +988,13 @@ isp_pci_mbxdma(struct ispsoftc *isp) if (bus_dmamem_alloc(dmat, len, PAGE_SIZE, 0, &sg, 1, &rs, BUS_DMA_NOWAIT) || bus_dmamem_map(isp->isp_dmatag, &sg, rs, len, - (caddr_t *)&isp->isp_rquest, BUS_DMA_NOWAIT|BUS_DMA_COHERENT)) { + (void **)&isp->isp_rquest, BUS_DMA_NOWAIT|BUS_DMA_COHERENT)) { goto dmafail; } if (bus_dmamap_create(dmat, len, 1, len, 0, BUS_DMA_NOWAIT, &isp->isp_rqdmap) || bus_dmamap_load(dmat, isp->isp_rqdmap, - (caddr_t)isp->isp_rquest, len, NULL, + (void *)isp->isp_rquest, len, NULL, BUS_DMA_NOWAIT)) { goto dmafail; } @@ -1006,13 +1006,13 @@ isp_pci_mbxdma(struct ispsoftc *isp) len = ISP_QUEUE_SIZE(RESULT_QUEUE_LEN(isp)); if (bus_dmamem_alloc(dmat, len, PAGE_SIZE, 0, &sg, 1, &rs, BUS_DMA_NOWAIT) || - bus_dmamem_map(dmat, &sg, rs, len, (caddr_t *)&isp->isp_result, + bus_dmamem_map(dmat, &sg, rs, len, (void **)&isp->isp_result, BUS_DMA_NOWAIT|BUS_DMA_COHERENT)) { goto dmafail; } if (bus_dmamap_create(dmat, len, 1, len, 0, BUS_DMA_NOWAIT, &isp->isp_rsdmap) || bus_dmamap_load(isp->isp_dmatag, - isp->isp_rsdmap, (caddr_t)isp->isp_result, len, NULL, + isp->isp_rsdmap, (void *)isp->isp_result, len, NULL, BUS_DMA_NOWAIT)) { goto dmafail; } @@ -1026,13 +1026,13 @@ isp_pci_mbxdma(struct ispsoftc *isp) len = ISP2100_SCRLEN; if (bus_dmamem_alloc(dmat, len, PAGE_SIZE, 0, &sg, 1, &rs, BUS_DMA_NOWAIT) || - bus_dmamem_map(dmat, &sg, rs, len, (caddr_t *)&fcp->isp_scratch, + bus_dmamem_map(dmat, &sg, rs, len, (void **)&fcp->isp_scratch, BUS_DMA_NOWAIT|BUS_DMA_COHERENT)) { goto dmafail; } if (bus_dmamap_create(dmat, len, 1, len, 0, BUS_DMA_NOWAIT, &isp->isp_scdmap) || bus_dmamap_load(dmat, - isp->isp_scdmap, (caddr_t)fcp->isp_scratch, len, NULL, + isp->isp_scdmap, (void *)fcp->isp_scratch, len, NULL, BUS_DMA_NOWAIT)) { goto dmafail; } diff --git a/sys/dev/pci/machfb.c b/sys/dev/pci/machfb.c index 4c5c4e1de43..cb81c48af5a 100644 --- a/sys/dev/pci/machfb.c +++ b/sys/dev/pci/machfb.c @@ -1,4 +1,4 @@ -/* $NetBSD: machfb.c,v 1.48 2006/11/16 01:33:09 christos Exp $ */ +/* $NetBSD: machfb.c,v 1.49 2007/03/04 06:02:24 christos Exp $ */ /* * Copyright (c) 2002 Bang Jun-Young @@ -33,7 +33,7 @@ #include <sys/cdefs.h> __KERNEL_RCSID(0, - "$NetBSD: machfb.c,v 1.48 2006/11/16 01:33:09 christos Exp $"); + "$NetBSD: machfb.c,v 1.49 2007/03/04 06:02:24 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -112,8 +112,8 @@ struct mach64_softc { bus_space_tag_t sc_memt; bus_space_handle_t sc_regh; bus_space_handle_t sc_memh; - caddr_t sc_aperture; /* mapped aperture vaddr */ - caddr_t sc_registers; /* mapped registers vaddr */ + void *sc_aperture; /* mapped aperture vaddr */ + void *sc_registers; /* mapped registers vaddr */ uint32_t sc_nbus, sc_ndev, sc_nfunc; size_t memsize; @@ -279,7 +279,7 @@ static void mach64_feed_bytes(struct mach64_softc *, int, uint8_t *); static void mach64_showpal(struct mach64_softc *); #endif -static void set_address(struct rasops_info *, caddr_t); +static void set_address(struct rasops_info *, void *); static void machfb_blank(struct mach64_softc *, int); #if 0 @@ -369,7 +369,7 @@ static struct wsscreen_list mach64_screenlist = { _mach64_scrlist }; -static int mach64_ioctl(void *, void *, u_long, caddr_t, int, +static int mach64_ioctl(void *, void *, u_long, void *, int, struct lwp *); static paddr_t mach64_mmap(void *, void *, off_t, int); @@ -725,12 +725,12 @@ mach64_init(struct mach64_softc *sc) BUS_SPACE_MAP_LINEAR, &sc->sc_memh)) { panic("%s: failed to map aperture", sc->sc_dev.dv_xname); } - sc->sc_aperture = (caddr_t)bus_space_vaddr(sc->sc_memt, sc->sc_memh); + sc->sc_aperture = (void *)bus_space_vaddr(sc->sc_memt, sc->sc_memh); sc->sc_regt = sc->sc_memt; bus_space_subregion(sc->sc_regt, sc->sc_memh, MACH64_REG_OFF, sc->sc_regsize, &sc->sc_regh); - sc->sc_registers = sc->sc_aperture + 0x7ffc00; + sc->sc_registers = (char *)sc->sc_aperture + 0x7ffc00; /* * Test wether the aperture is byte swapped or not @@ -744,7 +744,7 @@ mach64_init(struct mach64_softc *sc) else need_swap = 1; if (need_swap) { - sc->sc_aperture += 0x800000; + sc->sc_aperture = (char *)sc->sc_aperture + 0x800000; sc->sc_aperbase += 0x800000; sc->sc_apersize -= 0x800000; } @@ -1584,7 +1584,7 @@ mach64_allocattr(void *cookie, int fg, int bg, int flags, long *attrp) */ static int -mach64_ioctl(void *v, void *vs, u_long cmd, caddr_t data, int flag, +mach64_ioctl(void *v, void *vs, u_long cmd, void *data, int flag, struct lwp *l) { struct vcons_data *vd = v; @@ -1710,12 +1710,12 @@ mach64_mmap(void *v, void *vs, off_t offset, int prot) /* set ri->ri_bits according to fb, ri_xorigin and ri_yorigin */ static void -set_address(struct rasops_info *ri, caddr_t fb) +set_address(struct rasops_info *ri, void *fb) { #ifdef notdef printf(" %d %d %d\n", ri->ri_xorigin, ri->ri_yorigin, ri->ri_stride); #endif - ri->ri_bits = (void *)(fb + ri->ri_stride * ri->ri_yorigin + + ri->ri_bits = (void *)((char *)fb + ri->ri_stride * ri->ri_yorigin + ri->ri_xorigin); } @@ -1816,7 +1816,7 @@ machfb_fbclose(dev_t dev, int flags, int mode, struct lwp *l) } int -machfb_fbioctl(dev_t dev, u_long cmd, caddr_t data, int flags, struct lwp *l) +machfb_fbioctl(dev_t dev, u_long cmd, void *data, int flags, struct lwp *l) { struct mach64_softc *sc = machfb_cd.cd_devs[minor(dev)]; diff --git a/sys/dev/pci/mly.c b/sys/dev/pci/mly.c index b77f8c65dde..a7682a0dd71 100644 --- a/sys/dev/pci/mly.c +++ b/sys/dev/pci/mly.c @@ -1,4 +1,4 @@ -/* $NetBSD: mly.c,v 1.33 2006/12/02 03:10:43 elad Exp $ */ +/* $NetBSD: mly.c,v 1.34 2007/03/04 06:02:24 christos Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -77,7 +77,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: mly.c,v 1.33 2006/12/02 03:10:43 elad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mly.c,v 1.34 2007/03/04 06:02:24 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -123,9 +123,9 @@ static void mly_check_event(struct mly_softc *); static void mly_complete_event(struct mly_softc *, struct mly_ccb *); static void mly_complete_rescan(struct mly_softc *, struct mly_ccb *); static int mly_dmamem_alloc(struct mly_softc *, int, bus_dmamap_t *, - caddr_t *, bus_addr_t *, bus_dma_segment_t *); + void **, bus_addr_t *, bus_dma_segment_t *); static void mly_dmamem_free(struct mly_softc *, int, bus_dmamap_t, - caddr_t, bus_dma_segment_t *); + void *, bus_dma_segment_t *); static int mly_enable_mmbox(struct mly_softc *); static void mly_fetch_event(struct mly_softc *); static int mly_get_controllerinfo(struct mly_softc *); @@ -153,7 +153,7 @@ static int mly_ccb_wait(struct mly_softc *, struct mly_ccb *, int); static void mly_get_xfer_mode(struct mly_softc *, int, struct scsipi_xfer_mode *); static void mly_scsipi_complete(struct mly_softc *, struct mly_ccb *); -static int mly_scsipi_ioctl(struct scsipi_channel *, u_long, caddr_t, +static int mly_scsipi_ioctl(struct scsipi_channel *, u_long, void *, int, struct proc *); static void mly_scsipi_minphys(struct buf *); static void mly_scsipi_request(struct scsipi_channel *, @@ -400,7 +400,7 @@ mly_attach(struct device *parent, struct device *self, void *aux) * Allocate and map the scatter/gather lists. */ rv = mly_dmamem_alloc(mly, MLY_SGL_SIZE * MLY_MAX_CCBS, - &mly->mly_sg_dmamap, (caddr_t *)&mly->mly_sg, + &mly->mly_sg_dmamap, (void **)&mly->mly_sg, &mly->mly_sg_busaddr, &mly->mly_sg_seg); if (rv) { printf("%s: unable to allocate S/G maps\n", @@ -413,7 +413,7 @@ mly_attach(struct device *parent, struct device *self, void *aux) * Allocate and map the memory mailbox. */ rv = mly_dmamem_alloc(mly, sizeof(struct mly_mmbox), - &mly->mly_mmbox_dmamap, (caddr_t *)&mly->mly_mmbox, + &mly->mly_mmbox_dmamap, (void **)&mly->mly_mmbox, &mly->mly_mmbox_busaddr, &mly->mly_mmbox_seg); if (rv) { printf("%s: unable to allocate mailboxes\n", @@ -560,11 +560,11 @@ mly_attach(struct device *parent, struct device *self, void *aux) mly_release_ccbs(mly); if (state > 1) mly_dmamem_free(mly, sizeof(struct mly_mmbox), - mly->mly_mmbox_dmamap, (caddr_t)mly->mly_mmbox, + mly->mly_mmbox_dmamap, (void *)mly->mly_mmbox, &mly->mly_mmbox_seg); if (state > 0) mly_dmamem_free(mly, MLY_SGL_SIZE * MLY_MAX_CCBS, - mly->mly_sg_dmamap, (caddr_t)mly->mly_sg, + mly->mly_sg_dmamap, (void *)mly->mly_sg, &mly->mly_sg_seg); } @@ -1417,7 +1417,7 @@ mly_ccb_submit(struct mly_softc *mly, struct mly_ccb *mc) mly_outb(mly, mly->mly_idbr, MLY_HM_CMDSENT); } else { pkt = &mly->mly_mmbox->mmm_command[mly->mly_mmbox_cmd_idx]; - off = (caddr_t)pkt - (caddr_t)mly->mly_mmbox; + off = (char *)pkt - (char *)mly->mly_mmbox; bus_dmamap_sync(mly->mly_dmat, mly->mly_mmbox_dmamap, off, sizeof(mly->mly_mmbox->mmm_command[0]), @@ -1499,7 +1499,7 @@ mly_intr(void *cookie) if (mly_odbr_true(mly, MLY_AM_STSREADY)) { for (;;) { sp = &mly->mly_mmbox->mmm_status[mly->mly_mmbox_sts_idx]; - off = (caddr_t)sp - (caddr_t)mly->mly_mmbox; + off = (char *)sp - (char *)mly->mly_mmbox; bus_dmamap_sync(mly->mly_dmat, mly->mly_mmbox_dmamap, off, sizeof(mly->mly_mmbox->mmm_command[0]), @@ -1650,7 +1650,7 @@ mly_alloc_ccbs(struct mly_softc *mly) */ rv = mly_dmamem_alloc(mly, mly->mly_ncmds * sizeof(union mly_cmd_packet), - &mly->mly_pkt_dmamap, (caddr_t *)&mly->mly_pkt, + &mly->mly_pkt_dmamap, (void **)&mly->mly_pkt, &mly->mly_pkt_busaddr, &mly->mly_pkt_seg); if (rv) return (rv); @@ -1699,7 +1699,7 @@ mly_release_ccbs(struct mly_softc *mly) /* Release the packet storage. */ mly_dmamem_free(mly, mly->mly_ncmds * sizeof(union mly_cmd_packet), - mly->mly_pkt_dmamap, (caddr_t)mly->mly_pkt, &mly->mly_pkt_seg); + mly->mly_pkt_dmamap, (void *)mly->mly_pkt, &mly->mly_pkt_seg); } /* @@ -2088,7 +2088,7 @@ mly_get_xfer_mode(struct mly_softc *mly, int bus, struct scsipi_xfer_mode *xm) * ioctl hook; used here only to initiate low-level rescans. */ static int -mly_scsipi_ioctl(struct scsipi_channel *chan, u_long cmd, caddr_t data, +mly_scsipi_ioctl(struct scsipi_channel *chan, u_long cmd, void *data, int flag, struct proc *p) { struct mly_softc *mly; @@ -2205,7 +2205,7 @@ mly_padstr(char *dst, const char *src, int len) */ static int mly_dmamem_alloc(struct mly_softc *mly, int size, bus_dmamap_t *dmamap, - caddr_t *kva, bus_addr_t *paddr, bus_dma_segment_t *seg) + void **kva, bus_addr_t *paddr, bus_dma_segment_t *seg) { int rseg, rv, state; @@ -2261,7 +2261,7 @@ mly_dmamem_alloc(struct mly_softc *mly, int size, bus_dmamap_t *dmamap, */ static void mly_dmamem_free(struct mly_softc *mly, int size, bus_dmamap_t dmamap, - caddr_t kva, bus_dma_segment_t *seg) + void *kva, bus_dma_segment_t *seg) { bus_dmamap_unload(mly->mly_dmat, dmamap); @@ -2308,7 +2308,7 @@ mlyclose(dev_t dev, int flag, int mode, * Handle control operations. */ int -mlyioctl(dev_t dev, u_long cmd, caddr_t data, int flag, +mlyioctl(dev_t dev, u_long cmd, void *data, int flag, struct lwp *l) { struct mly_softc *mly; diff --git a/sys/dev/pci/oboe.c b/sys/dev/pci/oboe.c index f66cba2cd37..478a403fa27 100644 --- a/sys/dev/pci/oboe.c +++ b/sys/dev/pci/oboe.c @@ -1,4 +1,4 @@ -/* $NetBSD: oboe.c,v 1.24 2006/11/16 01:33:09 christos Exp $ */ +/* $NetBSD: oboe.c,v 1.25 2007/03/04 06:02:25 christos Exp $ */ /* XXXXFVDL THIS DRIVER IS BROKEN FOR NON-i386 -- vtophys() usage */ @@ -45,7 +45,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: oboe.c,v 1.24 2006/11/16 01:33:09 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: oboe.c,v 1.25 2007/03/04 06:02:25 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -142,7 +142,7 @@ static int oboe_reset(struct oboe_softc *); struct oboe_dma { bus_dmamap_t map; - caddr_t addr; + void *addr; bus_dma_segment_t segs[1]; int nsegs; size_t size; diff --git a/sys/dev/pci/pci_usrreq.c b/sys/dev/pci/pci_usrreq.c index 0dfde95adf7..34e647b14da 100644 --- a/sys/dev/pci/pci_usrreq.c +++ b/sys/dev/pci/pci_usrreq.c @@ -1,4 +1,4 @@ -/* $NetBSD: pci_usrreq.c,v 1.13 2006/11/16 01:33:09 christos Exp $ */ +/* $NetBSD: pci_usrreq.c,v 1.14 2007/03/04 06:02:25 christos Exp $ */ /* * Copyright 2001 Wasabi Systems, Inc. @@ -40,7 +40,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: pci_usrreq.c,v 1.13 2006/11/16 01:33:09 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pci_usrreq.c,v 1.14 2007/03/04 06:02:25 christos Exp $"); #include <sys/param.h> #include <sys/conf.h> @@ -71,7 +71,7 @@ pciopen(dev_t dev, int flags, int mode, } static int -pciioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct lwp *l) +pciioctl(dev_t dev, u_long cmd, void *data, int flag, struct lwp *l) { struct pci_softc *sc = device_lookup(&pci_cd, minor(dev)); struct pciio_bdf_cfgreg *bdfr = (void *) data; @@ -140,7 +140,7 @@ const struct cdevsw pci_cdevsw = { * PCI ioctls that can be performed on devices directly. */ int -pci_devioctl(pci_chipset_tag_t pc, pcitag_t tag, u_long cmd, caddr_t data, +pci_devioctl(pci_chipset_tag_t pc, pcitag_t tag, u_long cmd, void *data, int flag, struct lwp *l) { struct pciio_cfgreg *r = (void *) data; diff --git a/sys/dev/pci/pciide_common.c b/sys/dev/pci/pciide_common.c index feaf41f04ae..3b05ff9dccf 100644 --- a/sys/dev/pci/pciide_common.c +++ b/sys/dev/pci/pciide_common.c @@ -1,4 +1,4 @@ -/* $NetBSD: pciide_common.c,v 1.36 2007/02/09 21:55:27 ad Exp $ */ +/* $NetBSD: pciide_common.c,v 1.37 2007/03/04 06:02:25 christos Exp $ */ /* @@ -76,7 +76,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: pciide_common.c,v 1.36 2007/02/09 21:55:27 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pciide_common.c,v 1.37 2007/03/04 06:02:25 christos Exp $"); #include <sys/param.h> #include <sys/malloc.h> @@ -562,7 +562,7 @@ pciide_dma_table_setup(sc, channel, drive) } if ((error = bus_dmamem_map(sc->sc_dmat, &seg, rseg, dma_table_size, - (caddr_t *)&dma_maps->dma_table, + (void **)&dma_maps->dma_table, BUS_DMA_NOWAIT|BUS_DMA_COHERENT)) != 0) { aprint_error(dmaerrfmt, sc->sc_wdcdev.sc_atac.atac_dev.dv_xname, channel, "map", drive, error); diff --git a/sys/dev/pci/pcivar.h b/sys/dev/pci/pcivar.h index be2508310e8..e159cb1c9e5 100644 --- a/sys/dev/pci/pcivar.h +++ b/sys/dev/pci/pcivar.h @@ -1,4 +1,4 @@ -/* $NetBSD: pcivar.h,v 1.73 2006/09/25 23:09:42 jmcneill Exp $ */ +/* $NetBSD: pcivar.h,v 1.74 2007/03/04 06:02:25 christos Exp $ */ /* * Copyright (c) 1996, 1997 Christopher G. Demetriou. All rights reserved. @@ -212,7 +212,7 @@ const struct pci_quirkdata * * Helper functions for user access to the PCI bus. */ struct proc; -int pci_devioctl(pci_chipset_tag_t, pcitag_t, u_long, caddr_t, +int pci_devioctl(pci_chipset_tag_t, pcitag_t, u_long, void *, int flag, struct lwp *); /* diff --git a/sys/dev/pci/pcscp.c b/sys/dev/pci/pcscp.c index 68568e522e8..f54405fab39 100644 --- a/sys/dev/pci/pcscp.c +++ b/sys/dev/pci/pcscp.c @@ -1,4 +1,4 @@ -/* $NetBSD: pcscp.c,v 1.38 2006/11/16 01:33:10 christos Exp $ */ +/* $NetBSD: pcscp.c,v 1.39 2007/03/04 06:02:25 christos Exp $ */ /*- * Copyright (c) 1997, 1998, 1999 The NetBSD Foundation, Inc. @@ -46,7 +46,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: pcscp.c,v 1.38 2006/11/16 01:33:10 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pcscp.c,v 1.39 2007/03/04 06:02:25 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -113,7 +113,7 @@ static void pcscp_write_reg(struct ncr53c9x_softc *, int, u_char); static int pcscp_dma_isintr(struct ncr53c9x_softc *); static void pcscp_dma_reset(struct ncr53c9x_softc *); static int pcscp_dma_intr(struct ncr53c9x_softc *); -static int pcscp_dma_setup(struct ncr53c9x_softc *, caddr_t *, size_t *, +static int pcscp_dma_setup(struct ncr53c9x_softc *, void **, size_t *, int, size_t *); static void pcscp_dma_go(struct ncr53c9x_softc *); static void pcscp_dma_stop(struct ncr53c9x_softc *); @@ -259,7 +259,7 @@ pcscp_attach(struct device *parent, struct device *self, void *aux) goto fail_0; } if ((error = bus_dmamem_map(esc->sc_dmat, &seg, rseg, - sizeof(uint32_t) * MDL_SIZE , (caddr_t *)&esc->sc_mdladdr, + sizeof(uint32_t) * MDL_SIZE , (void **)&esc->sc_mdladdr, BUS_DMA_NOWAIT|BUS_DMA_COHERENT)) != 0) { printf(": unable to map the MDL memory, error = %d\n", error); goto fail_1; @@ -313,7 +313,7 @@ pcscp_attach(struct device *parent, struct device *self, void *aux) fail_3: bus_dmamap_destroy(esc->sc_dmat, esc->sc_mdldmap); fail_2: - bus_dmamem_unmap(esc->sc_dmat, (caddr_t)esc->sc_mdldmap, + bus_dmamem_unmap(esc->sc_dmat, (void *)esc->sc_mdldmap, sizeof(uint32_t) * MDL_SIZE); fail_1: bus_dmamem_free(esc->sc_dmat, &seg, rseg); @@ -509,7 +509,7 @@ pcscp_dma_intr(struct ncr53c9x_softc *sc) } static int -pcscp_dma_setup(struct ncr53c9x_softc *sc, caddr_t *addr, size_t *len, +pcscp_dma_setup(struct ncr53c9x_softc *sc, void **addr, size_t *len, int datain, size_t *dmasize) { struct pcscp_softc *esc = (struct pcscp_softc *)sc; @@ -520,7 +520,7 @@ pcscp_dma_setup(struct ncr53c9x_softc *sc, caddr_t *addr, size_t *len, WRITE_DMAREG(esc, DMA_CMD, DMACMD_IDLE | (datain ? DMACMD_DIR : 0)); - esc->sc_dmaaddr = addr; + esc->sc_dmaaddr = (void *)addr; esc->sc_dmalen = len; esc->sc_dmasize = *dmasize; esc->sc_datain = datain; diff --git a/sys/dev/pci/piixpm.c b/sys/dev/pci/piixpm.c index 9f836e56732..511b3a2288c 100644 --- a/sys/dev/pci/piixpm.c +++ b/sys/dev/pci/piixpm.c @@ -1,4 +1,4 @@ -/* $NetBSD: piixpm.c,v 1.12 2006/12/10 00:34:52 uwe Exp $ */ +/* $NetBSD: piixpm.c,v 1.13 2007/03/04 06:02:25 christos Exp $ */ /* $OpenBSD: piixpm.c,v 1.20 2006/02/27 08:25:02 grange Exp $ */ /* @@ -69,7 +69,7 @@ struct piixpm_softc { struct lock sc_i2c_lock; struct { i2c_op_t op; - void * buf; + void * buf; size_t len; int flags; volatile int error; diff --git a/sys/dev/pci/radeonfb.c b/sys/dev/pci/radeonfb.c index ed4b4e43a8f..2cfd85c5c5b 100644 --- a/sys/dev/pci/radeonfb.c +++ b/sys/dev/pci/radeonfb.c @@ -1,4 +1,4 @@ -/* $NetBSD: radeonfb.c,v 1.11 2007/02/09 21:55:27 ad Exp $ */ +/* $NetBSD: radeonfb.c,v 1.12 2007/03/04 06:02:25 christos Exp $ */ /*- * Copyright (c) 2006 Itronix Inc. @@ -70,7 +70,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: radeonfb.c,v 1.11 2007/02/09 21:55:27 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: radeonfb.c,v 1.12 2007/03/04 06:02:25 christos Exp $"); #define RADEONFB_DEFAULT_DEPTH 32 @@ -99,7 +99,7 @@ __KERNEL_RCSID(0, "$NetBSD: radeonfb.c,v 1.11 2007/02/09 21:55:27 ad Exp $"); static int radeonfb_match(struct device *, struct cfdata *, void *); static void radeonfb_attach(struct device *, struct device *, void *); -static int radeonfb_ioctl(void *, void *, unsigned long, caddr_t, int, +static int radeonfb_ioctl(void *, void *, unsigned long, void *, int, struct lwp *); static paddr_t radeonfb_mmap(void *, void *, off_t, int); static int radeonfb_scratch_test(struct radeonfb_softc *, int, uint32_t); @@ -892,7 +892,7 @@ error: int radeonfb_ioctl(void *v, void *vs, - unsigned long cmd, caddr_t d, int flag, struct lwp *l) + unsigned long cmd, void *d, int flag, struct lwp *l) { struct vcons_data *vd; struct radeonfb_display *dp; diff --git a/sys/dev/pci/sv.c b/sys/dev/pci/sv.c index d284c42fce8..4c5297d975e 100644 --- a/sys/dev/pci/sv.c +++ b/sys/dev/pci/sv.c @@ -1,4 +1,4 @@ -/* $NetBSD: sv.c,v 1.35 2006/11/16 01:33:10 christos Exp $ */ +/* $NetBSD: sv.c,v 1.36 2007/03/04 06:02:25 christos Exp $ */ /* $OpenBSD: sv.c,v 1.2 1998/07/13 01:50:15 csapuntz Exp $ */ /* @@ -74,7 +74,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: sv.c,v 1.35 2006/11/16 01:33:10 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sv.c,v 1.36 2007/03/04 06:02:25 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -124,7 +124,7 @@ static int sv_intr(void *); struct sv_dma { bus_dmamap_t map; - caddr_t addr; + void *addr; bus_dma_segment_t segs[1]; int nsegs; size_t size; diff --git a/sys/dev/pci/tga.c b/sys/dev/pci/tga.c index f83673d3b59..ae20579d36a 100644 --- a/sys/dev/pci/tga.c +++ b/sys/dev/pci/tga.c @@ -1,4 +1,4 @@ -/* $NetBSD: tga.c,v 1.64 2007/01/13 18:42:45 cube Exp $ */ +/* $NetBSD: tga.c,v 1.65 2007/03/04 06:02:25 christos Exp $ */ /* * Copyright (c) 1995, 1996 Carnegie-Mellon University. @@ -28,7 +28,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: tga.c,v 1.64 2007/01/13 18:42:45 cube Exp $"); +__KERNEL_RCSID(0, "$NetBSD: tga.c,v 1.65 2007/03/04 06:02:25 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -76,7 +76,7 @@ unsigned tga_getdotclock(struct tga_devconfig *dc); struct tga_devconfig tga_console_dc; -int tga_ioctl(void *, void *, u_long, caddr_t, int, struct lwp *); +int tga_ioctl(void *, void *, u_long, void *, int, struct lwp *); paddr_t tga_mmap(void *, void *, off_t, int); static void tga_copyrows(void *, int, int, int); static void tga_copycols(void *, int, int, int, int); @@ -537,7 +537,7 @@ tga_ioctl(v, vs, cmd, data, flag, l) void *v; void *vs; u_long cmd; - caddr_t data; + void *data; int flag; struct lwp *l; { @@ -1260,12 +1260,12 @@ void tga_putchar (c, row, col, uc, attr) *rp = fr[0] | (fr[1] << 8) | (fr[2] << 16) | (fr[3] << 24); fr += fs; - rp = (int32_t *)((caddr_t)rp + ri->ri_stride); + rp = (int32_t *)((void *)rp + ri->ri_stride); } /* Do underline */ if ((attr & 1) != 0) { - rp = (int32_t *)((caddr_t)rp - (ri->ri_stride << 1)); + rp = (int32_t *)((void *)rp - (ri->ri_stride << 1)); *rp = 0xffffffff; } @@ -1321,7 +1321,7 @@ tga_eraserows(c, row, num, attr) while (lines--) { *rp = pixels; - rp = (int32_t *)((caddr_t)rp + ri->ri_stride); + rp = (int32_t *)((void *)rp + ri->ri_stride); } /* Set grapics mode back to normal. */ @@ -1375,7 +1375,7 @@ long attr; while (lines--) { *rp = pixels; - rp = (int32_t *)((caddr_t)rp + ri->ri_stride); + rp = (int32_t *)((void *)rp + ri->ri_stride); } /* Set grapics mode back to normal. */ diff --git a/sys/dev/pci/trm.c b/sys/dev/pci/trm.c index cb9b1b3d84a..1cf7a8f7ddb 100644 --- a/sys/dev/pci/trm.c +++ b/sys/dev/pci/trm.c @@ -1,4 +1,4 @@ -/* $NetBSD: trm.c,v 1.25 2006/11/16 01:33:10 christos Exp $ */ +/* $NetBSD: trm.c,v 1.26 2007/03/04 06:02:25 christos Exp $ */ /* * Device Driver for Tekram DC395U/UW/F, DC315/U * PCI SCSI Bus Master Host Adapter @@ -42,7 +42,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: trm.c,v 1.25 2006/11/16 01:33:10 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: trm.c,v 1.26 2007/03/04 06:02:25 christos Exp $"); /* #define TRM_DEBUG */ #ifdef TRM_DEBUG @@ -505,7 +505,7 @@ trm_init(struct trm_softc *sc) return (1); } if ((error = bus_dmamem_map(sc->sc_dmat, &seg, rseg, - all_sgsize, (caddr_t *) &sc->sc_sglist, + all_sgsize, (void **) &sc->sc_sglist, BUS_DMA_NOWAIT | BUS_DMA_COHERENT)) != 0) { printf(": unable to map SCSI REQUEST BLOCKS, " "error = %d\n", error); diff --git a/sys/dev/pci/twa.c b/sys/dev/pci/twa.c index 755d96cbb98..ba19f5334c6 100644 --- a/sys/dev/pci/twa.c +++ b/sys/dev/pci/twa.c @@ -1,4 +1,4 @@ -/* $NetBSD: twa.c,v 1.16 2006/11/16 01:33:10 christos Exp $ */ +/* $NetBSD: twa.c,v 1.17 2007/03/04 06:02:26 christos Exp $ */ /* $wasabi: twa.c,v 1.27 2006/07/28 18:17:21 wrstuden Exp $ */ /*- @@ -74,7 +74,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: twa.c,v 1.16 2006/11/16 01:33:10 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: twa.c,v 1.17 2007/03/04 06:02:26 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -846,7 +846,7 @@ twa_alloc_req_pkts(struct twa_softc *sc, int num_reqs) } if ((rv = bus_dmamem_map(sc->twa_dma_tag, - &seg, rseg, size, (caddr_t *)&sc->twa_cmds, + &seg, rseg, size, (void **)&sc->twa_cmds, BUS_DMA_NOWAIT | BUS_DMA_COHERENT)) != 0) { aprint_error("%s: unable to map commands, rv = %d\n", sc->twa_dv.dv_xname, rv); @@ -1065,7 +1065,7 @@ twa_start(struct twa_request *tr) error = EBUSY; } else { bus_dmamap_sync(sc->twa_dma_tag, sc->twa_cmd_map, - (caddr_t)tr->tr_command - sc->twa_cmds, + (char *)tr->tr_command - (char *)sc->twa_cmds, sizeof(struct twa_command_packet), BUS_DMASYNC_PREWRITE | BUS_DMASYNC_PREREAD); @@ -2155,7 +2155,7 @@ twaclose(dev_t dev, int flag, int mode, * non-zero-- failure */ static int -twaioctl(dev_t dev, u_long cmd, caddr_t data, int flag, +twaioctl(dev_t dev, u_long cmd, void *data, int flag, struct lwp *l) { struct twa_softc *sc; diff --git a/sys/dev/pci/twavar.h b/sys/dev/pci/twavar.h index 9fbe8ce789a..996217dfea5 100644 --- a/sys/dev/pci/twavar.h +++ b/sys/dev/pci/twavar.h @@ -1,4 +1,4 @@ -/* $NetBSD: twavar.h,v 1.6 2006/08/17 17:11:28 christos Exp $ */ +/* $NetBSD: twavar.h,v 1.7 2007/03/04 06:02:26 christos Exp $ */ /* $wasabi: twavar.h,v 1.12 2006/05/01 15:16:59 simonb Exp $ */ /*- @@ -60,7 +60,7 @@ struct twa_softc { bus_dma_tag_t twa_dma_tag; /* data buffer DMA tag */ bus_dmamap_t twa_cmd_map; /* DMA map for the array of cmd pkts */ void *twa_ih; /* interrupt handle cookie */ - caddr_t twa_cmds; + void * twa_cmds; bus_addr_t twa_cmd_pkt_phys;/* phys addr of first of array of cmd pkts */ pci_chipset_tag_t pc; diff --git a/sys/dev/pci/twe.c b/sys/dev/pci/twe.c index 9f59104247a..37988f968aa 100644 --- a/sys/dev/pci/twe.c +++ b/sys/dev/pci/twe.c @@ -1,4 +1,4 @@ -/* $NetBSD: twe.c,v 1.82 2006/12/02 03:10:43 elad Exp $ */ +/* $NetBSD: twe.c,v 1.83 2007/03/04 06:02:26 christos Exp $ */ /*- * Copyright (c) 2000, 2001, 2002, 2003, 2004 The NetBSD Foundation, Inc. @@ -70,7 +70,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: twe.c,v 1.82 2006/12/02 03:10:43 elad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: twe.c,v 1.83 2007/03/04 06:02:26 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -385,7 +385,7 @@ twe_attach(struct device *parent, struct device *self, void *aux) } if ((rv = bus_dmamem_map(sc->sc_dmat, &seg, rseg, size, - (caddr_t *)&sc->sc_cmds, + (void **)&sc->sc_cmds, BUS_DMA_NOWAIT | BUS_DMA_COHERENT)) != 0) { aprint_error("%s: unable to map commands, rv = %d\n", sc->sc_dv.dv_xname, rv); @@ -1308,7 +1308,7 @@ twe_poll(struct twe_softc *sc) ccb->ccb_flags ^= TWE_CCB_COMPLETE | TWE_CCB_ACTIVE; bus_dmamap_sync(sc->sc_dmat, sc->sc_dmamap, - (caddr_t)ccb->ccb_cmd - sc->sc_cmds, + (char *)ccb->ccb_cmd - (char *)sc->sc_cmds, sizeof(struct twe_cmd), BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE); @@ -1690,7 +1690,8 @@ twe_ccb_submit(struct twe_softc *sc, struct twe_ccb *ccb) if ((status & TWE_STS_CMD_QUEUE_FULL) == 0) { bus_dmamap_sync(sc->sc_dmat, sc->sc_dmamap, - (caddr_t)ccb->ccb_cmd - sc->sc_cmds, sizeof(struct twe_cmd), + (char *)ccb->ccb_cmd - (char *)sc->sc_cmds, + sizeof(struct twe_cmd), BUS_DMASYNC_PREWRITE | BUS_DMASYNC_PREREAD); #ifdef DIAGNOSTIC if ((ccb->ccb_flags & TWE_CCB_ALLOCED) == 0) @@ -1752,7 +1753,7 @@ twe_ccb_wait_handler(struct twe_ccb *ccb, int error) * Handle control operations. */ static int -tweioctl(dev_t dev, u_long cmd, caddr_t data, int flag, +tweioctl(dev_t dev, u_long cmd, void *data, int flag, struct lwp *l) { struct twe_softc *twe; diff --git a/sys/dev/pci/twevar.h b/sys/dev/pci/twevar.h index 5d119a1aa78..a42ab6cafc5 100644 --- a/sys/dev/pci/twevar.h +++ b/sys/dev/pci/twevar.h @@ -1,4 +1,4 @@ -/* $NetBSD: twevar.h,v 1.25 2006/02/16 20:17:19 perry Exp $ */ +/* $NetBSD: twevar.h,v 1.26 2007/03/04 06:02:26 christos Exp $ */ /*- * Copyright (c) 2000, 2001, 2002 The NetBSD Foundation, Inc. @@ -64,7 +64,7 @@ struct twe_softc { bus_dma_tag_t sc_dmat; bus_dmamap_t sc_dmamap; void *sc_ih; - caddr_t sc_cmds; + void * sc_cmds; bus_addr_t sc_cmds_paddr; int sc_nccbs; struct twe_ccb *sc_ccbs; diff --git a/sys/dev/pci/ubsec.c b/sys/dev/pci/ubsec.c index 367aa82bb14..8c49aa5d1c0 100644 --- a/sys/dev/pci/ubsec.c +++ b/sys/dev/pci/ubsec.c @@ -1,4 +1,4 @@ -/* $NetBSD: ubsec.c,v 1.11 2006/11/16 01:33:10 christos Exp $ */ +/* $NetBSD: ubsec.c,v 1.12 2007/03/04 06:02:26 christos Exp $ */ /* $FreeBSD: src/sys/dev/ubsec/ubsec.c,v 1.6.2.6 2003/01/23 21:06:43 sam Exp $ */ /* $OpenBSD: ubsec.c,v 1.127 2003/06/04 14:04:58 jason Exp $ */ @@ -1061,11 +1061,11 @@ ubsec_process(void *arg, struct cryptop *crp, int hint) if (crp->crp_flags & CRYPTO_F_IMBUF) m_copyback(q->q_src_m, enccrd->crd_inject, - 8, (caddr_t)ctx.pc_iv); + 8, (void *)ctx.pc_iv); else if (crp->crp_flags & CRYPTO_F_IOV) cuio_copyback(q->q_src_io, enccrd->crd_inject, - 8, (caddr_t)ctx.pc_iv); + 8, (void *)ctx.pc_iv); } } else { ctx.pc_flags |= htole16(UBS_PKTCTX_INBOUND); @@ -1074,11 +1074,11 @@ ubsec_process(void *arg, struct cryptop *crp, int hint) bcopy(enccrd->crd_iv, ctx.pc_iv, 8); else if (crp->crp_flags & CRYPTO_F_IMBUF) m_copydata(q->q_src_m, enccrd->crd_inject, - 8, (caddr_t)ctx.pc_iv); + 8, (void *)ctx.pc_iv); else if (crp->crp_flags & CRYPTO_F_IOV) cuio_copydata(q->q_src_io, enccrd->crd_inject, 8, - (caddr_t)ctx.pc_iv); + (void *)ctx.pc_iv); } ctx.pc_deskey[0] = ses->ses_deskey[0]; @@ -1424,7 +1424,7 @@ ubsec_process(void *arg, struct cryptop *crp, int hint) if (sc->sc_flags & UBS_FLAGS_LONGCTX) { struct ubsec_pktctx_long *ctxl; - ctxl = (struct ubsec_pktctx_long *)(dmap->d_alloc.dma_vaddr + + ctxl = (struct ubsec_pktctx_long *)((char *)dmap->d_alloc.dma_vaddr + offsetof(struct ubsec_dmachunk, d_ctx)); /* transform small context into long context */ @@ -1441,8 +1441,8 @@ ubsec_process(void *arg, struct cryptop *crp, int hint) ctxl->pc_iv[0] = ctx.pc_iv[0]; ctxl->pc_iv[1] = ctx.pc_iv[1]; } else - bcopy(&ctx, dmap->d_alloc.dma_vaddr + - offsetof(struct ubsec_dmachunk, d_ctx), + memcpy((char *)dmap->d_alloc.dma_vaddr + + offsetof(struct ubsec_dmachunk, d_ctx), &ctx, sizeof(struct ubsec_pktctx)); s = splnet(); @@ -1514,7 +1514,7 @@ ubsec_callback(struct ubsec_softc *sc, struct ubsec_q *q) if ((crp->crp_flags & CRYPTO_F_IMBUF) && (q->q_src_m != q->q_dst_m)) { m_freem(q->q_src_m); - crp->crp_buf = (caddr_t)q->q_dst_m; + crp->crp_buf = (void *)q->q_dst_m; } /* copy out IV for future use */ @@ -1526,11 +1526,11 @@ ubsec_callback(struct ubsec_softc *sc, struct ubsec_q *q) if (crp->crp_flags & CRYPTO_F_IMBUF) m_copydata((struct mbuf *)crp->crp_buf, crd->crd_skip + crd->crd_len - 8, 8, - (caddr_t)sc->sc_sessions[q->q_sesn].ses_iv); + (void *)sc->sc_sessions[q->q_sesn].ses_iv); else if (crp->crp_flags & CRYPTO_F_IOV) { cuio_copydata((struct uio *)crp->crp_buf, crd->crd_skip + crd->crd_len - 8, 8, - (caddr_t)sc->sc_sessions[q->q_sesn].ses_iv); + (void *)sc->sc_sessions[q->q_sesn].ses_iv); } break; } @@ -1543,9 +1543,9 @@ ubsec_callback(struct ubsec_softc *sc, struct ubsec_q *q) if (crp->crp_flags & CRYPTO_F_IMBUF) m_copyback((struct mbuf *)crp->crp_buf, crd->crd_inject, 12, - (caddr_t)dmap->d_dma->d_macbuf); + (void *)dmap->d_dma->d_macbuf); else if (crp->crp_flags & CRYPTO_F_IOV && crp->crp_mac) - bcopy((caddr_t)dmap->d_dma->d_macbuf, + bcopy((void *)dmap->d_dma->d_macbuf, crp->crp_mac, 12); break; } @@ -1557,7 +1557,7 @@ static void ubsec_mcopy(struct mbuf *srcm, struct mbuf *dstm, int hoffset, int toffset) { int i, j, dlen, slen; - caddr_t dptr, sptr; + char *dptr, *sptr; j = 0; sptr = srcm->m_data; diff --git a/sys/dev/pci/ubsecvar.h b/sys/dev/pci/ubsecvar.h index 994aec51280..b47a1e4bd37 100644 --- a/sys/dev/pci/ubsecvar.h +++ b/sys/dev/pci/ubsecvar.h @@ -1,4 +1,4 @@ -/* $NetBSD: ubsecvar.h,v 1.2 2005/12/11 12:22:51 christos Exp $ */ +/* $NetBSD: ubsecvar.h,v 1.3 2007/03/04 06:02:26 christos Exp $ */ /* $OpenBSD: ubsecvar.h,v 1.36 2003/06/04 16:02:41 jason Exp $ */ /* @@ -53,7 +53,7 @@ struct ubsec_dma_alloc { u_int32_t dma_paddr; - caddr_t dma_vaddr; + void * dma_vaddr; bus_dmamap_t dma_map; bus_dma_segment_t dma_seg; bus_size_t dma_size; diff --git a/sys/dev/pci/unichromefb.c b/sys/dev/pci/unichromefb.c index 269493d1679..8a2d8be16b1 100644 --- a/sys/dev/pci/unichromefb.c +++ b/sys/dev/pci/unichromefb.c @@ -1,4 +1,4 @@ -/* $NetBSD: unichromefb.c,v 1.5 2007/01/12 04:20:33 ober Exp $ */ +/* $NetBSD: unichromefb.c,v 1.6 2007/03/04 06:02:26 christos Exp $ */ /*- * Copyright (c) 2006 Jared D. McNeill <jmcneill@invisible.ca> @@ -57,7 +57,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: unichromefb.c,v 1.5 2007/01/12 04:20:33 ober Exp $"); +__KERNEL_RCSID(0, "$NetBSD: unichromefb.c,v 1.6 2007/03/04 06:02:26 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -131,7 +131,7 @@ struct wsscreen_descr unichromefb_stdscreen = { WSSCREEN_WSCOLORS, NULL, }; -static int unichromefb_ioctl(void *, void *, u_long, caddr_t, int, +static int unichromefb_ioctl(void *, void *, u_long, void *, int, struct lwp *); static paddr_t unichromefb_mmap(void *, void *, off_t, int); @@ -294,7 +294,7 @@ unichromefb_attach(struct device *parent, struct device *self, void *opaque) sc->sc_fbaddr, sc->sc_fbsize); return; } - sc->sc_fbbase = (caddr_t)bus_space_vaddr(sc->sc_memt, ap_memh); + sc->sc_fbbase = (void *)bus_space_vaddr(sc->sc_memt, ap_memh); if (pci_mapreg_map(pa, 0x14, PCI_MAPREG_TYPE_MEM, 0, &sc->sc_memt, &sc->sc_memh, &mmiobase, &mmiosize)) { @@ -352,7 +352,7 @@ unichromefb_attach(struct device *parent, struct device *self, void *opaque) } static int -unichromefb_ioctl(void *v, void *vs, u_long cmd, caddr_t data, int flag, +unichromefb_ioctl(void *v, void *vs, u_long cmd, void *data, int flag, struct lwp *l) { struct vcons_data *vd; diff --git a/sys/dev/pci/vga_pci.c b/sys/dev/pci/vga_pci.c index 7c156caabf1..812f7902f53 100644 --- a/sys/dev/pci/vga_pci.c +++ b/sys/dev/pci/vga_pci.c @@ -1,4 +1,4 @@ -/* $NetBSD: vga_pci.c,v 1.30 2006/11/16 01:33:10 christos Exp $ */ +/* $NetBSD: vga_pci.c,v 1.31 2007/03/04 06:02:26 christos Exp $ */ /* * Copyright (c) 1995, 1996 Carnegie-Mellon University. @@ -28,7 +28,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: vga_pci.c,v 1.30 2006/11/16 01:33:10 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: vga_pci.c,v 1.31 2007/03/04 06:02:26 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -78,7 +78,7 @@ static int vga_pci_lookup_quirks(struct pci_attach_args *); CFATTACH_DECL(vga_pci, sizeof(struct vga_pci_softc), vga_pci_match, vga_pci_attach, NULL, NULL); -static int vga_pci_ioctl(void *, u_long, caddr_t, int, struct lwp *); +static int vga_pci_ioctl(void *, u_long, void *, int, struct lwp *); static paddr_t vga_pci_mmap(void *, off_t, int); static const struct vga_funcs vga_pci_funcs = { @@ -226,7 +226,7 @@ vga_pci_cnattach(bus_space_tag_t iot, bus_space_tag_t memt, } static int -vga_pci_ioctl(void *v, u_long cmd, caddr_t data, int flag, struct lwp *l) +vga_pci_ioctl(void *v, u_long cmd, void *data, int flag, struct lwp *l) { struct vga_config *vc = v; struct vga_pci_softc *psc = (void *) vc->softc; diff --git a/sys/dev/pci/voodoofb.c b/sys/dev/pci/voodoofb.c index 7a99d06fb1e..c3e296f28da 100644 --- a/sys/dev/pci/voodoofb.c +++ b/sys/dev/pci/voodoofb.c @@ -1,4 +1,4 @@ -/* $NetBSD: voodoofb.c,v 1.7 2007/01/20 21:42:12 he Exp $ */ +/* $NetBSD: voodoofb.c,v 1.8 2007/03/04 06:02:26 christos Exp $ */ /* * Copyright (c) 2005, 2006 Michael Lorenz @@ -34,7 +34,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: voodoofb.c,v 1.7 2007/01/20 21:42:12 he Exp $"); +__KERNEL_RCSID(0, "$NetBSD: voodoofb.c,v 1.8 2007/03/04 06:02:26 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -185,7 +185,7 @@ struct wsscreen_list voodoofb_screenlist = { sizeof(_voodoofb_scrlist) / sizeof(struct wsscreen_descr *), _voodoofb_scrlist }; -static int voodoofb_ioctl(void *, void *, u_long, caddr_t, int, +static int voodoofb_ioctl(void *, void *, u_long, void *, int, struct lwp *); static paddr_t voodoofb_mmap(void *, void *, off_t, int); @@ -856,7 +856,7 @@ voodoofb_allocattr(void *cookie, int fg, int bg, int flags, long *attrp) */ static int -voodoofb_ioctl(void *v, void *vs, u_long cmd, caddr_t data, int flag, +voodoofb_ioctl(void *v, void *vs, u_long cmd, void *data, int flag, struct lwp *l) { struct vcons_data *vd = v; diff --git a/sys/dev/pci/ydsvar.h b/sys/dev/pci/ydsvar.h index c7582d5606f..11faa9b95dc 100644 --- a/sys/dev/pci/ydsvar.h +++ b/sys/dev/pci/ydsvar.h @@ -1,4 +1,4 @@ -/* $NetBSD: ydsvar.h,v 1.7 2006/06/19 13:55:41 jmcneill Exp $ */ +/* $NetBSD: ydsvar.h,v 1.8 2007/03/04 06:02:27 christos Exp $ */ /* * Copyright (c) 2000, 2001 Kazuki Sakamoto and Minoura Makoto. @@ -37,7 +37,7 @@ */ struct yds_dma { bus_dmamap_t map; - caddr_t addr; /* VA */ + void *addr; /* VA */ bus_dma_segment_t segs[1]; int nsegs; size_t size; diff --git a/sys/dev/pckbport/pckbd.c b/sys/dev/pckbport/pckbd.c index 00b5bce44c0..2aeff64ff99 100644 --- a/sys/dev/pckbport/pckbd.c +++ b/sys/dev/pckbport/pckbd.c @@ -1,4 +1,4 @@ -/* $NetBSD: pckbd.c,v 1.14 2006/11/16 01:33:20 christos Exp $ */ +/* $NetBSD: pckbd.c,v 1.15 2007/03/04 06:02:27 christos Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -75,7 +75,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: pckbd.c,v 1.14 2006/11/16 01:33:20 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pckbd.c,v 1.15 2007/03/04 06:02:27 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -141,7 +141,7 @@ CFATTACH_DECL(pckbd, sizeof(struct pckbd_softc), int pckbd_enable(void *, int); void pckbd_set_leds(void *, int); -int pckbd_ioctl(void *, u_long, caddr_t, int, struct lwp *); +int pckbd_ioctl(void *, u_long, void *, int, struct lwp *); const struct wskbd_accessops pckbd_accessops = { pckbd_enable, @@ -596,7 +596,7 @@ pckbd_input(void *vsc, int data) } int -pckbd_ioctl(void *v, u_long cmd, caddr_t data, int flag, +pckbd_ioctl(void *v, u_long cmd, void *data, int flag, struct lwp *l) { struct pckbd_softc *sc = v; diff --git a/sys/dev/pckbport/pms.c b/sys/dev/pckbport/pms.c index f148d25233b..cca7c134548 100644 --- a/sys/dev/pckbport/pms.c +++ b/sys/dev/pckbport/pms.c @@ -1,4 +1,4 @@ -/* $NetBSD: pms.c,v 1.16 2006/11/16 01:33:20 christos Exp $ */ +/* $NetBSD: pms.c,v 1.17 2007/03/04 06:02:27 christos Exp $ */ /*- * Copyright (c) 2004 Kentaro Kurahone. @@ -28,7 +28,7 @@ #include "opt_pms.h" #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: pms.c,v 1.16 2006/11/16 01:33:20 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pms.c,v 1.17 2007/03/04 06:02:27 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -84,7 +84,7 @@ static void do_disable(struct pms_softc *); static void pms_reset_thread(void*); static void pms_spawn_reset_thread(void*); int pms_enable(void *); -int pms_ioctl(void *, u_long, caddr_t, int, struct lwp *); +int pms_ioctl(void *, u_long, void *, int, struct lwp *); void pms_disable(void *); #ifndef PMS_DISABLE_POWERHOOK void pms_power(int, void *); @@ -372,7 +372,7 @@ pms_power(int why, void *v) #endif /* !PMS_DISABLE_POWERHOOK */ int -pms_ioctl(void *v, u_long cmd, caddr_t data, int flag, +pms_ioctl(void *v, u_long cmd, void *data, int flag, struct lwp *l) { struct pms_softc *sc = v; diff --git a/sys/dev/pcmcia/esp_pcmcia.c b/sys/dev/pcmcia/esp_pcmcia.c index 2fa1e07d190..8e6eadbfd18 100644 --- a/sys/dev/pcmcia/esp_pcmcia.c +++ b/sys/dev/pcmcia/esp_pcmcia.c @@ -1,4 +1,4 @@ -/* $NetBSD: esp_pcmcia.c,v 1.30 2006/12/28 16:37:46 itohy Exp $ */ +/* $NetBSD: esp_pcmcia.c,v 1.31 2007/03/04 06:02:27 christos Exp $ */ /*- * Copyright (c) 2000, 2004 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: esp_pcmcia.c,v 1.30 2006/12/28 16:37:46 itohy Exp $"); +__KERNEL_RCSID(0, "$NetBSD: esp_pcmcia.c,v 1.31 2007/03/04 06:02:27 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -103,7 +103,7 @@ void esp_pcmcia_write_reg(struct ncr53c9x_softc *, int, u_char); int esp_pcmcia_dma_isintr(struct ncr53c9x_softc *); void esp_pcmcia_dma_reset(struct ncr53c9x_softc *); int esp_pcmcia_dma_intr(struct ncr53c9x_softc *); -int esp_pcmcia_dma_setup(struct ncr53c9x_softc *, caddr_t *, +int esp_pcmcia_dma_setup(struct ncr53c9x_softc *, void **, size_t *, int, size_t *); void esp_pcmcia_dma_go(struct ncr53c9x_softc *); void esp_pcmcia_dma_stop(struct ncr53c9x_softc *); @@ -412,14 +412,14 @@ esp_pcmcia_dma_intr(sc) int esp_pcmcia_dma_setup(sc, addr, len, datain, dmasize) struct ncr53c9x_softc *sc; - caddr_t *addr; + void **addr; size_t *len; int datain; size_t *dmasize; { struct esp_pcmcia_softc *esc = (struct esp_pcmcia_softc *)sc; - esc->sc_dmaaddr = addr; + esc->sc_dmaaddr = (void *)addr; esc->sc_pdmalen = len; esc->sc_datain = datain; esc->sc_dmasize = *dmasize; diff --git a/sys/dev/pcmcia/if_cnw.c b/sys/dev/pcmcia/if_cnw.c index 7e333865fa7..0b0a5c9d69a 100644 --- a/sys/dev/pcmcia/if_cnw.c +++ b/sys/dev/pcmcia/if_cnw.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_cnw.c,v 1.40 2007/01/05 16:46:27 elad Exp $ */ +/* $NetBSD: if_cnw.c,v 1.41 2007/03/04 06:02:27 christos Exp $ */ /*- * Copyright (c) 1998, 2004 The NetBSD Foundation, Inc. @@ -112,7 +112,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_cnw.c,v 1.40 2007/01/05 16:46:27 elad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_cnw.c,v 1.41 2007/03/04 06:02:27 christos Exp $"); #include "opt_inet.h" #include "bpfilter.h" @@ -235,7 +235,7 @@ void cnw_transmit(struct cnw_softc *, struct mbuf *); struct mbuf *cnw_read(struct cnw_softc *); void cnw_recv(struct cnw_softc *); int cnw_intr(void *arg); -int cnw_ioctl(struct ifnet *, u_long, caddr_t); +int cnw_ioctl(struct ifnet *, u_long, void *); void cnw_watchdog(struct ifnet *); static int cnw_setdomain(struct cnw_softc *, int); static int cnw_setkey(struct cnw_softc *, int); @@ -1026,7 +1026,7 @@ int cnw_ioctl(ifp, cmd, data) struct ifnet *ifp; u_long cmd; - caddr_t data; + void *data; { struct cnw_softc *sc = ifp->if_softc; struct ifaddr *ifa = (struct ifaddr *)data; diff --git a/sys/dev/pcmcia/if_ray.c b/sys/dev/pcmcia/if_ray.c index d3c4b6b5c5c..1e8b78e18b1 100644 --- a/sys/dev/pcmcia/if_ray.c +++ b/sys/dev/pcmcia/if_ray.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_ray.c,v 1.63 2006/11/16 01:33:20 christos Exp $ */ +/* $NetBSD: if_ray.c,v 1.64 2007/03/04 06:02:27 christos Exp $ */ /* * Copyright (c) 2000 Christian E. Hopps @@ -57,7 +57,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_ray.c,v 1.63 2006/11/16 01:33:20 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_ray.c,v 1.64 2007/03/04 06:02:27 christos Exp $"); #include "opt_inet.h" #include "bpfilter.h" @@ -305,7 +305,7 @@ static void ray_if_start(struct ifnet *); static int ray_init(struct ray_softc *); static int ray_intr(void *); static void ray_intr_start(struct ray_softc *); -static int ray_ioctl(struct ifnet *, u_long, caddr_t); +static int ray_ioctl(struct ifnet *, u_long, void *); static int ray_issue_cmd(struct ray_softc *, bus_size_t, u_int); static int ray_match(struct device *, struct cfdata *, void *); static int ray_media_change(struct ifnet *); @@ -918,7 +918,7 @@ static int ray_ioctl(ifp, cmd, data) struct ifnet *ifp; u_long cmd; - caddr_t data; + void *data; { struct ieee80211_nwid nwid; struct ray_param_req pr; @@ -1363,7 +1363,7 @@ ray_recv(sc, ccs) #ifdef RAY_DEBUG /* have a look if you want to see how the card rx works :) */ if (ray_debug && ray_debug_dump_desc) - hexdump((caddr_t)sc->sc_memh + RAY_RCS_BASE, 0x400, + hexdump((char *)sc->sc_memh + RAY_RCS_BASE, 0x400, 16, 4, 0); #endif @@ -1573,14 +1573,14 @@ done: */ if (issnap) { /* create an ether_header over top of the 802.11+SNAP header */ - eh = (struct ether_header *)((caddr_t)(frame + 1) - 6); + eh = (struct ether_header *)((char *)(frame + 1) - 6); memcpy(eh->ether_shost, src, ETHER_ADDR_LEN); memcpy(eh->ether_dhost, frame->i_addr1, ETHER_ADDR_LEN); } else { /* this is the weird e2 in 802.11 encapsulation */ eh = (struct ether_header *)(frame + 1); } - m_adj(m, (caddr_t)eh - (caddr_t)frame); + m_adj(m, (char *)eh - (char *)frame); #if NBPFILTER > 0 if (ifp->if_bpf) bpf_mtap(ifp->if_bpf, m); diff --git a/sys/dev/pcmcia/if_xi.c b/sys/dev/pcmcia/if_xi.c index 6895ddb524e..bcce6a54f42 100644 --- a/sys/dev/pcmcia/if_xi.c +++ b/sys/dev/pcmcia/if_xi.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_xi.c,v 1.59 2006/11/16 01:33:20 christos Exp $ */ +/* $NetBSD: if_xi.c,v 1.60 2007/03/04 06:02:28 christos Exp $ */ /* OpenBSD: if_xe.c,v 1.9 1999/09/16 11:28:42 niklas Exp */ /* @@ -55,7 +55,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_xi.c,v 1.59 2006/11/16 01:33:20 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_xi.c,v 1.60 2007/03/04 06:02:28 christos Exp $"); #include "opt_inet.h" #include "opt_ipx.h" @@ -145,10 +145,10 @@ int xidebug = 0; STATIC int xi_enable(struct xi_softc *); STATIC void xi_disable(struct xi_softc *); STATIC void xi_cycle_power(struct xi_softc *); -STATIC int xi_ether_ioctl(struct ifnet *, u_long cmd, caddr_t); +STATIC int xi_ether_ioctl(struct ifnet *, u_long cmd, void *); STATIC void xi_full_reset(struct xi_softc *); STATIC void xi_init(struct xi_softc *); -STATIC int xi_ioctl(struct ifnet *, u_long, caddr_t); +STATIC int xi_ioctl(struct ifnet *, u_long, void *); STATIC int xi_mdi_read(struct device *, int, int); STATIC void xi_mdi_write(struct device *, int, int, int); STATIC int xi_mediachange(struct ifnet *); @@ -485,7 +485,7 @@ xi_get(sc) len = MCLBYTES; } if (top == NULL) { - caddr_t newdata = (caddr_t)ALIGN(m->m_data + + char *newdata = (char *)ALIGN(m->m_data + sizeof(struct ether_header)) - sizeof(struct ether_header); len -= newdata - m->m_data; @@ -924,7 +924,7 @@ STATIC int xi_ether_ioctl(ifp, cmd, data) struct ifnet *ifp; u_long cmd; - caddr_t data; + void *data; { struct ifaddr *ifa = (struct ifaddr *)data; struct xi_softc *sc = ifp->if_softc; @@ -965,7 +965,7 @@ STATIC int xi_ioctl(ifp, cmd, data) struct ifnet *ifp; u_long cmd; - caddr_t data; + void *data; { struct xi_softc *sc = ifp->if_softc; struct ifreq *ifr = (struct ifreq *)data; diff --git a/sys/dev/pcmcia/isic_pcmcia_avm_fritz.c b/sys/dev/pcmcia/isic_pcmcia_avm_fritz.c index e358a277bcb..f417dfd84c7 100644 --- a/sys/dev/pcmcia/isic_pcmcia_avm_fritz.c +++ b/sys/dev/pcmcia/isic_pcmcia_avm_fritz.c @@ -33,7 +33,7 @@ * Fritz!Card pcmcia specific routines for isic driver * --------------------------------------------------- * - * $Id: isic_pcmcia_avm_fritz.c,v 1.10 2005/12/11 12:23:23 christos Exp $ + * $Id: isic_pcmcia_avm_fritz.c,v 1.11 2007/03/04 06:02:28 christos Exp $ * * last edit-date: [Fri Jan 5 11:39:32 2001] * @@ -43,7 +43,7 @@ *---------------------------------------------------------------------------*/ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: isic_pcmcia_avm_fritz.c,v 1.10 2005/12/11 12:23:23 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: isic_pcmcia_avm_fritz.c,v 1.11 2007/03/04 06:02:28 christos Exp $"); #include "opt_isicpcmcia.h" #ifdef ISICPCMCIA_AVM_A1 @@ -347,10 +347,10 @@ isic_probe_avma1_pcmcia(struct isa_device *dev) */ PCMCIA_IO_BASE = dev->id_iobase; - ISAC_BASE = (caddr_t)0x20; + ISAC_BASE = (void *)0x20; - HSCX_A_BASE = (caddr_t)0xA0; - HSCX_B_BASE = (caddr_t)0xE0; + HSCX_A_BASE = (void *)0xA0; + HSCX_B_BASE = (void *)0xE0; /* * Read HSCX A/B VSTR. diff --git a/sys/dev/podulebus/sec.c b/sys/dev/podulebus/sec.c index 5a71c565c87..b3ca89cbd11 100644 --- a/sys/dev/podulebus/sec.c +++ b/sys/dev/podulebus/sec.c @@ -1,4 +1,4 @@ -/* $NetBSD: sec.c,v 1.5 2007/02/21 23:00:01 thorpej Exp $ */ +/* $NetBSD: sec.c,v 1.6 2007/03/04 06:02:28 christos Exp $ */ /*- * Copyright (c) 2000, 2001, 2006 Ben Harris @@ -38,7 +38,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: sec.c,v 1.5 2007/02/21 23:00:01 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sec.c,v 1.6 2007/03/04 06:02:28 christos Exp $"); #include <sys/param.h> @@ -78,7 +78,7 @@ struct sec_softc { /* Details of the current DMA transfer */ bool sc_dmaactive; - caddr_t sc_dmaaddr; + void * sc_dmaaddr; int sc_dmaoff; size_t sc_dmalen; bool sc_dmain; @@ -98,7 +98,7 @@ static void sec_attach(struct device *, struct device *, void *); static void sec_shutdown(void *); /* callbacks from MI WD33C93 driver */ -static int sec_dmasetup(struct wd33c93_softc *, caddr_t *, size_t *, int, +static int sec_dmasetup(struct wd33c93_softc *, void **, size_t *, int, size_t *); static int sec_dmago(struct wd33c93_softc *); static void sec_dmastop(struct wd33c93_softc *); @@ -379,7 +379,7 @@ sec_copyinblk(struct sec_softc *sc, int blk) } static int -sec_dmasetup(struct wd33c93_softc *sc_sbic, caddr_t *addr, size_t *len, +sec_dmasetup(struct wd33c93_softc *sc_sbic, void **addr, size_t *len, int datain, size_t *dmasize) { struct sec_softc *sc = (struct sec_softc *)sc_sbic; diff --git a/sys/dev/ppbus/if_plip.c b/sys/dev/ppbus/if_plip.c index a04638299b2..bb87d52dde8 100644 --- a/sys/dev/ppbus/if_plip.c +++ b/sys/dev/ppbus/if_plip.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_plip.c,v 1.11 2006/03/29 17:23:56 thorpej Exp $ */ +/* $NetBSD: if_plip.c,v 1.12 2007/03/04 06:02:28 christos Exp $ */ /*- * Copyright (c) 1997 Poul-Henning Kamp @@ -31,7 +31,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_plip.c,v 1.11 2006/03/29 17:23:56 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_plip.c,v 1.12 2007/03/04 06:02:28 christos Exp $"); /* * Parallel port TCP/IP interfaces added. I looked at the driver from @@ -195,7 +195,7 @@ CFATTACH_DECL(plip, sizeof(struct lp_softc), lp_probe, lp_attach, lp_detach, /* Functions for the lp interface */ static void lpinittables(void); static void lpfreetables(void); -static int lpioctl(struct ifnet *, u_long, caddr_t); +static int lpioctl(struct ifnet *, u_long, void *); static int lpoutput(struct ifnet *, struct mbuf *, struct sockaddr *, struct rtentry *); static void lpstart(struct ifnet *); @@ -203,7 +203,7 @@ static void lp_intr(void *); static int -lp_probe(struct device * parent, struct cfdata * match, void * aux) +lp_probe(struct device * parent, struct cfdata * match, void *aux) { struct ppbus_attach_args * args = aux; @@ -217,7 +217,7 @@ lp_probe(struct device * parent, struct cfdata * match, void * aux) } static void -lp_attach(struct device * parent, struct device * self, void * aux) +lp_attach(struct device * parent, struct device * self, void *aux) { struct lp_softc * lp = device_private(self); struct ifnet * ifp = &lp->sc_if; @@ -345,7 +345,7 @@ lpfreetables (void) /* Process an ioctl request. */ static int -lpioctl (struct ifnet *ifp, u_long cmd, caddr_t data) +lpioctl (struct ifnet *ifp, u_long cmd, void *data) { struct device * dev = ifp->if_softc; struct device * ppbus = device_parent(dev); diff --git a/sys/dev/ppbus/lpt.c b/sys/dev/ppbus/lpt.c index d5535d53067..00df6045a60 100644 --- a/sys/dev/ppbus/lpt.c +++ b/sys/dev/ppbus/lpt.c @@ -1,4 +1,4 @@ -/* $NetBSD: lpt.c,v 1.18 2006/10/24 19:16:50 drochner Exp $ */ +/* $NetBSD: lpt.c,v 1.19 2007/03/04 06:02:28 christos Exp $ */ /* * Copyright (c) 1990 William F. Jolitz, TeleMuse @@ -64,7 +64,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: lpt.c,v 1.18 2006/10/24 19:16:50 drochner Exp $"); +__KERNEL_RCSID(0, "$NetBSD: lpt.c,v 1.19 2007/03/04 06:02:28 christos Exp $"); #include "opt_ppbus_lpt.h" @@ -125,14 +125,14 @@ static int lpt_logstatus(const struct device * const, const unsigned char); * lpt_probe() */ static int -lpt_probe(struct device * parent, struct cfdata * match, void * aux) +lpt_probe(struct device * parent, struct cfdata * match, void *aux) { /* Test ppbus's capability */ return lpt_detect(parent); } static void -lpt_attach(struct device * parent, struct device * self, void * aux) +lpt_attach(struct device * parent, struct device * self, void *aux) { struct lpt_softc * sc = device_private(self); struct ppbus_device_softc * ppbdev = &(sc->ppbus_dev); @@ -457,7 +457,7 @@ lptopen(dev_t dev_id, int flags, int fmt, struct lwp *l) break; /* wait LPT_STEP ticks, give up if we get a signal */ else { - err = tsleep((caddr_t)lpt, LPPRI|PCATCH, + err = tsleep((void *)lpt, LPPRI|PCATCH, "lptinit", LPT_STEP); if((err) && (err != EWOULDBLOCK)) { lpt->sc_state &= ~LPTINIT; @@ -608,7 +608,7 @@ lptwrite(dev_t dev_id, struct uio * uio, int ioflag) /* Printer ioctl */ int -lptioctl(dev_t dev_id, u_long cmd, caddr_t data, int flags, struct lwp *l) +lptioctl(dev_t dev_id, u_long cmd, void *data, int flags, struct lwp *l) { struct device *dev = device_lookup(&lpt_cd, LPTUNIT(dev_id)); struct lpt_softc *sc = (struct lpt_softc *) dev; diff --git a/sys/dev/ppbus/ppbus_base.c b/sys/dev/ppbus/ppbus_base.c index 66cfe24b5a6..b7fa778d555 100644 --- a/sys/dev/ppbus/ppbus_base.c +++ b/sys/dev/ppbus/ppbus_base.c @@ -1,4 +1,4 @@ -/* $NetBSD: ppbus_base.c,v 1.12 2006/03/25 03:44:35 thorpej Exp $ */ +/* $NetBSD: ppbus_base.c,v 1.13 2007/03/04 06:02:28 christos Exp $ */ /*- * Copyright (c) 1997, 1998, 1999 Nicolas Souchu @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ppbus_base.c,v 1.12 2006/03/25 03:44:35 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ppbus_base.c,v 1.13 2007/03/04 06:02:28 christos Exp $"); #include "opt_ppbus_1284.h" #include "opt_ppbus.h" @@ -144,13 +144,13 @@ ppbus_poll_bus(struct device * dev, int maxp, char mask, char status, switch (how) { case PPBUS_NOINTR: /* wait 10 ms */ - tsleep((caddr_t)dev, PPBUSPRI, "ppbuspoll", hz/100); + tsleep((void *)dev, PPBUSPRI, "ppbuspoll", hz/100); break; case PPBUS_INTR: default: /* wait 10 ms */ - if (((error = tsleep((caddr_t)dev, PPBUSPRI | PCATCH, + if (((error = tsleep((void *)dev, PPBUSPRI | PCATCH, "ppbuspoll", hz/100)) != EWOULDBLOCK) != 0) { return (error); } @@ -286,7 +286,7 @@ ppbus_ecp_sync(struct device * dev) /* Allocate DMA for use with ppbus */ int -ppbus_dma_malloc(struct device * dev, caddr_t * buf, bus_addr_t * addr, +ppbus_dma_malloc(struct device * dev, void ** buf, bus_addr_t * addr, bus_size_t size) { struct ppbus_softc * ppbus = (struct ppbus_softc *) dev; @@ -300,7 +300,7 @@ ppbus_dma_malloc(struct device * dev, caddr_t * buf, bus_addr_t * addr, /* Free memory allocated with ppbus_dma_malloc() */ int -ppbus_dma_free(struct device * dev, caddr_t * buf, bus_addr_t * addr, +ppbus_dma_free(struct device * dev, void ** buf, bus_addr_t * addr, bus_size_t size) { struct ppbus_softc * ppbus = (struct ppbus_softc *) dev; @@ -315,7 +315,7 @@ ppbus_dma_free(struct device * dev, caddr_t * buf, bus_addr_t * addr, } /* Install a handler to be called by hardware interrupt handler */ -int ppbus_add_handler(struct device * dev, void (*func)(void *), void * arg) +int ppbus_add_handler(struct device * dev, void (*func)(void *), void *arg) { struct ppbus_softc * bus = (struct ppbus_softc *) dev; diff --git a/sys/dev/ppbus/ppbus_base.h b/sys/dev/ppbus/ppbus_base.h index 0330b1f178d..083125b43c4 100644 --- a/sys/dev/ppbus/ppbus_base.h +++ b/sys/dev/ppbus/ppbus_base.h @@ -1,4 +1,4 @@ -/* $NetBSD: ppbus_base.h,v 1.5 2005/12/11 12:23:28 christos Exp $ */ +/* $NetBSD: ppbus_base.h,v 1.6 2007/03/04 06:02:28 christos Exp $ */ /* * Copyright (c) 1997, 1998, 1999 Nicolas Souchu @@ -154,8 +154,8 @@ int ppbus_write(struct device *, char *, int, int, size_t *); int ppbus_read(struct device *, char *, int, int, size_t *); int ppbus_exec_microseq(struct device *, struct ppbus_microseq * *); int ppbus_io(struct device *, int, u_char *, int, u_char); -int ppbus_dma_malloc(struct device *, caddr_t *, bus_addr_t *, bus_size_t); -int ppbus_dma_free(struct device *, caddr_t *, bus_addr_t *, bus_size_t); +int ppbus_dma_malloc(struct device *, void **, bus_addr_t *, bus_size_t); +int ppbus_dma_free(struct device *, void **, bus_addr_t *, bus_size_t); int ppbus_add_handler(struct device *, void (*)(void *), void *); int ppbus_remove_handler(struct device *, void (*)(void *)); diff --git a/sys/dev/ppbus/ppbus_conf.h b/sys/dev/ppbus/ppbus_conf.h index 9c185968553..ae6de7c205c 100644 --- a/sys/dev/ppbus/ppbus_conf.h +++ b/sys/dev/ppbus/ppbus_conf.h @@ -1,4 +1,4 @@ -/* $NetBSD: ppbus_conf.h,v 1.6 2005/12/11 12:23:28 christos Exp $ */ +/* $NetBSD: ppbus_conf.h,v 1.7 2007/03/04 06:02:28 christos Exp $ */ /*- * Copyright (c) 1997, 1998, 1999 Nicolas Souchu @@ -53,9 +53,9 @@ typedef int (*PARPORT_READ_T)(struct device *, char *, int, int, size_t *); typedef int (*PARPORT_WRITE_T)(struct device *, char *, int, int, size_t *); typedef int (*PARPORT_READ_IVAR_T)(struct device *, int, unsigned int *); typedef int (*PARPORT_WRITE_IVAR_T)(struct device *, int, unsigned int *); -typedef int (*PARPORT_DMA_MALLOC_T)(struct device *, caddr_t *, bus_addr_t *, +typedef int (*PARPORT_DMA_MALLOC_T)(struct device *, void **, bus_addr_t *, bus_size_t); -typedef void (*PARPORT_DMA_FREE_T)(struct device *, caddr_t *, bus_addr_t *, +typedef void (*PARPORT_DMA_FREE_T)(struct device *, void **, bus_addr_t *, bus_size_t); typedef int (*PARPORT_ADD_HANDLER_T)(struct device *, void (*)(void *), void *); diff --git a/sys/dev/ppbus/pps_ppbus.c b/sys/dev/ppbus/pps_ppbus.c index 2ca917c7483..e19124d9ae0 100644 --- a/sys/dev/ppbus/pps_ppbus.c +++ b/sys/dev/ppbus/pps_ppbus.c @@ -1,4 +1,4 @@ -/* $NetBSD: pps_ppbus.c,v 1.8 2006/10/24 19:16:50 drochner Exp $ */ +/* $NetBSD: pps_ppbus.c,v 1.9 2007/03/04 06:02:28 christos Exp $ */ /* * ported to timecounters by Frank Kardel 2006 @@ -29,7 +29,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: pps_ppbus.c,v 1.8 2006/10/24 19:16:50 drochner Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pps_ppbus.c,v 1.9 2007/03/04 06:02:28 christos Exp $"); #include "opt_ntp.h" @@ -209,7 +209,7 @@ ppsintr(void *arg) } static int -ppsioctl(dev_t dev, u_long cmd, caddr_t data, int flags, struct lwp *l) +ppsioctl(dev_t dev, u_long cmd, void *data, int flags, struct lwp *l) { struct pps_softc *sc = device_lookup(&pps_cd, minor(dev)); int error = 0; diff --git a/sys/dev/qbus/dhu.c b/sys/dev/qbus/dhu.c index c4e50b03817..41b2a0a9698 100644 --- a/sys/dev/qbus/dhu.c +++ b/sys/dev/qbus/dhu.c @@ -1,4 +1,4 @@ -/* $NetBSD: dhu.c,v 1.46 2006/10/01 19:28:44 elad Exp $ */ +/* $NetBSD: dhu.c,v 1.47 2007/03/04 06:02:29 christos Exp $ */ /* * Copyright (c) 2003, Hugh Graham. * Copyright (c) 1992, 1993 @@ -68,7 +68,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: dhu.c,v 1.46 2006/10/01 19:28:44 elad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dhu.c,v 1.47 2007/03/04 06:02:29 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -358,7 +358,7 @@ dhurint(arg) } if (!(tp->t_state & TS_ISOPEN)) { - wakeup((caddr_t)&tp->t_rawq); + wakeup((void *)&tp->t_rawq); continue; } @@ -479,7 +479,7 @@ dhuopen(dev, flag, mode, l) while (!(flag & O_NONBLOCK) && !(tp->t_cflag & CLOCAL) && !(tp->t_state & TS_CARR_ON)) { tp->t_wopen++; - error = ttysleep(tp, (caddr_t)&tp->t_rawq, + error = ttysleep(tp, (void *)&tp->t_rawq, TTIPRI | PCATCH, ttopen, 0); tp->t_wopen--; if (error) @@ -574,7 +574,7 @@ int dhuioctl(dev, cmd, data, flag, l) dev_t dev; u_long cmd; - caddr_t data; + void *data; int flag; struct lwp *l; { @@ -693,7 +693,7 @@ dhustart(tp) if (tp->t_outq.c_cc <= tp->t_lowat) { if (tp->t_state & TS_ASLEEP) { tp->t_state &= ~TS_ASLEEP; - wakeup((caddr_t)&tp->t_outq); + wakeup((void *)&tp->t_outq); } selwakeup(&tp->t_wsel); } diff --git a/sys/dev/qbus/dl.c b/sys/dev/qbus/dl.c index b24926d8e28..11031875dd3 100644 --- a/sys/dev/qbus/dl.c +++ b/sys/dev/qbus/dl.c @@ -1,4 +1,4 @@ -/* $NetBSD: dl.c,v 1.36 2006/10/01 19:28:44 elad Exp $ */ +/* $NetBSD: dl.c,v 1.37 2007/03/04 06:02:29 christos Exp $ */ /*- * Copyright (c) 1996, 1997 The NetBSD Foundation, Inc. @@ -111,7 +111,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: dl.c,v 1.36 2006/10/01 19:28:44 elad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dl.c,v 1.37 2007/03/04 06:02:29 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -283,7 +283,7 @@ dlrint(void *arg) cc = c & 0xFF; if (!(tp->t_state & TS_ISOPEN)) { - wakeup((caddr_t)&tp->t_rawq); + wakeup((void *)&tp->t_rawq); return; } @@ -406,7 +406,7 @@ dlpoll(dev_t dev, int events, struct lwp *l) } int -dlioctl(dev_t dev, unsigned long cmd, caddr_t data, int flag, struct lwp *l) +dlioctl(dev_t dev, unsigned long cmd, void *data, int flag, struct lwp *l) { struct dl_softc *sc = dl_cd.cd_devs[minor(dev)]; struct tty *tp = sc->sc_tty; @@ -471,7 +471,7 @@ dlstart(struct tty *tp) if (tp->t_outq.c_cc <= tp->t_lowat) { if (tp->t_state & TS_ASLEEP) { tp->t_state &= ~TS_ASLEEP; - wakeup((caddr_t)&tp->t_outq); + wakeup((void *)&tp->t_outq); } selwakeup(&tp->t_wsel); } diff --git a/sys/dev/qbus/if_de.c b/sys/dev/qbus/if_de.c index 48f4f2df442..d602bd8d591 100644 --- a/sys/dev/qbus/if_de.c +++ b/sys/dev/qbus/if_de.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_de.c,v 1.20 2006/03/29 18:17:36 thorpej Exp $ */ +/* $NetBSD: if_de.c,v 1.21 2007/03/04 06:02:29 christos Exp $ */ /* * Copyright (c) 1982, 1986, 1989 Regents of the University of California. @@ -81,7 +81,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_de.c,v 1.20 2006/03/29 18:17:36 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_de.c,v 1.21 2007/03/04 06:02:29 christos Exp $"); #include "opt_inet.h" #include "bpfilter.h" @@ -178,7 +178,7 @@ static int dematch(struct device *, struct cfdata *, void *); static void deattach(struct device *, struct device *, void *); static void dewait(struct de_softc *, const char *); static int deinit(struct ifnet *); -static int deioctl(struct ifnet *, u_long, caddr_t); +static int deioctl(struct ifnet *, u_long, void *); static void dereset(struct device *); static void destop(struct ifnet *, int); static void destart(struct ifnet *); @@ -258,7 +258,7 @@ deattach(struct device *parent, struct device *self, void *aux) DE_WLOW(CMD_GETCMD); dewait(sc, "read addr "); - bcopy((caddr_t)&sc->sc_dedata->dc_pcbb.pcbb2, myaddr, sizeof (myaddr)); + bcopy((void *)&sc->sc_dedata->dc_pcbb.pcbb2, myaddr, sizeof (myaddr)); printf("\n%s: %s, hardware address %s\n", sc->sc_dev.dv_xname, c, ether_sprintf(myaddr)); @@ -583,7 +583,7 @@ next: rp->r_lenerr = 0; * Process an ioctl request. */ int -deioctl(struct ifnet *ifp, u_long cmd, caddr_t data) +deioctl(struct ifnet *ifp, u_long cmd, void *data) { int s, error = 0; diff --git a/sys/dev/qbus/if_dmc.c b/sys/dev/qbus/if_dmc.c index 0581613a447..1088ecf54fe 100644 --- a/sys/dev/qbus/if_dmc.c +++ b/sys/dev/qbus/if_dmc.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_dmc.c,v 1.13 2006/03/29 18:17:36 thorpej Exp $ */ +/* $NetBSD: if_dmc.c,v 1.14 2007/03/04 06:02:29 christos Exp $ */ /* * Copyright (c) 1982, 1986 Regents of the University of California. * All rights reserved. @@ -41,7 +41,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_dmc.c,v 1.13 2006/03/29 18:17:36 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_dmc.c,v 1.14 2007/03/04 06:02:29 christos Exp $"); #undef DMCDEBUG /* for base table dump on fatal error */ @@ -178,7 +178,7 @@ static void dmcrestart(struct dmc_softc *); static void dmcload(struct dmc_softc *, int, u_short, u_short); static void dmcstart(struct ifnet *); static void dmctimeout(struct ifnet *); -static int dmcioctl(struct ifnet *, u_long, caddr_t); +static int dmcioctl(struct ifnet *, u_long, void *); static int dmcoutput(struct ifnet *, struct mbuf *, struct sockaddr *, struct rtentry *); static void dmcreset(struct device *); @@ -327,7 +327,7 @@ dmcinit(struct ifnet *ifp) /* map base table */ if ((sc->sc_flag & DMC_BMAPPED) == 0) { sc->sc_ui.ui_size = sizeof(struct dmc_base); - sc->sc_ui.ui_vaddr = (caddr_t)&sc->dmc_base; + sc->sc_ui.ui_vaddr = (void *)&sc->dmc_base; uballoc((void *)device_parent(&sc->sc_dev), &sc->sc_ui, 0); sc->sc_flag |= DMC_BMAPPED; } @@ -836,7 +836,7 @@ bad: */ /* ARGSUSED */ int -dmcioctl(struct ifnet *ifp, u_long cmd, caddr_t data) +dmcioctl(struct ifnet *ifp, u_long cmd, void *data) { int s = splnet(), error = 0; register struct dmc_softc *sc = ifp->if_softc; diff --git a/sys/dev/qbus/if_il.c b/sys/dev/qbus/if_il.c index 4f0d1cc12a1..08834b9a929 100644 --- a/sys/dev/qbus/if_il.c +++ b/sys/dev/qbus/if_il.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_il.c,v 1.15 2006/09/07 02:40:33 dogcow Exp $ */ +/* $NetBSD: if_il.c,v 1.16 2007/03/04 06:02:29 christos Exp $ */ /* * Copyright (c) 1982, 1986 Regents of the University of California. * All rights reserved. @@ -35,7 +35,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_il.c,v 1.15 2006/09/07 02:40:33 dogcow Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_il.c,v 1.16 2007/03/04 06:02:29 christos Exp $"); #include "opt_inet.h" @@ -184,7 +184,7 @@ ilattach(struct device *parent, struct device *self, void *aux) IL_WCSR(IL_CSR, ILC_RESET); (void)ilwait(sc, "reset"); sc->sc_ui.ui_size = sizeof(struct il_stats); - sc->sc_ui.ui_vaddr = (caddr_t)&sc->sc_stats; + sc->sc_ui.ui_vaddr = (void *)&sc->sc_stats; if ((error = uballoc((struct uba_softc *)parent, &sc->sc_ui, 0))) return printf(": failed uballoc, error = %d\n", error); @@ -275,7 +275,7 @@ ilinit(struct ifnet *ifp) return 0; } sc->sc_ui.ui_size = sizeof(sc->sc_isu); - sc->sc_ui.ui_vaddr = (caddr_t)&sc->sc_isu; + sc->sc_ui.ui_vaddr = (void *)&sc->sc_isu; uballoc((void *)device_parent(&sc->sc_dev), &sc->sc_ui, 0); } sc->sc_scaninterval = ILWATCHINTERVAL; @@ -305,8 +305,8 @@ ilinit(struct ifnet *ifp) * wedge the board. */ if (sc->sc_flags & ILF_SETADDR) { - bcopy((caddr_t)LLADDR(ifp->if_sadl), - (caddr_t)&sc->sc_isu, ETHER_ADDR_LEN); + bcopy((void *)LLADDR(ifp->if_sadl), + (void *)&sc->sc_isu, ETHER_ADDR_LEN); IL_WCSR(IL_BAR, LOWORD(sc->sc_ui.ui_baddr)); IL_WCSR(IL_BCR, ETHER_ADDR_LEN); IL_WCSR(IL_CSR, ((sc->sc_ui.ui_baddr >> 2) & IL_EUA)|ILC_LDPA); @@ -317,8 +317,8 @@ ilinit(struct ifnet *ifp) IL_WCSR(IL_CSR, ((sc->sc_ui.ui_baddr >> 2) & IL_EUA)|ILC_STAT); if (ilwait(sc, "verifying setaddr")) return 0; - if (memcmp((caddr_t)sc->sc_stats.ils_addr, - (caddr_t)LLADDR(ifp->if_sadl), ETHER_ADDR_LEN) != 0) { + if (memcmp((void *)sc->sc_stats.ils_addr, + (void *)LLADDR(ifp->if_sadl), ETHER_ADDR_LEN) != 0) { printf("%s: setaddr didn't work\n", sc->sc_dev.dv_xname); return 0; @@ -593,7 +593,7 @@ iltotal(struct il_softc *sc) *sum++ += *interval++; sc->sc_if.if_collisions = sc->sc_sum.ils_collis; if ((sc->sc_flags & ILF_SETADDR) && - (memcmp((caddr_t)sc->sc_stats.ils_addr, LLADDR(ifp->if_sadl), + (memcmp((void *)sc->sc_stats.ils_addr, LLADDR(ifp->if_sadl), ETHER_ADDR_LEN) != 0)) { log(LOG_ERR, "%s: physaddr reverted\n", sc->sc_dev.dv_xname); sc->sc_flags &= ~ILF_RUNNING; @@ -611,7 +611,7 @@ il_setaddr(u_char *physaddr, struct il_softc *sc) if (! (sc->sc_flags & ILF_RUNNING)) return; - bcopy((caddr_t)physaddr, (caddr_t)is->is_addr, sizeof is->is_addr); + bcopy((void *)physaddr, (void *)is->is_addr, sizeof is->is_addr); sc->sc_flags &= ~ILF_RUNNING; sc->sc_flags |= ILF_SETADDR; ilinit(&sc->sc_if); diff --git a/sys/dev/qbus/if_qe.c b/sys/dev/qbus/if_qe.c index c9352717fc4..6c5ff73bd43 100644 --- a/sys/dev/qbus/if_qe.c +++ b/sys/dev/qbus/if_qe.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_qe.c,v 1.61 2006/03/29 18:17:36 thorpej Exp $ */ +/* $NetBSD: if_qe.c,v 1.62 2007/03/04 06:02:29 christos Exp $ */ /* * Copyright (c) 1999 Ludd, University of Lule}, Sweden. All rights reserved. * @@ -38,7 +38,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_qe.c,v 1.61 2006/03/29 18:17:36 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_qe.c,v 1.62 2007/03/04 06:02:29 christos Exp $"); #include "opt_inet.h" #include "bpfilter.h" @@ -110,7 +110,7 @@ static void qeattach(struct device *, struct device *, void *); static void qeinit(struct qe_softc *); static void qestart(struct ifnet *); static void qeintr(void *); -static int qeioctl(struct ifnet *, u_long, caddr_t); +static int qeioctl(struct ifnet *, u_long, void *); static int qe_add_rxbuf(struct qe_softc *, int); static void qe_setup(struct qe_softc *); static void qetimeout(struct ifnet *); @@ -163,7 +163,7 @@ qematch(struct device *parent, struct cfdata *cf, void *aux) * so that the DEQNA has a reason to interrupt. */ ui.ui_size = PROBESIZE; - ui.ui_vaddr = (caddr_t)&ring[0]; + ui.ui_vaddr = (void *)&ring[0]; if ((error = uballoc((void *)parent, &ui, UBA_CANTWAIT))) return 0; @@ -646,7 +646,7 @@ qeintr(void *arg) * Process an ioctl request. */ int -qeioctl(struct ifnet *ifp, u_long cmd, caddr_t data) +qeioctl(struct ifnet *ifp, u_long cmd, void *data) { struct qe_softc *sc = ifp->if_softc; struct ifreq *ifr = (struct ifreq *)data; diff --git a/sys/dev/qbus/if_qt.c b/sys/dev/qbus/if_qt.c index 3ae84525947..6e295e41562 100644 --- a/sys/dev/qbus/if_qt.c +++ b/sys/dev/qbus/if_qt.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_qt.c,v 1.10 2006/09/07 02:40:33 dogcow Exp $ */ +/* $NetBSD: if_qt.c,v 1.11 2007/03/04 06:02:29 christos Exp $ */ /* * Copyright (c) 1992 Steven M. Schultz * All rights reserved. @@ -80,7 +80,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_qt.c,v 1.10 2006/09/07 02:40:33 dogcow Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_qt.c,v 1.11 2007/03/04 06:02:29 christos Exp $"); #include "opt_inet.h" #include "bpfilter.h" @@ -168,7 +168,7 @@ static int qtmatch(struct device *, struct cfdata *, void *); static void qtattach(struct device *, struct device *, void *); static void qtintr(void *); static int qtinit(struct ifnet *); -static int qtioctl(struct ifnet *, u_long, caddr_t); +static int qtioctl(struct ifnet *, u_long, void *); static int qtturbo(struct qt_softc *); static void qtstart(struct ifnet *ifp); static void qtstop(struct ifnet *ifp, int disable); @@ -613,7 +613,7 @@ int qtioctl(ifp, cmd, data) register struct ifnet *ifp; u_long cmd; - caddr_t data; + void * data; { int s, error; diff --git a/sys/dev/qbus/if_uba.c b/sys/dev/qbus/if_uba.c index bcbf833b5ac..c9ab0bdc939 100644 --- a/sys/dev/qbus/if_uba.c +++ b/sys/dev/qbus/if_uba.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_uba.c,v 1.26 2005/12/11 12:23:29 christos Exp $ */ +/* $NetBSD: if_uba.c,v 1.27 2007/03/04 06:02:29 christos Exp $ */ /* * Copyright (c) 1982, 1986, 1988 Regents of the University of California. @@ -32,7 +32,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_uba.c,v 1.26 2005/12/11 12:23:29 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_uba.c,v 1.27 2007/03/04 06:02:29 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -79,7 +79,7 @@ if_ubaminit(struct ifubinfo *ifu, struct uba_softc *uh, int size, struct mbuf *m; int totsz, i, error, rseg, nm = nr; bus_dma_segment_t seg; - caddr_t vaddr; + void *vaddr; #ifdef DIAGNOSTIC if (size > MCLBYTES) diff --git a/sys/dev/qbus/if_uba.h b/sys/dev/qbus/if_uba.h index 2f44a174ca2..b8decdd60fd 100644 --- a/sys/dev/qbus/if_uba.h +++ b/sys/dev/qbus/if_uba.h @@ -1,4 +1,4 @@ -/* $NetBSD: if_uba.h,v 1.14 2005/12/11 12:23:29 christos Exp $ */ +/* $NetBSD: if_uba.h,v 1.15 2007/03/04 06:02:29 christos Exp $ */ /* * Copyright (c) 1982, 1986 Regents of the University of California. @@ -82,7 +82,7 @@ struct ifrw { */ struct ifxmt { struct ifrw ifrw; - caddr_t ifw_vaddr; /* DMA memory virtual addr */ + void * ifw_vaddr; /* DMA memory virtual addr */ int ifw_size; /* Size of this DMA block */ }; #define ifrw_addr ifrw_mbuf->m_data diff --git a/sys/dev/qbus/qd.c b/sys/dev/qbus/qd.c index 86b5e3cb1e5..b3265af9d9a 100644 --- a/sys/dev/qbus/qd.c +++ b/sys/dev/qbus/qd.c @@ -1,4 +1,4 @@ -/* $NetBSD: qd.c,v 1.36 2006/03/28 17:38:34 thorpej Exp $ */ +/* $NetBSD: qd.c,v 1.37 2007/03/04 06:02:29 christos Exp $ */ /*- * Copyright (c) 1988 Regents of the University of California. @@ -58,7 +58,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: qd.c,v 1.36 2006/03/28 17:38:34 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: qd.c,v 1.37 2007/03/04 06:02:29 christos Exp $"); #include "opt_ddb.h" @@ -166,7 +166,7 @@ volatile struct pte *QVmap[NQD]; int Qbus_unmap[NQD]; /* Qbus mapper release code */ struct qdmap qdmap[NQD]; /* QDSS register map structure */ struct qdflags qdflags[NQD]; /* QDSS register map structure */ -caddr_t qdbase[NQD]; /* base address of each QDSS unit */ +void *qdbase[NQD]; /* base address of each QDSS unit */ struct buf qdbuf[NQD]; /* buf structs used by strategy */ short qdopened[NQD]; /* graphics device is open exclusive use */ @@ -423,7 +423,7 @@ qdearly() #define QIOPAGE 0x20000000 /* XXX */ #define UBAIOPAGES 16 tmp = QIOPAGE + ubdevreg(QDSSCSR); - if (badaddr((caddr_t)tmp, sizeof(short))) + if (badaddr((void *)tmp, sizeof(short))) return; MAPVIRT(qvmem[0], 64 * 1024 * NQD / VAX_NBPG); @@ -462,7 +462,7 @@ void qdcninit(cndev) struct consdev *cndev; { - caddr_t phys_adr; /* physical QDSS base adrs */ + void *phys_adr; /* physical QDSS base adrs */ u_int mapix; /* index into QVmap[] array */ int unit; @@ -496,7 +496,7 @@ qdcninit(cndev) /* * load qdmap struct with the virtual addresses of the QDSS elements */ - qdbase[unit] = (caddr_t) (qvmem[0]); + qdbase[unit] = (void *) (qvmem[0]); qdmap[unit].template = qdbase[unit] + TMPSTART; qdmap[unit].adder = qdbase[unit] + ADDER; qdmap[unit].dga = qdbase[unit] + DGA; @@ -562,7 +562,7 @@ qd_match(parent, match, aux) int vector; #ifdef notdef int *ptep; /* page table entry pointer */ - caddr_t phys_adr; /* physical QDSS base adrs */ + void *phys_adr; /* physical QDSS base adrs */ u_int mapix; #endif @@ -608,7 +608,7 @@ qd_match(parent, match, aux) * find an empty 64kb adrs boundary */ - qdbase[unit] = (caddr_t) (qvmem[0] + QMEMSIZE - CHUNK); + qdbase[unit] = (void *) (qvmem[0] + QMEMSIZE - CHUNK); /* * find the cpusw entry that matches this machine. @@ -622,7 +622,7 @@ qd_match(parent, match, aux) */ mapix = (int) (VTOP(qdbase[unit]) - VTOP(qvmem[0])); ptep = (int *) QVmap[0] + mapix; - phys_adr = (caddr_t)(((int)*ptep&0x001FFFFF)<<VAX_PGSHIFT); + phys_adr = (void *)(((int)*ptep&0x001FFFFF)<<VAX_PGSHIFT); *(u_short *)reg = (u_short) ((int)phys_adr >> 16); /* @@ -675,7 +675,7 @@ qd_match(parent, match, aux) qdaddr = (void *)reg; /* Lame probe for QDSS. Should be ok for qd0 */ - if (badaddr((caddr_t)qdaddr, sizeof(short))) + if (badaddr((void *)qdaddr, sizeof(short))) return 0; qdcninit(NULL); @@ -1078,7 +1078,7 @@ int qdioctl(dev, cmd, datap, flags, p) dev_t dev; u_long cmd; - caddr_t datap; + void *datap; int flags; struct proc *p; { @@ -1122,7 +1122,7 @@ qdioctl(dev, cmd, datap, flags, p) s = spl5(); GETEND(eq_header[unit]); splx(s); - bcopy((caddr_t)event, datap, sizeof(struct _vs_event)); + bcopy((void *)event, datap, sizeof(struct _vs_event)); break; case QD_RESET: @@ -1241,7 +1241,7 @@ qdioctl(dev, cmd, datap, flags, p) /* * stuff qdmap structure in return buffer */ - bcopy((caddr_t)qd, datap, sizeof(struct qdmap)); + bcopy((void *)qd, datap, sizeof(struct qdmap)); break; @@ -1267,7 +1267,7 @@ qdioctl(dev, cmd, datap, flags, p) * set up QBUS map registers for DMA */ DMAheader[unit]->QBAreg = - uballoc(uh, (caddr_t)DMAheader[unit], DMAbuf_size, 0); + uballoc(uh, (void *)DMAheader[unit], DMAbuf_size, 0); if (DMAheader[unit]->QBAreg == 0) printf("qd%d: qdioctl: QBA setup error\n", unit); Qbus_unmap[unit] = DMAheader[unit]->QBAreg; @@ -1815,7 +1815,7 @@ void qdstart(tp) if (tp->t_outq.c_cc <= tp->t_lowat) { if (tp->t_state & TS_ASLEEP){ tp->t_state &= ~TS_ASLEEP; - wakeup((caddr_t) &tp->t_outq); + wakeup((void *) &tp->t_outq); } } @@ -2102,7 +2102,7 @@ qddint(arg) */ if (qdflags[unit].user_dma) { qdflags[unit].user_dma = 0; - wakeup((caddr_t)&qdflags[unit].user_dma); + wakeup((void *)&qdflags[unit].user_dma); return; } diff --git a/sys/dev/qbus/qdioctl.h b/sys/dev/qbus/qdioctl.h index 161188fe391..a3b1169f3e0 100644 --- a/sys/dev/qbus/qdioctl.h +++ b/sys/dev/qbus/qdioctl.h @@ -1,4 +1,4 @@ -/* $NetBSD: qdioctl.h,v 1.6 2005/12/11 12:23:29 christos Exp $ */ +/* $NetBSD: qdioctl.h,v 1.7 2007/03/04 06:02:29 christos Exp $ */ /*- * Copyright (c) 1982, 1986 * The Regents of the University of California. All rights reserved. @@ -94,15 +94,15 @@ #define QD_PRGTABLET _IOW('g', 7, char) /* program tablet */ #define QD_PRGKBD _IOW('g', 8, struct prgkbd) /* program LK201 kbd */ #define QD_MAPDEVICE _IOR('g', 9, struct qdmap) /* map device to user */ -#define QD_MAPIOBUF _IOWR('g', 10, caddr_t) /* map DMA iobuf to user */ -#define QD_MAPEVENT _IOR('g', 11, caddr_t) /* map event queue to user */ +#define QD_MAPIOBUF _IOWR('g', 10, void *) /* map DMA iobuf to user */ +#define QD_MAPEVENT _IOR('g', 11, void *) /* map event queue to user */ #define QD_PRGCURSOR _IOW('g', 12, struct prg_cursor) /* program cursor */ #define QD_RESET _IO('g', 13) /* set device & driver defaults */ #define QD_POSCURSOR _IOW('g', 14, struct _vs_cursor) /* position cursor */ #define QD_SET _IO('g', 15) /* set DUART & driver defaults */ -#define QD_MAPSCROLL _IOR('g', 16, caddr_t) /* map scroll param area */ +#define QD_MAPSCROLL _IOR('g', 16, void *) /* map scroll param area */ #define QD_UNMAPSCROLL _IO('g', 17) /* unmap scroll param area */ -#define QD_MAPCOLOR _IOR('g', 18, caddr_t) /* map color map write buf */ +#define QD_MAPCOLOR _IOR('g', 18, void *) /* map color map write buf */ #define QD_UNMAPCOLOR _IO('g', 19) /* unmap color map write buf */ #define QD_KERN_LOOP _IO('g', 20) /* detour kernel console output */ #define QD_KERN_UNLOOP _IO('g', 21) /* un-detour kernel console output */ diff --git a/sys/dev/qbus/rf.c b/sys/dev/qbus/rf.c index 6f5b998da24..1da1162a2a8 100644 --- a/sys/dev/qbus/rf.c +++ b/sys/dev/qbus/rf.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf.c,v 1.12 2006/03/29 18:17:36 thorpej Exp $ */ +/* $NetBSD: rf.c,v 1.13 2007/03/04 06:02:30 christos Exp $ */ /* * Copyright (c) 2002 Jochen Kunz. * All rights reserved. @@ -36,7 +36,7 @@ TODO: */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: rf.c,v 1.12 2006/03/29 18:17:36 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rf.c,v 1.13 2007/03/04 06:02:30 christos Exp $"); /* autoconfig stuff */ #include <sys/param.h> @@ -151,7 +151,7 @@ struct rfc_softc { bus_space_handle_t sc_ioh; /* bus_space I/O handle */ bus_dma_tag_t sc_dmat; /* bus_dma DMA tag */ bus_dmamap_t sc_dmam; /* bus_dma DMA map */ - caddr_t sc_bufidx; /* current position in buffer data */ + void *sc_bufidx; /* current position in buffer data */ int sc_curchild; /* child whos bufq is in work */ int sc_bytesleft; /* bytes left to transfer */ u_int8_t type; /* controller type, 1 or 2 */ @@ -938,7 +938,7 @@ rfc_intr(void *intarg) int -rfdump(dev_t dev, daddr_t blkno, caddr_t va, size_t size) +rfdump(dev_t dev, daddr_t blkno, void *va, size_t size) { /* A 0.5MB floppy is much to small to take a system dump... */ @@ -1090,7 +1090,7 @@ rfwrite(dev_t dev, struct uio *uio, int ioflag) int -rfioctl(dev_t dev, u_long cmd, caddr_t data, int fflag, struct lwp *l) +rfioctl(dev_t dev, u_long cmd, void *data, int fflag, struct lwp *l) { struct rf_softc *rf_sc; int unit; diff --git a/sys/dev/qbus/rl.c b/sys/dev/qbus/rl.c index 9970bbb2729..dbe20155eb4 100644 --- a/sys/dev/qbus/rl.c +++ b/sys/dev/qbus/rl.c @@ -1,4 +1,4 @@ -/* $NetBSD: rl.c,v 1.30 2006/03/29 18:17:36 thorpej Exp $ */ +/* $NetBSD: rl.c,v 1.31 2007/03/04 06:02:30 christos Exp $ */ /* * Copyright (c) 2000 Ludd, University of Lule}, Sweden. All rights reserved. @@ -43,7 +43,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: rl.c,v 1.30 2006/03/29 18:17:36 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rl.c,v 1.31 2007/03/04 06:02:30 christos Exp $"); #include <sys/param.h> #include <sys/device.h> @@ -440,7 +440,7 @@ done: biodone(bp); } int -rlioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct lwp *l) +rlioctl(dev_t dev, u_long cmd, void *addr, int flag, struct lwp *l) { struct rl_softc *rc = rl_cd.cd_devs[DISKUNIT(dev)]; struct disklabel *lp = rc->rc_disk.dk_label; @@ -564,7 +564,7 @@ rlsize(dev_t dev) } int -rldump(dev_t dev, daddr_t blkno, caddr_t va, size_t size) +rldump(dev_t dev, daddr_t blkno, void *va, size_t size) { /* Not likely... */ return 0; diff --git a/sys/dev/qbus/rlvar.h b/sys/dev/qbus/rlvar.h index 944ce6ec5d2..9396e3d9887 100644 --- a/sys/dev/qbus/rlvar.h +++ b/sys/dev/qbus/rlvar.h @@ -1,4 +1,4 @@ -/* $NetBSD: rlvar.h,v 1.6 2005/12/11 12:23:29 christos Exp $ */ +/* $NetBSD: rlvar.h,v 1.7 2007/03/04 06:02:30 christos Exp $ */ /* * Copyright (c) 2000 Ludd, University of Lule}, Sweden. All rights reserved. @@ -36,7 +36,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: rlvar.h,v 1.6 2005/12/11 12:23:29 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rlvar.h,v 1.7 2007/03/04 06:02:30 christos Exp $"); struct rlc_softc { struct device sc_dev; @@ -47,7 +47,7 @@ struct rlc_softc { bus_dmamap_t sc_dmam; struct bufq_state *sc_q; /* Queue of waiting bufs */ struct buf *sc_active; /* Currently active buf */ - caddr_t sc_bufaddr; /* Current in-core address */ + void *sc_bufaddr; /* Current in-core address */ int sc_diskblk; /* Current block on disk */ int sc_bytecnt; /* How much left to transfer */ }; diff --git a/sys/dev/qbus/ts.c b/sys/dev/qbus/ts.c index a7c0d167d9c..4c2e8a8f5cc 100644 --- a/sys/dev/qbus/ts.c +++ b/sys/dev/qbus/ts.c @@ -1,4 +1,4 @@ -/* $NetBSD: ts.c,v 1.18 2006/05/14 21:45:00 elad Exp $ */ +/* $NetBSD: ts.c,v 1.19 2007/03/04 06:02:30 christos Exp $ */ /*- * Copyright (c) 1991 The Regents of the University of California. @@ -66,7 +66,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ts.c,v 1.18 2006/05/14 21:45:00 elad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ts.c,v 1.19 2007/03/04 06:02:30 christos Exp $"); #undef TSDEBUG @@ -363,7 +363,7 @@ tscommand(struct ts_softc *sc, dev_t dev, int cmd, int count) return; biowait(bp); if (bp->b_flags & B_WANTED) - wakeup((caddr_t)bp); + wakeup((void *)bp); bp->b_flags &= B_ERROR; } @@ -924,7 +924,7 @@ int tsioctl(dev, cmd, data, flag, p) dev_t dev; u_long cmd; - caddr_t data; + void *data; int flag; struct proc *p; { @@ -1066,7 +1066,7 @@ int tsdump(dev, blkno, va, size) dev_t dev; daddr_t blkno; - caddr_t va; + void *va; size_t size; { return EIO; diff --git a/sys/dev/qbus/uba.c b/sys/dev/qbus/uba.c index 1c4d5a409e4..31249413459 100644 --- a/sys/dev/qbus/uba.c +++ b/sys/dev/qbus/uba.c @@ -1,4 +1,4 @@ -/* $NetBSD: uba.c,v 1.74 2006/03/25 04:08:45 thorpej Exp $ */ +/* $NetBSD: uba.c,v 1.75 2007/03/04 06:02:30 christos Exp $ */ /* * Copyright (c) 1982, 1986 The Regents of the University of California. * All rights reserved. @@ -69,7 +69,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: uba.c,v 1.74 2006/03/25 04:08:45 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uba.c,v 1.75 2007/03/04 06:02:30 christos Exp $"); #include <sys/param.h> #include <sys/time.h> @@ -302,7 +302,7 @@ ubasearch(struct device *parent, struct cfdata *cf, ua.ua_iot = sc->uh_iot; ua.ua_dmat = sc->uh_dmat; - if (badaddr((caddr_t)ua.ua_ioh, 2) || + if (badaddr((void *)ua.ua_ioh, 2) || (sc->uh_errchk ? (*sc->uh_errchk)(sc):0)) goto forgetit; diff --git a/sys/dev/qbus/ubavar.h b/sys/dev/qbus/ubavar.h index 6eecb50f614..786440fc023 100644 --- a/sys/dev/qbus/ubavar.h +++ b/sys/dev/qbus/ubavar.h @@ -1,4 +1,4 @@ -/* $NetBSD: ubavar.h,v 1.37 2005/12/11 12:23:29 christos Exp $ */ +/* $NetBSD: ubavar.h,v 1.38 2007/03/04 06:02:30 christos Exp $ */ /* * Copyright (c) 1982, 1986 Regents of the University of California. @@ -145,7 +145,7 @@ struct ubinfo { bus_dmamap_t ui_dmam; bus_dma_segment_t ui_seg; int ui_rseg; - caddr_t ui_vaddr; + void *ui_vaddr; bus_addr_t ui_baddr; bus_size_t ui_size; }; diff --git a/sys/dev/radio.c b/sys/dev/radio.c index 693af05ceeb..9c3fcb1b019 100644 --- a/sys/dev/radio.c +++ b/sys/dev/radio.c @@ -1,4 +1,4 @@ -/* $NetBSD: radio.c,v 1.19 2006/11/16 01:32:45 christos Exp $ */ +/* $NetBSD: radio.c,v 1.20 2007/03/04 06:01:43 christos Exp $ */ /* $OpenBSD: radio.c,v 1.2 2001/12/05 10:27:06 mickey Exp $ */ /* $RuOBSD: radio.c,v 1.7 2001/12/04 06:03:05 tm Exp $ */ @@ -30,7 +30,7 @@ /* This is the /dev/radio driver from OpenBSD */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: radio.c,v 1.19 2006/11/16 01:32:45 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: radio.c,v 1.20 2007/03/04 06:01:43 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -118,7 +118,7 @@ radioclose(dev_t dev, int flags, int fmt, struct lwp *l) } int -radioioctl(dev_t dev, u_long cmd, caddr_t data, int flags, +radioioctl(dev_t dev, u_long cmd, void *data, int flags, struct lwp *l) { struct radio_softc *sc; diff --git a/sys/dev/raidframe/rf_aselect.c b/sys/dev/raidframe/rf_aselect.c index 4c796feefa3..4bb55c813b1 100644 --- a/sys/dev/raidframe/rf_aselect.c +++ b/sys/dev/raidframe/rf_aselect.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf_aselect.c,v 1.24 2006/03/23 03:43:54 oster Exp $ */ +/* $NetBSD: rf_aselect.c,v 1.25 2007/03/04 06:02:36 christos Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -33,7 +33,7 @@ *****************************************************************************/ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: rf_aselect.c,v 1.24 2006/03/23 03:43:54 oster Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rf_aselect.c,v 1.25 2007/03/04 06:02:36 christos Exp $"); #include <dev/raidframe/raidframevar.h> @@ -137,7 +137,7 @@ rf_SelectAlgorithm(RF_RaidAccessDesc_t *desc, RF_RaidAccessFlags_t flags) RF_RaidAddr_t address; int length; RF_PhysDiskAddr_t *physPtr; - caddr_t buffer; + void *buffer; lastdag_h = NULL; asmh_u = asmh_b = NULL; @@ -240,7 +240,7 @@ rf_SelectAlgorithm(RF_RaidAccessDesc_t *desc, RF_RaidAccessFlags_t flags) * stripe-unit accesses */ address = physPtr->raidAddress + k; length = 1; - buffer = physPtr->bufPtr + (k * (1 << raidPtr->logBytesPerSector)); + buffer = (char *)physPtr->bufPtr + (k * (1 << raidPtr->logBytesPerSector)); asmhle = rf_AllocASMHeaderListElem(); if (failed_stripe->asmh_b == NULL) { diff --git a/sys/dev/raidframe/rf_dagfuncs.c b/sys/dev/raidframe/rf_dagfuncs.c index 932de74fc24..bcc4831564a 100644 --- a/sys/dev/raidframe/rf_dagfuncs.c +++ b/sys/dev/raidframe/rf_dagfuncs.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf_dagfuncs.c,v 1.28 2006/11/16 01:33:23 christos Exp $ */ +/* $NetBSD: rf_dagfuncs.c,v 1.29 2007/03/04 06:02:36 christos Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -48,7 +48,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: rf_dagfuncs.c,v 1.28 2006/11/16 01:33:23 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rf_dagfuncs.c,v 1.29 2007/03/04 06:02:36 christos Exp $"); #include <sys/param.h> #include <sys/ioctl.h> @@ -168,7 +168,7 @@ int rf_ParityLogUpdateFunc(RF_DagNode_t *node) { RF_PhysDiskAddr_t *pda = (RF_PhysDiskAddr_t *) node->params[0].p; - caddr_t bf = (caddr_t) node->params[1].p; + void *bf = (void *) node->params[1].p; RF_ParityLogData_t *logData; #if RF_ACC_TRACE > 0 RF_AccTraceEntry_t *tracerec = node->dagHdr->tracerec; @@ -205,7 +205,7 @@ int rf_ParityLogOverwriteFunc(RF_DagNode_t *node) { RF_PhysDiskAddr_t *pda = (RF_PhysDiskAddr_t *) node->params[0].p; - caddr_t bf = (caddr_t) node->params[1].p; + void *bf = (void *) node->params[1].p; RF_ParityLogData_t *logData; #if RF_ACC_TRACE > 0 RF_AccTraceEntry_t *tracerec = node->dagHdr->tracerec; @@ -272,7 +272,7 @@ rf_DiskReadFuncForThreads(RF_DagNode_t *node) { RF_DiskQueueData_t *req; RF_PhysDiskAddr_t *pda = (RF_PhysDiskAddr_t *) node->params[0].p; - caddr_t bf = (caddr_t) node->params[1].p; + void *bf = (void *) node->params[1].p; RF_StripeNum_t parityStripeID = (RF_StripeNum_t) node->params[2].v; unsigned priority = RF_EXTRACT_PRIORITY(node->params[3].v); unsigned which_ru = RF_EXTRACT_RU(node->params[3].v); @@ -311,7 +311,7 @@ rf_DiskWriteFuncForThreads(RF_DagNode_t *node) { RF_DiskQueueData_t *req; RF_PhysDiskAddr_t *pda = (RF_PhysDiskAddr_t *) node->params[0].p; - caddr_t bf = (caddr_t) node->params[1].p; + void *bf = (void *) node->params[1].p; RF_StripeNum_t parityStripeID = (RF_StripeNum_t) node->params[2].v; unsigned priority = RF_EXTRACT_PRIORITY(node->params[3].v); unsigned which_ru = RF_EXTRACT_RU(node->params[3].v); diff --git a/sys/dev/raidframe/rf_dagutils.c b/sys/dev/raidframe/rf_dagutils.c index dfc3ca27567..63ea955f207 100644 --- a/sys/dev/raidframe/rf_dagutils.c +++ b/sys/dev/raidframe/rf_dagutils.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf_dagutils.c,v 1.50 2006/11/16 01:33:23 christos Exp $ */ +/* $NetBSD: rf_dagutils.c,v 1.51 2007/03/04 06:02:36 christos Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -33,7 +33,7 @@ *****************************************************************************/ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: rf_dagutils.c,v 1.50 2006/11/16 01:33:23 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rf_dagutils.c,v 1.51 2007/03/04 06:02:36 christos Exp $"); #include <dev/raidframe/raidframevar.h> @@ -1214,7 +1214,7 @@ rf_RangeRestrictPDA(RF_Raid_t *raidPtr, RF_PhysDiskAddr_t *src, dest->numSector = subAddr + RF_MIN(send, dend) + 1 - dest->startSector; if (dobuffer) - dest->bufPtr += (soffs > doffs) ? rf_RaidAddressToByte(raidPtr, soffs - doffs) : 0; + dest->bufPtr = (char *)(dest->bufPtr) + ((soffs > doffs) ? rf_RaidAddressToByte(raidPtr, soffs - doffs) : 0); if (doraidaddr) { dest->raidAddress = rf_RaidAddressOfPrevStripeUnitBoundary(layoutPtr, dest->raidAddress) + rf_StripeUnitOffset(layoutPtr, dest->startSector); diff --git a/sys/dev/raidframe/rf_decluster.c b/sys/dev/raidframe/rf_decluster.c index 4117736b8b8..761b595baa7 100644 --- a/sys/dev/raidframe/rf_decluster.c +++ b/sys/dev/raidframe/rf_decluster.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf_decluster.c,v 1.21 2006/11/16 01:33:23 christos Exp $ */ +/* $NetBSD: rf_decluster.c,v 1.22 2007/03/04 06:02:36 christos Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -48,7 +48,7 @@ *--------------------------------------------------------------------*/ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: rf_decluster.c,v 1.21 2006/11/16 01:33:23 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rf_decluster.c,v 1.22 2007/03/04 06:02:36 christos Exp $"); #include <dev/raidframe/raidframevar.h> @@ -649,7 +649,7 @@ rf_SetSpareTable(RF_Raid_t *raidPtr, void *data) /* what we need to copyin is a 2-d array, so first copyin the user * pointers to the rows in the table */ RF_Malloc(ptrs, info->TablesPerSpareRegion * sizeof(RF_SpareTableEntry_t *), (RF_SpareTableEntry_t **)); - retcode = copyin((caddr_t) data, (caddr_t) ptrs, info->TablesPerSpareRegion * sizeof(RF_SpareTableEntry_t *)); + retcode = copyin((void *) data, (void *) ptrs, info->TablesPerSpareRegion * sizeof(RF_SpareTableEntry_t *)); if (retcode) return (retcode); diff --git a/sys/dev/raidframe/rf_desc.h b/sys/dev/raidframe/rf_desc.h index c2c35e9d644..141a09305a7 100644 --- a/sys/dev/raidframe/rf_desc.h +++ b/sys/dev/raidframe/rf_desc.h @@ -1,4 +1,4 @@ -/* $NetBSD: rf_desc.h,v 1.19 2005/12/11 12:23:37 christos Exp $ */ +/* $NetBSD: rf_desc.h,v 1.20 2007/03/04 06:02:36 christos Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -70,7 +70,7 @@ struct RF_RaidAccessDesc_s { * transfer */ RF_StripeCount_t numStripes; /* number of stripes involved in * access */ - caddr_t bufPtr; /* pointer to data buffer */ + void *bufPtr; /* pointer to data buffer */ RF_RaidAccessFlags_t flags; /* flags controlling operation */ int state; /* index into states telling how far along the * RAID operation has gotten */ diff --git a/sys/dev/raidframe/rf_diskqueue.c b/sys/dev/raidframe/rf_diskqueue.c index f779fa45d0b..3a7a7cb16f2 100644 --- a/sys/dev/raidframe/rf_diskqueue.c +++ b/sys/dev/raidframe/rf_diskqueue.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf_diskqueue.c,v 1.48 2006/11/16 01:33:23 christos Exp $ */ +/* $NetBSD: rf_diskqueue.c,v 1.49 2007/03/04 06:02:37 christos Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -66,7 +66,7 @@ ****************************************************************************/ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: rf_diskqueue.c,v 1.48 2006/11/16 01:33:23 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rf_diskqueue.c,v 1.49 2007/03/04 06:02:37 christos Exp $"); #include <dev/raidframe/raidframevar.h> @@ -440,7 +440,7 @@ rf_DiskIOPromote(RF_DiskQueue_t *queue, RF_StripeNum_t parityStripeID, RF_DiskQueueData_t * rf_CreateDiskQueueData(RF_IoType_t typ, RF_SectorNum_t ssect, - RF_SectorCount_t nsect, caddr_t bf, + RF_SectorCount_t nsect, void *bf, RF_StripeNum_t parityStripeID, RF_ReconUnitNum_t which_ru, int (*wakeF) (void *, int), void *arg, diff --git a/sys/dev/raidframe/rf_diskqueue.h b/sys/dev/raidframe/rf_diskqueue.h index cef1e8ef889..5e6c95ec7e8 100644 --- a/sys/dev/raidframe/rf_diskqueue.h +++ b/sys/dev/raidframe/rf_diskqueue.h @@ -1,4 +1,4 @@ -/* $NetBSD: rf_diskqueue.h,v 1.21 2005/12/11 12:23:37 christos Exp $ */ +/* $NetBSD: rf_diskqueue.h,v 1.22 2007/03/04 06:02:37 christos Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -57,7 +57,7 @@ struct RF_DiskQueueData_s { RF_SectorNum_t sectorOffset; /* sector offset into the disk */ RF_SectorCount_t numSector; /* number of sectors to read/write */ RF_IoType_t type; /* read/write/nop */ - caddr_t buf; /* buffer pointer */ + void *buf; /* buffer pointer */ RF_StripeNum_t parityStripeID; /* the RAID parity stripe ID this * access is for */ RF_ReconUnitNum_t which_ru; /* which RU within this parity stripe */ @@ -154,7 +154,7 @@ void rf_DiskIOEnqueue(RF_DiskQueue_t *, RF_DiskQueueData_t *, int); void rf_DiskIOComplete(RF_DiskQueue_t *, RF_DiskQueueData_t *, int); int rf_DiskIOPromote(RF_DiskQueue_t *, RF_StripeNum_t, RF_ReconUnitNum_t); RF_DiskQueueData_t *rf_CreateDiskQueueData(RF_IoType_t, RF_SectorNum_t, - RF_SectorCount_t , caddr_t, + RF_SectorCount_t , void *, RF_StripeNum_t, RF_ReconUnitNum_t, int (*wakeF) (void *, int), void *, diff --git a/sys/dev/raidframe/rf_driver.c b/sys/dev/raidframe/rf_driver.c index b89569b741e..5706530d4ab 100644 --- a/sys/dev/raidframe/rf_driver.c +++ b/sys/dev/raidframe/rf_driver.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf_driver.c,v 1.113 2006/11/16 01:33:23 christos Exp $ */ +/* $NetBSD: rf_driver.c,v 1.114 2007/03/04 06:02:37 christos Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. * All rights reserved. @@ -73,7 +73,7 @@ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: rf_driver.c,v 1.113 2006/11/16 01:33:23 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rf_driver.c,v 1.114 2007/03/04 06:02:37 christos Exp $"); #include "opt_raid_diagnostic.h" @@ -541,7 +541,7 @@ rf_ConfigureRDFreeList(RF_ShutdownList_t **listp) RF_RaidAccessDesc_t * rf_AllocRaidAccDesc(RF_Raid_t *raidPtr, RF_IoType_t type, RF_RaidAddr_t raidAddress, RF_SectorCount_t numBlocks, - caddr_t bufPtr, void *bp, RF_RaidAccessFlags_t flags, + void *bufPtr, void *bp, RF_RaidAccessFlags_t flags, const RF_AccessState_t *states) { RF_RaidAccessDesc_t *desc; @@ -632,16 +632,16 @@ rf_FreeRaidAccDesc(RF_RaidAccessDesc_t *desc) * failures in a parity group. * * type should be read or write async_flag should be RF_TRUE or - * RF_FALSE bp_in is a buf pointer. void * to facilitate ignoring it + * RF_FALSE bp_in is a buf pointer. void *to facilitate ignoring it * outside the kernel ********************************************************************/ int rf_DoAccess(RF_Raid_t * raidPtr, RF_IoType_t type, int async_flag, RF_RaidAddr_t raidAddress, RF_SectorCount_t numBlocks, - caddr_t bufPtr, struct buf *bp, RF_RaidAccessFlags_t flags) + void *bufPtr, struct buf *bp, RF_RaidAccessFlags_t flags) { RF_RaidAccessDesc_t *desc; - caddr_t lbufPtr = bufPtr; + void *lbufPtr = bufPtr; raidAddress += rf_raidSectorOffset; diff --git a/sys/dev/raidframe/rf_driver.h b/sys/dev/raidframe/rf_driver.h index 1b0580d5ab3..d3aed547809 100644 --- a/sys/dev/raidframe/rf_driver.h +++ b/sys/dev/raidframe/rf_driver.h @@ -1,4 +1,4 @@ -/* $NetBSD: rf_driver.h,v 1.16 2005/12/11 12:23:37 christos Exp $ */ +/* $NetBSD: rf_driver.h,v 1.17 2007/03/04 06:02:38 christos Exp $ */ /* * rf_driver.h */ @@ -48,12 +48,12 @@ int rf_Shutdown(RF_Raid_t *); int rf_Configure(RF_Raid_t *, RF_Config_t *, RF_AutoConfig_t *); RF_RaidAccessDesc_t *rf_AllocRaidAccDesc(RF_Raid_t *, RF_IoType_t, RF_RaidAddr_t, RF_SectorCount_t, - caddr_t, void *, + void *, void *, RF_RaidAccessFlags_t, const RF_AccessState_t *); void rf_FreeRaidAccDesc(RF_RaidAccessDesc_t *); int rf_DoAccess(RF_Raid_t *, RF_IoType_t, int, RF_RaidAddr_t, - RF_SectorCount_t, caddr_t, struct buf *, + RF_SectorCount_t, void *, struct buf *, RF_RaidAccessFlags_t); #if 0 int rf_SetReconfiguredMode(RF_Raid_t *, RF_RowCol_t, RF_RowCol_t); diff --git a/sys/dev/raidframe/rf_evenodd_dagfuncs.c b/sys/dev/raidframe/rf_evenodd_dagfuncs.c index 03dc01d1e1a..1eebddb2b84 100644 --- a/sys/dev/raidframe/rf_evenodd_dagfuncs.c +++ b/sys/dev/raidframe/rf_evenodd_dagfuncs.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf_evenodd_dagfuncs.c,v 1.17 2006/08/28 02:58:16 christos Exp $ */ +/* $NetBSD: rf_evenodd_dagfuncs.c,v 1.18 2007/03/04 06:02:38 christos Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -31,7 +31,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: rf_evenodd_dagfuncs.c,v 1.17 2006/08/28 02:58:16 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rf_evenodd_dagfuncs.c,v 1.18 2007/03/04 06:02:38 christos Exp $"); #include "rf_archs.h" #include "opt_raid_diagnostic.h" @@ -786,7 +786,7 @@ rf_EvenOddDoubleRecoveryFunc(node) continue; for (prm = 0; prm < ndataParam; prm++) if (suoff[prm] <= sector && sector < suend[prm]) - buf[(prmToCol[prm])] = ((RF_PhysDiskAddr_t *) node->params[prm].p)->bufPtr + + buf[(prmToCol[prm])] = (char *)((RF_PhysDiskAddr_t *) node->params[prm].p)->bufPtr + rf_RaidAddressToByte(raidPtr, sector - suoff[prm]); /* find out if sector is in the shadow of any accessed failed * SU. If yes, assign dest[0], dest[1] to point at suitable @@ -795,21 +795,21 @@ rf_EvenOddDoubleRecoveryFunc(node) * destination of decoding. */ RF_ASSERT(nresults == 1 || nresults == 2); if (nresults == 1) { - dest[0] = ((RF_PhysDiskAddr_t *) node->results[0])->bufPtr + rf_RaidAddressToByte(raidPtr, sector - fsuoff[0]); + dest[0] = (char *)((RF_PhysDiskAddr_t *) node->results[0])->bufPtr + rf_RaidAddressToByte(raidPtr, sector - fsuoff[0]); /* Always malloc temp buffer to dest[1] */ RF_Malloc(dest[1], bytesPerSector, (char *)); memset(dest[1], 0, bytesPerSector); mallc_two = 1; } else { if (fsuoff[0] <= sector && sector < fsuend[0]) - dest[0] = ((RF_PhysDiskAddr_t *) node->results[0])->bufPtr + rf_RaidAddressToByte(raidPtr, sector - fsuoff[0]); + dest[0] = (char *)((RF_PhysDiskAddr_t *) node->results[0])->bufPtr + rf_RaidAddressToByte(raidPtr, sector - fsuoff[0]); else { RF_Malloc(dest[0], bytesPerSector, (char *)); memset(dest[0], 0, bytesPerSector); mallc_one = 1; } if (fsuoff[1] <= sector && sector < fsuend[1]) - dest[1] = ((RF_PhysDiskAddr_t *) node->results[1])->bufPtr + rf_RaidAddressToByte(raidPtr, sector - fsuoff[1]); + dest[1] = (char *)((RF_PhysDiskAddr_t *) node->results[1])->bufPtr + rf_RaidAddressToByte(raidPtr, sector - fsuoff[1]); else { RF_Malloc(dest[1], bytesPerSector, (char *)); memset(dest[1], 0, bytesPerSector); @@ -817,8 +817,8 @@ rf_EvenOddDoubleRecoveryFunc(node) } RF_ASSERT(mallc_one == 0 || mallc_two == 0); } - pbuf = ppda->bufPtr + rf_RaidAddressToByte(raidPtr, sector - psuoff); - ebuf = epda->bufPtr + rf_RaidAddressToByte(raidPtr, sector - esuoff); + pbuf = (char *)ppda->bufPtr + rf_RaidAddressToByte(raidPtr, sector - psuoff); + ebuf = (char *)epda->bufPtr + rf_RaidAddressToByte(raidPtr, sector - esuoff); /* * After finish finding all needed sectors, call doubleEOdecode function for decoding * one sector to destination. diff --git a/sys/dev/raidframe/rf_layout.h b/sys/dev/raidframe/rf_layout.h index 5901f3a35f2..d6815a58bfb 100644 --- a/sys/dev/raidframe/rf_layout.h +++ b/sys/dev/raidframe/rf_layout.h @@ -1,4 +1,4 @@ -/* $NetBSD: rf_layout.h,v 1.16 2005/12/11 12:23:37 christos Exp $ */ +/* $NetBSD: rf_layout.h,v 1.17 2007/03/04 06:02:38 christos Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -104,7 +104,7 @@ struct RF_PhysDiskAddr_s { RF_SectorCount_t numSector; /* number of sectors accessed */ int type; /* used by higher levels: currently, data, * parity, or q */ - caddr_t bufPtr; /* pointer to buffer supplying/receiving data */ + void *bufPtr; /* pointer to buffer supplying/receiving data */ RF_RaidAddr_t raidAddress; /* raid address corresponding to this * physical disk address */ RF_PhysDiskAddr_t *next; diff --git a/sys/dev/raidframe/rf_map.c b/sys/dev/raidframe/rf_map.c index 94764bd78f0..10f672c6a0b 100644 --- a/sys/dev/raidframe/rf_map.c +++ b/sys/dev/raidframe/rf_map.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf_map.c,v 1.42 2006/11/16 01:33:23 christos Exp $ */ +/* $NetBSD: rf_map.c,v 1.43 2007/03/04 06:02:38 christos Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -33,7 +33,7 @@ **************************************************************************/ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: rf_map.c,v 1.42 2006/11/16 01:33:23 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rf_map.c,v 1.43 2007/03/04 06:02:38 christos Exp $"); #include <dev/raidframe/raidframevar.h> @@ -77,7 +77,7 @@ static void rf_FreeASMList(RF_AccessStripeMap_t *asm_list); RF_AccessStripeMapHeader_t * rf_MapAccess(RF_Raid_t *raidPtr, RF_RaidAddr_t raidAddress, - RF_SectorCount_t numBlocks, caddr_t buffer, int remap) + RF_SectorCount_t numBlocks, void *buffer, int remap) { RF_RaidLayout_t *layoutPtr = &(raidPtr->Layout); RF_AccessStripeMapHeader_t *asm_hdr = NULL; @@ -182,7 +182,7 @@ rf_MapAccess(RF_Raid_t *raidPtr, RF_RaidAddr_t raidAddress, pda_p->numSector = RF_MIN(endAddress, nextStripeUnitAddress) - raidAddress; RF_ASSERT(pda_p->numSector != 0); rf_ASMCheckStatus(raidPtr, pda_p, asm_p, disks, 0); - pda_p->bufPtr = buffer + rf_RaidAddressToByte(raidPtr, (raidAddress - startAddress)); + pda_p->bufPtr = (char *)buffer + rf_RaidAddressToByte(raidPtr, (raidAddress - startAddress)); asm_p->totalSectorsAccessed += pda_p->numSector; asm_p->numStripeUnitsAccessed++; diff --git a/sys/dev/raidframe/rf_map.h b/sys/dev/raidframe/rf_map.h index 2ff35b3e046..88a872f1289 100644 --- a/sys/dev/raidframe/rf_map.h +++ b/sys/dev/raidframe/rf_map.h @@ -1,4 +1,4 @@ -/* $NetBSD: rf_map.h,v 1.12 2005/12/11 12:23:37 christos Exp $ */ +/* $NetBSD: rf_map.h,v 1.13 2007/03/04 06:02:38 christos Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -38,7 +38,7 @@ /* mapping structure allocation and free routines */ RF_AccessStripeMapHeader_t *rf_MapAccess(RF_Raid_t *, RF_RaidAddr_t, - RF_SectorCount_t, caddr_t, int); + RF_SectorCount_t, void *, int); void rf_MarkFailuresInASMList(RF_Raid_t *, RF_AccessStripeMapHeader_t *); int rf_ConfigureMapModule(RF_ShutdownList_t **); RF_AccessStripeMapHeader_t *rf_AllocAccessStripeMapHeader(void); diff --git a/sys/dev/raidframe/rf_netbsdkintf.c b/sys/dev/raidframe/rf_netbsdkintf.c index 4371be97d25..2da9ba2844c 100644 --- a/sys/dev/raidframe/rf_netbsdkintf.c +++ b/sys/dev/raidframe/rf_netbsdkintf.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf_netbsdkintf.c,v 1.224 2006/11/30 23:01:50 oster Exp $ */ +/* $NetBSD: rf_netbsdkintf.c,v 1.225 2007/03/04 06:02:38 christos Exp $ */ /*- * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc. * All rights reserved. @@ -146,7 +146,7 @@ ***********************************************************/ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.224 2006/11/30 23:01:50 oster Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.225 2007/03/04 06:02:38 christos Exp $"); #include <sys/param.h> #include <sys/errno.h> @@ -209,7 +209,7 @@ MALLOC_DEFINE(M_RAIDFRAME, "RAIDframe", "RAIDframe structures"); /* prototypes */ static void KernelWakeupFunc(struct buf *); static void InitBP(struct buf *, struct vnode *, unsigned, - dev_t, RF_SectorNum_t, RF_SectorCount_t, caddr_t, void (*) (struct buf *), + dev_t, RF_SectorNum_t, RF_SectorCount_t, void *, void (*) (struct buf *), void *, int, struct proc *); static void raidinit(RF_Raid_t *); @@ -542,7 +542,7 @@ raidsize(dev_t dev) } int -raiddump(dev_t dev, daddr_t blkno, caddr_t va, +raiddump(dev_t dev, daddr_t blkno, void *va, size_t size) { /* Not implemented. */ @@ -803,7 +803,7 @@ raidwrite(dev_t dev, struct uio *uio, int flags) } int -raidioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct lwp *l) +raidioctl(dev_t dev, u_long cmd, void *data, int flag, struct lwp *l) { int unit = raidunit(dev); int error = 0; @@ -2035,7 +2035,7 @@ KernelWakeupFunc(struct buf *bp) */ static void InitBP(struct buf *bp, struct vnode *b_vp, unsigned rw_flag, dev_t dev, - RF_SectorNum_t startSect, RF_SectorCount_t numSect, caddr_t bf, + RF_SectorNum_t startSect, RF_SectorCount_t numSect, void *bf, void (*cbFunc) (struct buf *), void *cbArg, int logBytesPerSector, struct proc *b_proc) { diff --git a/sys/dev/raidframe/rf_paritylog.c b/sys/dev/raidframe/rf_paritylog.c index 1f1315e3f76..7edaca55b9a 100644 --- a/sys/dev/raidframe/rf_paritylog.c +++ b/sys/dev/raidframe/rf_paritylog.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf_paritylog.c,v 1.12 2006/04/26 17:08:48 oster Exp $ */ +/* $NetBSD: rf_paritylog.c,v 1.13 2007/03/04 06:02:38 christos Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -31,7 +31,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: rf_paritylog.c,v 1.12 2006/04/26 17:08:48 oster Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rf_paritylog.c,v 1.13 2007/03/04 06:02:38 christos Exp $"); #include "rf_archs.h" @@ -259,7 +259,7 @@ RF_ParityLogData_t * rf_CreateParityLogData( RF_ParityRecordType_t operation, RF_PhysDiskAddr_t * pda, - caddr_t bufPtr, + void *bufPtr, RF_Raid_t * raidPtr, int (*wakeFunc) (RF_DagNode_t * node, int status), void *wakeArg, @@ -803,7 +803,7 @@ rf_ParityLogAppend( RF_ASSERT(log->records[logItem].parityAddr.startSector < raidPtr->regionInfo[regionID].parityStartAddr + raidPtr->regionInfo[regionID].numSectorsParity); log->records[logItem].parityAddr.numSector = 1; log->records[logItem].operation = item->common->operation; - memcpy(log->bufPtr + (logItem * (1 << item->common->raidPtr->logBytesPerSector)), (item->common->bufPtr + (item->bufOffset++ * (1 << item->common->raidPtr->logBytesPerSector))), (1 << item->common->raidPtr->logBytesPerSector)); + memcpy((char *)log->bufPtr + (logItem * (1 << item->common->raidPtr->logBytesPerSector)), ((char *)item->common->bufPtr + (item->bufOffset++ * (1 << item->common->raidPtr->logBytesPerSector))), (1 << item->common->raidPtr->logBytesPerSector)); item->diskAddress.numSector--; item->diskAddress.startSector++; if (item->diskAddress.numSector == 0) diff --git a/sys/dev/raidframe/rf_paritylog.h b/sys/dev/raidframe/rf_paritylog.h index c57fe2d71e8..67861c30f65 100644 --- a/sys/dev/raidframe/rf_paritylog.h +++ b/sys/dev/raidframe/rf_paritylog.h @@ -1,4 +1,4 @@ -/* $NetBSD: rf_paritylog.h,v 1.4 2001/10/04 15:58:55 oster Exp $ */ +/* $NetBSD: rf_paritylog.h,v 1.5 2007/03/04 06:02:38 christos Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -54,7 +54,7 @@ struct RF_CommonLogData_s { void *wakeArg; RF_AccTraceEntry_t *tracerec; RF_Etimer_t startTime; - caddr_t bufPtr; + void *bufPtr; RF_ParityRecordType_t operation; RF_CommonLogData_t *next; }; @@ -84,7 +84,7 @@ struct RF_ParityLog_s { int numRecords; int diskOffset; RF_ParityLogRecord_t *records; - caddr_t bufPtr; + void *bufPtr; RF_ParityLog_t *next; }; @@ -101,7 +101,7 @@ struct RF_RegionBufferQueue_s { int availableBuffers; /* num available 'buffers' */ int emptyBuffersIndex; /* stick next freed buffer here */ int availBuffersIndex; /* grab next buffer from here */ - caddr_t *buffers; /* array buffers used to hold parity */ + void **buffers; /* array buffers used to hold parity */ }; #define RF_PLOG_CREATED (1<<0)/* thread is created */ #define RF_PLOG_RUNNING (1<<1)/* thread is running */ @@ -165,7 +165,7 @@ struct RF_RegionInfo_s { RF_ParityLogData_t * rf_CreateParityLogData(RF_ParityRecordType_t operation, - RF_PhysDiskAddr_t * pda, caddr_t bufPtr, RF_Raid_t * raidPtr, + RF_PhysDiskAddr_t * pda, void *bufPtr, RF_Raid_t * raidPtr, int (*wakeFunc) (RF_DagNode_t * node, int status), void *wakeArg, RF_AccTraceEntry_t * tracerec, RF_Etimer_t startTime); diff --git a/sys/dev/raidframe/rf_paritylogDiskMgr.c b/sys/dev/raidframe/rf_paritylogDiskMgr.c index e58b2a47956..1cafdc3d36c 100644 --- a/sys/dev/raidframe/rf_paritylogDiskMgr.c +++ b/sys/dev/raidframe/rf_paritylogDiskMgr.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf_paritylogDiskMgr.c,v 1.21 2006/11/16 01:33:23 christos Exp $ */ +/* $NetBSD: rf_paritylogDiskMgr.c,v 1.22 2007/03/04 06:02:38 christos Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: rf_paritylogDiskMgr.c,v 1.21 2006/11/16 01:33:23 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rf_paritylogDiskMgr.c,v 1.22 2007/03/04 06:02:38 christos Exp $"); #include "rf_archs.h" @@ -57,13 +57,13 @@ __KERNEL_RCSID(0, "$NetBSD: rf_paritylogDiskMgr.c,v 1.21 2006/11/16 01:33:23 chr #include "rf_paritylogDiskMgr.h" -static caddr_t AcquireReintBuffer(RF_RegionBufferQueue_t *); +static void *AcquireReintBuffer(RF_RegionBufferQueue_t *); -static caddr_t +static void * AcquireReintBuffer(pool) RF_RegionBufferQueue_t *pool; { - caddr_t bufPtr = NULL; + void *bufPtr = NULL; /* Return a region buffer from the free list (pool). If the free list * is empty, WAIT. BLOCKING */ @@ -87,7 +87,7 @@ AcquireReintBuffer(pool) static void ReleaseReintBuffer( RF_RegionBufferQueue_t * pool, - caddr_t bufPtr) + void *bufPtr) { /* Insert a region buffer (bufPtr) into the free list (pool). * NON-BLOCKING */ @@ -109,7 +109,7 @@ static void ReadRegionLog( RF_RegionId_t regionID, RF_MCPair_t * rrd_mcpair, - caddr_t regionBuffer, + void *regionBuffer, RF_Raid_t * raidPtr, RF_DagHeader_t ** rrd_dag_h, RF_AllocListElem_t ** rrd_alloclist, @@ -215,7 +215,7 @@ static void ReadRegionParity( RF_RegionId_t regionID, RF_MCPair_t * prd_mcpair, - caddr_t parityBuffer, + void *parityBuffer, RF_Raid_t * raidPtr, RF_DagHeader_t ** prd_dag_h, RF_AllocListElem_t ** prd_alloclist, @@ -272,7 +272,7 @@ static void WriteRegionParity( RF_RegionId_t regionID, RF_MCPair_t * pwr_mcpair, - caddr_t parityBuffer, + void *parityBuffer, RF_Raid_t * raidPtr, RF_DagHeader_t ** pwr_dag_h, RF_AllocListElem_t ** pwr_alloclist, @@ -382,7 +382,7 @@ ReintegrateRegion( RF_DagHeader_t *rrd_dag_h = NULL, *prd_dag_h, *pwr_dag_h; RF_AllocListElem_t *rrd_alloclist = NULL, *prd_alloclist, *pwr_alloclist; RF_PhysDiskAddr_t *rrd_pda = NULL, *prd_pda, *pwr_pda; - caddr_t parityBuffer, regionBuffer = NULL; + void *parityBuffer, *regionBuffer = NULL; /* Reintegrate a region (regionID). * diff --git a/sys/dev/raidframe/rf_paritylogging.c b/sys/dev/raidframe/rf_paritylogging.c index 26c16573c06..c51f9f38152 100644 --- a/sys/dev/raidframe/rf_paritylogging.c +++ b/sys/dev/raidframe/rf_paritylogging.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf_paritylogging.c,v 1.27 2006/11/16 01:33:23 christos Exp $ */ +/* $NetBSD: rf_paritylogging.c,v 1.28 2007/03/04 06:02:39 christos Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -32,7 +32,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: rf_paritylogging.c,v 1.27 2006/11/16 01:33:23 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rf_paritylogging.c,v 1.28 2007/03/04 06:02:39 christos Exp $"); #include "rf_archs.h" @@ -82,7 +82,7 @@ rf_ConfigureParityLogging( RF_RaidLayout_t *layoutPtr = &raidPtr->Layout; RF_ParityLoggingConfigInfo_t *info; RF_ParityLog_t *l = NULL, *next; - caddr_t lHeapPtr; + void *lHeapPtr; if (rf_numParityRegions <= 0) return(EINVAL); @@ -230,7 +230,7 @@ rf_ConfigureParityLogging( raidPtr->numParityLogs); RF_Malloc(raidPtr->parityLogBufferHeap, raidPtr->numParityLogs * raidPtr->numSectorsPerLog * raidPtr->bytesPerSector, - (caddr_t)); + (void *)); if (raidPtr->parityLogBufferHeap == NULL) return (ENOMEM); lHeapPtr = raidPtr->parityLogBufferHeap; @@ -268,7 +268,7 @@ rf_ConfigureParityLogging( l = l->next; } l->bufPtr = lHeapPtr; - lHeapPtr += raidPtr->numSectorsPerLog * + lHeapPtr = (char *)lHeapPtr + raidPtr->numSectorsPerLog * raidPtr->bytesPerSector; RF_Malloc(l->records, (raidPtr->numSectorsPerLog * sizeof(RF_ParityLogRecord_t)), @@ -309,10 +309,10 @@ rf_ConfigureParityLogging( raidPtr->regionBufferPool.emptyBuffersIndex = 0; printf("Allocating %d bytes for regionBufferPool\n", (int) (raidPtr->regionBufferPool.totalBuffers * - sizeof(caddr_t))); + sizeof(void *))); RF_Malloc(raidPtr->regionBufferPool.buffers, - raidPtr->regionBufferPool.totalBuffers * sizeof(caddr_t), - (caddr_t *)); + raidPtr->regionBufferPool.totalBuffers * sizeof(void *), + (void **)); if (raidPtr->regionBufferPool.buffers == NULL) { return (ENOMEM); } @@ -322,7 +322,7 @@ rf_ConfigureParityLogging( sizeof(char)), i); RF_Malloc(raidPtr->regionBufferPool.buffers[i], raidPtr->regionBufferPool.bufferSize * sizeof(char), - (caddr_t)); + (void *)); if (raidPtr->regionBufferPool.buffers[i] == NULL) { for (j = 0; j < i; j++) { RF_Free(raidPtr->regionBufferPool.buffers[i], @@ -331,7 +331,7 @@ rf_ConfigureParityLogging( } RF_Free(raidPtr->regionBufferPool.buffers, raidPtr->regionBufferPool.totalBuffers * - sizeof(caddr_t)); + sizeof(void *)); return (ENOMEM); } printf("raidPtr->regionBufferPool.buffers[%d] = %lx\n", i, @@ -358,11 +358,11 @@ rf_ConfigureParityLogging( raidPtr->parityBufferPool.emptyBuffersIndex = 0; printf("Allocating %d bytes for parityBufferPool of %d units\n", (int) (raidPtr->parityBufferPool.totalBuffers * - sizeof(caddr_t)), + sizeof(void *)), raidPtr->parityBufferPool.totalBuffers ); RF_Malloc(raidPtr->parityBufferPool.buffers, - raidPtr->parityBufferPool.totalBuffers * sizeof(caddr_t), - (caddr_t *)); + raidPtr->parityBufferPool.totalBuffers * sizeof(void *), + (void **)); if (raidPtr->parityBufferPool.buffers == NULL) { return (ENOMEM); } @@ -372,7 +372,7 @@ rf_ConfigureParityLogging( sizeof(char)),i); RF_Malloc(raidPtr->parityBufferPool.buffers[i], raidPtr->parityBufferPool.bufferSize * sizeof(char), - (caddr_t)); + (void *)); if (raidPtr->parityBufferPool.buffers == NULL) { for (j = 0; j < i; j++) { RF_Free(raidPtr->parityBufferPool.buffers[i], @@ -381,7 +381,7 @@ rf_ConfigureParityLogging( } RF_Free(raidPtr->parityBufferPool.buffers, raidPtr->regionBufferPool.totalBuffers * - sizeof(caddr_t)); + sizeof(void *)); return (ENOMEM); } printf("parityBufferPool.buffers[%d] = %lx\n", i, @@ -548,7 +548,7 @@ FreeRegionBufferQueue(RF_RegionBufferQueue_t * queue) } for (i = 0; i < queue->totalBuffers; i++) RF_Free(queue->buffers[i], queue->bufferSize); - RF_Free(queue->buffers, queue->totalBuffers * sizeof(caddr_t)); + RF_Free(queue->buffers, queue->totalBuffers * sizeof(void *)); RF_UNLOCK_MUTEX(queue->mutex); } diff --git a/sys/dev/raidframe/rf_raid.h b/sys/dev/raidframe/rf_raid.h index a10feb4511f..4ddb13be711 100644 --- a/sys/dev/raidframe/rf_raid.h +++ b/sys/dev/raidframe/rf_raid.h @@ -1,4 +1,4 @@ -/* $NetBSD: rf_raid.h,v 1.35 2005/12/11 12:23:37 christos Exp $ */ +/* $NetBSD: rf_raid.h,v 1.36 2007/03/04 06:02:39 christos Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -292,7 +292,7 @@ struct RF_Raid_s { * region log */ RF_RegionBufferQueue_t parityBufferPool; /* buffers for holding * parity */ - caddr_t parityLogBufferHeap; /* pool of unused parity logs */ + void *parityLogBufferHeap; /* pool of unused parity logs */ RF_Thread_t pLogDiskThreadHandle; #endif /* RF_INCLUDE_PARITYLOGGING > 0 */ diff --git a/sys/dev/raidframe/rf_raid1.c b/sys/dev/raidframe/rf_raid1.c index abe5aeed745..b6f67987278 100644 --- a/sys/dev/raidframe/rf_raid1.c +++ b/sys/dev/raidframe/rf_raid1.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf_raid1.c,v 1.29 2006/11/16 01:33:23 christos Exp $ */ +/* $NetBSD: rf_raid1.c,v 1.30 2007/03/04 06:02:39 christos Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -33,7 +33,7 @@ *****************************************************************************/ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: rf_raid1.c,v 1.29 2006/11/16 01:33:23 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rf_raid1.c,v 1.30 2007/03/04 06:02:39 christos Exp $"); #include "rf_raid.h" #include "rf_raid1.h" @@ -554,7 +554,7 @@ rf_SubmitReconBufferRAID1(RF_ReconBuffer_t *rbuf, int keep_it, RF_CallbackDesc_t *cb, *p; RF_ReconBuffer_t *t; RF_Raid_t *raidPtr; - caddr_t ta; + void *ta; retcode = 0; @@ -573,12 +573,11 @@ rf_SubmitReconBufferRAID1(RF_ReconBuffer_t *rbuf, int keep_it, } #endif if (rf_reconDebug) { + unsigned char *b = rbuf->buffer; printf("RAID1 reconbuffer submit psid %ld buf %lx\n", (long) rbuf->parityStripeID, (long) rbuf->buffer); printf("RAID1 psid %ld %02x %02x %02x %02x %02x\n", - (long) rbuf->parityStripeID, - rbuf->buffer[0], rbuf->buffer[1], rbuf->buffer[2], rbuf->buffer[3], - rbuf->buffer[4]); + (long)rbuf->parityStripeID, b[0], b[1], b[2], b[3], b[4]); } RF_LOCK_PSS_MUTEX(raidPtr, rbuf->parityStripeID); diff --git a/sys/dev/raidframe/rf_reconbuffer.c b/sys/dev/raidframe/rf_reconbuffer.c index b117c3ec9ed..b13afcb0b6d 100644 --- a/sys/dev/raidframe/rf_reconbuffer.c +++ b/sys/dev/raidframe/rf_reconbuffer.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf_reconbuffer.c,v 1.23 2005/12/11 12:23:37 christos Exp $ */ +/* $NetBSD: rf_reconbuffer.c,v 1.24 2007/03/04 06:02:39 christos Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -33,7 +33,7 @@ ***************************************************/ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: rf_reconbuffer.c,v 1.23 2005/12/11 12:23:37 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rf_reconbuffer.c,v 1.24 2007/03/04 06:02:39 christos Exp $"); #include "rf_raid.h" #include "rf_reconbuffer.h" @@ -125,7 +125,7 @@ rf_SubmitReconBufferBasic(RF_ReconBuffer_t *rbuf, int keep_it, RF_ReconParityStripeStatus_t *pssPtr; RF_ReconBuffer_t *targetRbuf, *t = NULL; /* temporary rbuf * pointers */ - caddr_t ta; /* temporary data buffer pointer */ + void *ta; /* temporary data buffer pointer */ RF_CallbackDesc_t *cb, *p; int retcode = 0; diff --git a/sys/dev/raidframe/rf_reconstruct.h b/sys/dev/raidframe/rf_reconstruct.h index 1d941bbb984..9c32deebbed 100644 --- a/sys/dev/raidframe/rf_reconstruct.h +++ b/sys/dev/raidframe/rf_reconstruct.h @@ -1,4 +1,4 @@ -/* $NetBSD: rf_reconstruct.h,v 1.22 2005/12/11 12:23:37 christos Exp $ */ +/* $NetBSD: rf_reconstruct.h,v 1.23 2007/03/04 06:02:39 christos Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -47,8 +47,8 @@ struct RF_ReconConfig_s { }; /* a reconstruction buffer */ struct RF_ReconBuffer_s { - RF_Raid_t *raidPtr; /* void * to avoid recursive includes */ - caddr_t buffer; /* points to the data */ + RF_Raid_t *raidPtr; /* void *to avoid recursive includes */ + void *buffer; /* points to the data */ RF_StripeNum_t parityStripeID; /* the parity stripe that this data * relates to */ int which_ru; /* which reconstruction unit within the PSS */ diff --git a/sys/dev/raidframe/rf_reconutil.c b/sys/dev/raidframe/rf_reconutil.c index 90878702231..6748e91d546 100644 --- a/sys/dev/raidframe/rf_reconutil.c +++ b/sys/dev/raidframe/rf_reconutil.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf_reconutil.c,v 1.27 2006/04/26 17:08:48 oster Exp $ */ +/* $NetBSD: rf_reconutil.c,v 1.28 2007/03/04 06:02:39 christos Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -31,7 +31,7 @@ ********************************************/ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: rf_reconutil.c,v 1.27 2006/04/26 17:08:48 oster Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rf_reconutil.c,v 1.28 2007/03/04 06:02:39 christos Exp $"); #include <dev/raidframe/raidframevar.h> @@ -224,7 +224,7 @@ rf_MakeReconBuffer(RF_Raid_t *raidPtr, RF_RowCol_t col, RF_RbufType_t type) u_int recon_buffer_size = rf_RaidAddressToByte(raidPtr, layoutPtr->SUsPerRU * layoutPtr->sectorsPerStripeUnit); t = pool_get(&rf_pools.reconbuffer, PR_WAITOK); - RF_Malloc(t->buffer, recon_buffer_size, (caddr_t)); + RF_Malloc(t->buffer, recon_buffer_size, (void *)); t->raidPtr = raidPtr; t->col = col; t->priority = RF_IO_RECON_PRIORITY; diff --git a/sys/dev/rasops/rasops.h b/sys/dev/rasops/rasops.h index a42c3e3283b..7b35f4c715d 100644 --- a/sys/dev/rasops/rasops.h +++ b/sys/dev/rasops/rasops.h @@ -1,4 +1,4 @@ -/* $NetBSD: rasops.h,v 1.20 2007/02/02 02:10:24 ober Exp $ */ +/* $NetBSD: rasops.h,v 1.21 2007/03/04 06:02:39 christos Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -118,7 +118,7 @@ struct rasops_info { #endif }; -#define DELTA(p, d, cast) ((p) = (cast)((caddr_t)(p) + (d))) +#define DELTA(p, d, cast) ((p) = (cast)((char *)(p) + (d))) #define CHAR_IN_FONT(c,font) \ ((c) >= (font)->firstchar && \ diff --git a/sys/dev/rasops/rasops15.c b/sys/dev/rasops/rasops15.c index 8bc26e313b3..14a8e07ac07 100644 --- a/sys/dev/rasops/rasops15.c +++ b/sys/dev/rasops/rasops15.c @@ -1,4 +1,4 @@ -/* $NetBSD: rasops15.c,v 1.14 2006/02/18 13:57:33 jmcneill Exp $ */ +/* $NetBSD: rasops15.c,v 1.15 2007/03/04 06:02:39 christos Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: rasops15.c,v 1.14 2006/02/18 13:57:33 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rasops15.c,v 1.15 2007/03/04 06:02:39 christos Exp $"); #include "opt_rasops.h" @@ -75,7 +75,7 @@ static int stamp_mutex; /* XXX see note in readme */ */ #define STAMP_SHIFT(fb,n) ((n*4-3) >= 0 ? (fb)>>(n*4-3):(fb)<<-(n*4-3)) #define STAMP_MASK (15 << 3) -#define STAMP_READ(o) (*(int32_t *)((caddr_t)stamp + (o))) +#define STAMP_READ(o) (*(int32_t *)((char *)stamp + (o))) #endif /* diff --git a/sys/dev/rasops/rasops24.c b/sys/dev/rasops/rasops24.c index b70dff1a829..6df61b4ff6f 100644 --- a/sys/dev/rasops/rasops24.c +++ b/sys/dev/rasops/rasops24.c @@ -1,4 +1,4 @@ -/* $NetBSD: rasops24.c,v 1.22 2006/01/29 21:42:41 dsl Exp $ */ +/* $NetBSD: rasops24.c,v 1.23 2007/03/04 06:02:39 christos Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: rasops24.c,v 1.22 2006/01/29 21:42:41 dsl Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rasops24.c,v 1.23 2007/03/04 06:02:39 christos Exp $"); #include "opt_rasops.h" @@ -80,7 +80,7 @@ static int stamp_mutex; /* XXX see note in readme */ */ #define STAMP_SHIFT(fb,n) ((n*4-4) >= 0 ? (fb)>>(n*4-4):(fb)<<-(n*4-4)) #define STAMP_MASK (0xf << 4) -#define STAMP_READ(o) (*(int32_t *)((caddr_t)stamp + (o))) +#define STAMP_READ(o) (*(int32_t *)((void *)stamp + (o))) /* * Initialize rasops_info struct for this colordepth. diff --git a/sys/dev/rasops/rasops8.c b/sys/dev/rasops/rasops8.c index e90fc8575c3..1fe5f08d4ec 100644 --- a/sys/dev/rasops/rasops8.c +++ b/sys/dev/rasops/rasops8.c @@ -1,4 +1,4 @@ -/* $NetBSD: rasops8.c,v 1.21 2006/02/18 13:57:33 jmcneill Exp $ */ +/* $NetBSD: rasops8.c,v 1.22 2007/03/04 06:02:39 christos Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: rasops8.c,v 1.21 2006/02/18 13:57:33 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rasops8.c,v 1.22 2007/03/04 06:02:39 christos Exp $"); #include "opt_rasops.h" @@ -73,7 +73,7 @@ static int stamp_mutex; /* XXX see note in README */ */ #define STAMP_SHIFT(fb,n) ((n*4-2) >= 0 ? (fb)>>(n*4-2):(fb)<<-(n*4-2)) #define STAMP_MASK (0xf << 2) -#define STAMP_READ(o) (*(int32_t *)((caddr_t)stamp + (o))) +#define STAMP_READ(o) (*(int32_t *)((char *)stamp + (o))) /* * Initialize a 'rasops_info' descriptor for this depth. diff --git a/sys/dev/rcons/raster.h b/sys/dev/rcons/raster.h index 28f1c2271a9..6f77dc58b03 100644 --- a/sys/dev/rcons/raster.h +++ b/sys/dev/rcons/raster.h @@ -1,4 +1,4 @@ -/* $NetBSD: raster.h,v 1.7 2005/12/11 12:23:44 christos Exp $ */ +/* $NetBSD: raster.h,v 1.8 2007/03/04 06:02:39 christos Exp $ */ /*- * Copyright (c) 1991, 1993 @@ -84,7 +84,7 @@ struct raster { int depth; /* bits per pixel - 1, 2, or 8 */ int linelongs; /* longs from one line to the next - for padding */ u_int32_t *pixels; /* pointer to the actual bits */ - caddr_t data; /* special pointer for frame buffers and subregions */ + void *data; /* special pointer for frame buffers and subregions */ }; /* Colormap struct. */ diff --git a/sys/dev/rcons/raster_text.c b/sys/dev/rcons/raster_text.c index 30d14977fcf..6a94fab1a38 100644 --- a/sys/dev/rcons/raster_text.c +++ b/sys/dev/rcons/raster_text.c @@ -1,4 +1,4 @@ -/* $NetBSD: raster_text.c,v 1.8 2005/12/11 12:23:44 christos Exp $ */ +/* $NetBSD: raster_text.c,v 1.9 2007/03/04 06:02:39 christos Exp $ */ /*- * Copyright (c) 1991, 1993 @@ -40,7 +40,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: raster_text.c,v 1.8 2005/12/11 12:23:44 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: raster_text.c,v 1.9 2007/03/04 06:02:39 christos Exp $"); #include <sys/param.h> #ifdef _KERNEL @@ -242,7 +242,7 @@ raster_alloc( width, height, depth ) r->depth = depth; r->linelongs = linelongs; r->pixels = (u_int32_t*) (r + 1); - r->data = (caddr_t) 0; + r->data = (void *) 0; return r; } #endif diff --git a/sys/dev/rcons/rcons_kern.c b/sys/dev/rcons/rcons_kern.c index a91603803b3..5c0476ad158 100644 --- a/sys/dev/rcons/rcons_kern.c +++ b/sys/dev/rcons/rcons_kern.c @@ -1,4 +1,4 @@ -/* $NetBSD: rcons_kern.c,v 1.17 2005/12/11 12:23:44 christos Exp $ */ +/* $NetBSD: rcons_kern.c,v 1.18 2007/03/04 06:02:39 christos Exp $ */ /* * Copyright (c) 1991, 1993 @@ -41,7 +41,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: rcons_kern.c,v 1.17 2005/12/11 12:23:44 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rcons_kern.c,v 1.18 2007/03/04 06:02:39 christos Exp $"); #include <sys/param.h> #include <sys/device.h> @@ -108,7 +108,7 @@ rcons_output(tp) if (tp->t_outq.c_cc <= tp->t_lowat) { if (tp->t_state&TS_ASLEEP) { tp->t_state &= ~TS_ASLEEP; - wakeup((caddr_t)&tp->t_outq); + wakeup((void *)&tp->t_outq); } selwakeup(&tp->t_wsel); } diff --git a/sys/dev/rnd.c b/sys/dev/rnd.c index d40bfc23d24..a990c62b325 100644 --- a/sys/dev/rnd.c +++ b/sys/dev/rnd.c @@ -1,4 +1,4 @@ -/* $NetBSD: rnd.c,v 1.60 2007/01/05 16:38:13 elad Exp $ */ +/* $NetBSD: rnd.c,v 1.61 2007/03/04 06:01:43 christos Exp $ */ /*- * Copyright (c) 1997 The NetBSD Foundation, Inc. @@ -38,7 +38,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: rnd.c,v 1.60 2007/01/05 16:38:13 elad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rnd.c,v 1.61 2007/03/04 06:01:43 christos Exp $"); #include <sys/param.h> #include <sys/ioctl.h> @@ -434,7 +434,7 @@ rndread(dev_t dev, struct uio *uio, int ioflag) * If an error occurs, or this is a partial * read, bail out. */ - ret = uiomove((caddr_t)bf, nread, uio); + ret = uiomove((void *)bf, nread, uio); if (ret != 0 || nread != n) goto out; } @@ -463,7 +463,7 @@ rndwrite(dev_t dev, struct uio *uio, int ioflag) while (uio->uio_resid > 0) { n = min(RND_TEMP_BUFFER_SIZE, uio->uio_resid); - ret = uiomove((caddr_t)bf, n, uio); + ret = uiomove((void *)bf, n, uio); if (ret != 0) break; @@ -482,7 +482,7 @@ rndwrite(dev_t dev, struct uio *uio, int ioflag) } int -rndioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, +rndioctl(dev_t dev, u_long cmd, void *addr, int flag, struct lwp *l) { rndsource_element_t *rse; diff --git a/sys/dev/sbus/be.c b/sys/dev/sbus/be.c index 3b09de09359..6b81771ff04 100644 --- a/sys/dev/sbus/be.c +++ b/sys/dev/sbus/be.c @@ -1,4 +1,4 @@ -/* $NetBSD: be.c,v 1.50 2006/11/24 19:46:59 christos Exp $ */ +/* $NetBSD: be.c,v 1.51 2007/03/04 06:02:39 christos Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -64,7 +64,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: be.c,v 1.50 2006/11/24 19:46:59 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: be.c,v 1.51 2007/03/04 06:02:39 christos Exp $"); #include "opt_ddb.h" #include "opt_inet.h" @@ -173,7 +173,7 @@ void beinit(struct be_softc *); void bestart(struct ifnet *); void bestop(struct be_softc *); void bewatchdog(struct ifnet *); -int beioctl(struct ifnet *, u_long, caddr_t); +int beioctl(struct ifnet *, u_long, void *); void bereset(struct be_softc *); int beintr(void *); @@ -495,7 +495,7 @@ be_put(sc, idx, m) { struct mbuf *n; int len, tlen = 0, boff = 0; - caddr_t bp; + void *bp; bp = sc->sc_rb.rb_txbuf + (idx % sc->sc_rb.rb_ntbuf) * BE_PKT_BUF_SZ; @@ -505,7 +505,7 @@ be_put(sc, idx, m) MFREE(m, n); continue; } - bcopy(mtod(m, caddr_t), bp+boff, len); + bcopy(mtod(m, void *), bp+boff, len); boff += len; tlen += len; MFREE(m, n); @@ -528,7 +528,7 @@ be_get(sc, idx, totlen) struct mbuf *m; struct mbuf *top, **mp; int len, pad, boff = 0; - caddr_t bp; + void *bp; bp = sc->sc_rb.rb_rxbuf + (idx % sc->sc_rb.rb_nrbuf) * BE_PKT_BUF_SZ; @@ -559,7 +559,7 @@ be_get(sc, idx, totlen) len = MCLBYTES; } m->m_len = len = min(totlen, len); - bcopy(bp + boff, mtod(m, caddr_t), len); + bcopy(bp + boff, mtod(m, void *), len); boff += len; totlen -= len; *mp = m; @@ -983,7 +983,7 @@ int beioctl(ifp, cmd, data) struct ifnet *ifp; u_long cmd; - caddr_t data; + void *data; { struct be_softc *sc = ifp->if_softc; struct ifaddr *ifa = (struct ifaddr *)data; diff --git a/sys/dev/sbus/bpp.c b/sys/dev/sbus/bpp.c index f36b45a1b78..fc24ecdf491 100644 --- a/sys/dev/sbus/bpp.c +++ b/sys/dev/sbus/bpp.c @@ -1,4 +1,4 @@ -/* $NetBSD: bpp.c,v 1.27 2007/02/09 21:55:29 ad Exp $ */ +/* $NetBSD: bpp.c,v 1.28 2007/03/04 06:02:40 christos Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: bpp.c,v 1.27 2007/02/09 21:55:29 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: bpp.c,v 1.28 2007/03/04 06:02:40 christos Exp $"); #include <sys/param.h> #include <sys/ioctl.h> @@ -95,7 +95,7 @@ struct bpp_softc { struct sbusdev sc_sd; /* sbus device */ size_t sc_bufsz; /* temp buffer */ - caddr_t sc_buf; + void * sc_buf; int sc_error; /* bottom-half error */ int sc_flags; @@ -345,7 +345,7 @@ bppwrite(dev, uio, flags) * and start DMA. */ while (uio->uio_resid > 0) { - caddr_t bp = sc->sc_buf; + void *bp = sc->sc_buf; size_t len = min(sc->sc_bufsz, uio->uio_resid); if ((error = uiomove(bp, len, uio)) != 0) @@ -412,7 +412,7 @@ int bppioctl(dev, cmd, data, flag, l) dev_t dev; u_long cmd; - caddr_t data; + void * data; int flag; struct lwp *l; { diff --git a/sys/dev/sbus/bwtwo_sbus.c b/sys/dev/sbus/bwtwo_sbus.c index a57ee3726c5..1603110b013 100644 --- a/sys/dev/sbus/bwtwo_sbus.c +++ b/sys/dev/sbus/bwtwo_sbus.c @@ -1,4 +1,4 @@ -/* $NetBSD: bwtwo_sbus.c,v 1.18 2006/03/29 04:16:50 thorpej Exp $ */ +/* $NetBSD: bwtwo_sbus.c,v 1.19 2007/03/04 06:02:40 christos Exp $ */ /*- * Copyright (c) 1996, 1997 The NetBSD Foundation, Inc. @@ -86,7 +86,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: bwtwo_sbus.c,v 1.18 2006/03/29 04:16:50 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: bwtwo_sbus.c,v 1.19 2007/03/04 06:02:40 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -193,7 +193,7 @@ bwtwoattach_sbus(parent, self, args) sc->sc_set_video = bwtwo_set_video; if (sa->sa_npromvaddrs != 0) - sc->sc_fb.fb_pixels = (caddr_t)(u_long)sa->sa_promvaddrs[0]; + sc->sc_fb.fb_pixels = (void *)(u_long)sa->sa_promvaddrs[0]; if (isconsole && sc->sc_fb.fb_pixels == NULL) { int ramsize = fb->fb_type.fb_height * fb->fb_linebytes; if (sbus_bus_map(sa->sa_bustag, sa->sa_slot, diff --git a/sys/dev/sbus/cgsix_sbus.c b/sys/dev/sbus/cgsix_sbus.c index a29b92397df..2c0fc13d89c 100644 --- a/sys/dev/sbus/cgsix_sbus.c +++ b/sys/dev/sbus/cgsix_sbus.c @@ -1,4 +1,4 @@ -/* $NetBSD: cgsix_sbus.c,v 1.19 2006/03/29 04:16:50 thorpej Exp $ */ +/* $NetBSD: cgsix_sbus.c,v 1.20 2007/03/04 06:02:40 christos Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -41,7 +41,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: cgsix_sbus.c,v 1.19 2006/03/29 04:16:50 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cgsix_sbus.c,v 1.20 2007/03/04 06:02:40 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -197,7 +197,7 @@ cgsixattach(parent, self, aux) printf("%s: cannot map pixels\n", self->dv_xname); return; } - sc->sc_fb.fb_pixels = (caddr_t)bus_space_vaddr(sa->sa_bustag, bh); + sc->sc_fb.fb_pixels = (void *)bus_space_vaddr(sa->sa_bustag, bh); cg6attach(sc, name, isconsole); } diff --git a/sys/dev/sbus/cgthree_sbus.c b/sys/dev/sbus/cgthree_sbus.c index 13130156286..eaece7750d3 100644 --- a/sys/dev/sbus/cgthree_sbus.c +++ b/sys/dev/sbus/cgthree_sbus.c @@ -1,4 +1,4 @@ -/* $NetBSD: cgthree_sbus.c,v 1.17 2006/03/29 04:16:50 thorpej Exp $ */ +/* $NetBSD: cgthree_sbus.c,v 1.18 2007/03/04 06:02:40 christos Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -85,7 +85,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: cgthree_sbus.c,v 1.17 2006/03/29 04:16:50 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cgthree_sbus.c,v 1.18 2007/03/04 06:02:40 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -188,7 +188,7 @@ cgthreeattach_sbus(parent, self, args) name = "cgthree"; if (sa->sa_npromvaddrs != 0) - fb->fb_pixels = (caddr_t)(u_long)sa->sa_promvaddrs[0]; + fb->fb_pixels = (void *)(u_long)sa->sa_promvaddrs[0]; if (isconsole && fb->fb_pixels == NULL) { int ramsize = fb->fb_type.fb_height * fb->fb_linebytes; if (sbus_bus_map(sa->sa_bustag, diff --git a/sys/dev/sbus/dbri.c b/sys/dev/sbus/dbri.c index 16a7454b201..4710724cb8a 100644 --- a/sys/dev/sbus/dbri.c +++ b/sys/dev/sbus/dbri.c @@ -1,4 +1,4 @@ -/* $NetBSD: dbri.c,v 1.6 2006/09/24 03:54:00 jmcneill Exp $ */ +/* $NetBSD: dbri.c,v 1.7 2007/03/04 06:02:40 christos Exp $ */ /* * Copyright (C) 1997 Rudolf Koenig (rfkoenig@immd4.informatik.uni-erlangen.de) @@ -42,7 +42,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: dbri.c,v 1.6 2006/09/24 03:54:00 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dbri.c,v 1.7 2007/03/04 06:02:40 christos Exp $"); #include "audio.h" #if NAUDIO > 0 @@ -1689,7 +1689,7 @@ dbri_trigger_output(void *hdl, void *start, void *end, int blksize, struct dbri_softc *sc = hdl; unsigned long count, current, num; - count = (unsigned long)(((caddr_t)end - (caddr_t)start)); + count = (unsigned long)(((void *)end - (void *)start)); num = count / blksize; DPRINTF(("trigger_output(%lx %lx) : %d %ld %ld\n", diff --git a/sys/dev/sbus/dbrivar.h b/sys/dev/sbus/dbrivar.h index 2f5c3cbc289..1e5f05659e7 100644 --- a/sys/dev/sbus/dbrivar.h +++ b/sys/dev/sbus/dbrivar.h @@ -1,4 +1,4 @@ -/* $NetBSD: dbrivar.h,v 1.4 2006/03/09 20:44:18 macallan Exp $ */ +/* $NetBSD: dbrivar.h,v 1.5 2007/03/04 06:02:40 christos Exp $ */ /* * Copyright (C) 1997 Rudolf Koenig (rfkoenig@immd4.informatik.uni-erlangen.de) @@ -86,8 +86,8 @@ struct dbri_pipe { struct dbri_desc { int busy; - caddr_t buf; /* cpu view of buffer */ - caddr_t buf_dvma; /* device view */ + void * buf; /* cpu view of buffer */ + void * buf_dvma; /* device view */ bus_addr_t dmabase; bus_dma_segment_t dmaseg; bus_dmamap_t dmamap; @@ -118,7 +118,7 @@ struct dbri_softc { int sc_burst; /* DVMA burst size in effect */ bus_addr_t sc_dmabase; /* VA of buffer we provide */ - caddr_t sc_membase; + void * sc_membase; int sc_bufsiz; /* size of the buffer */ int sc_locked; int sc_irqp; diff --git a/sys/dev/sbus/esp_sbus.c b/sys/dev/sbus/esp_sbus.c index cc729c74d98..6a64eae01ad 100644 --- a/sys/dev/sbus/esp_sbus.c +++ b/sys/dev/sbus/esp_sbus.c @@ -1,4 +1,4 @@ -/* $NetBSD: esp_sbus.c,v 1.35 2006/03/28 17:38:34 thorpej Exp $ */ +/* $NetBSD: esp_sbus.c,v 1.36 2007/03/04 06:02:40 christos Exp $ */ /*- * Copyright (c) 1997, 1998 The NetBSD Foundation, Inc. @@ -38,7 +38,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: esp_sbus.c,v 1.35 2006/03/28 17:38:34 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: esp_sbus.c,v 1.36 2007/03/04 06:02:40 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -99,7 +99,7 @@ static void esp_wrreg1(struct ncr53c9x_softc *, int, u_char); static int esp_dma_isintr(struct ncr53c9x_softc *); static void esp_dma_reset(struct ncr53c9x_softc *); static int esp_dma_intr(struct ncr53c9x_softc *); -static int esp_dma_setup(struct ncr53c9x_softc *, caddr_t *, +static int esp_dma_setup(struct ncr53c9x_softc *, void **, size_t *, int, size_t *); static void esp_dma_go(struct ncr53c9x_softc *); static void esp_dma_stop(struct ncr53c9x_softc *); @@ -676,7 +676,7 @@ esp_dma_intr(sc) int esp_dma_setup(sc, addr, len, datain, dmasize) struct ncr53c9x_softc *sc; - caddr_t *addr; + void **addr; size_t *len; int datain; size_t *dmasize; diff --git a/sys/dev/sbus/if_le.c b/sys/dev/sbus/if_le.c index 8c0b852dddd..79ed5e9aba7 100644 --- a/sys/dev/sbus/if_le.c +++ b/sys/dev/sbus/if_le.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_le.c,v 1.32 2005/12/11 12:23:44 christos Exp $ */ +/* $NetBSD: if_le.c,v 1.33 2007/03/04 06:02:40 christos Exp $ */ /*- * Copyright (c) 1997, 1998 The NetBSD Foundation, Inc. @@ -38,7 +38,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_le.c,v 1.32 2005/12/11 12:23:44 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_le.c,v 1.33 2007/03/04 06:02:40 christos Exp $"); #include "opt_inet.h" #include "bpfilter.h" @@ -237,7 +237,7 @@ leattach_sbus(parent, self, aux) /* Map DMA buffer into kernel space */ if ((error = bus_dmamem_map(dmatag, &seg, rseg, MEMSIZE, - (caddr_t *)&sc->sc_mem, + (void **)&sc->sc_mem, BUS_DMA_NOWAIT|BUS_DMA_COHERENT)) != 0) { printf("%s: DMA buffer map error %d\n", self->dv_xname, error); diff --git a/sys/dev/sbus/if_le_ledma.c b/sys/dev/sbus/if_le_ledma.c index 44eb7cec17e..6cde6c42687 100644 --- a/sys/dev/sbus/if_le_ledma.c +++ b/sys/dev/sbus/if_le_ledma.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_le_ledma.c,v 1.26 2005/12/11 12:23:44 christos Exp $ */ +/* $NetBSD: if_le_ledma.c,v 1.27 2007/03/04 06:02:40 christos Exp $ */ /*- * Copyright (c) 1997, 1998 The NetBSD Foundation, Inc. @@ -38,7 +38,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_le_ledma.c,v 1.26 2005/12/11 12:23:44 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_le_ledma.c,v 1.27 2007/03/04 06:02:40 christos Exp $"); #include "opt_inet.h" #include "bpfilter.h" @@ -384,7 +384,7 @@ leattach_ledma(parent, self, aux) /* Map DMA buffer into kernel space */ if ((error = bus_dmamem_map(dmatag, &seg, rseg, MEMSIZE, - (caddr_t *)&sc->sc_mem, + (void **)&sc->sc_mem, BUS_DMA_NOWAIT|BUS_DMA_COHERENT)) != 0) { printf("%s @ ledma: DMA buffer map error %d\n", self->dv_xname, error); diff --git a/sys/dev/sbus/isp_sbus.c b/sys/dev/sbus/isp_sbus.c index dbec956c0d8..b82168987bb 100644 --- a/sys/dev/sbus/isp_sbus.c +++ b/sys/dev/sbus/isp_sbus.c @@ -1,4 +1,4 @@ -/* $NetBSD: isp_sbus.c,v 1.66 2006/10/15 20:50:29 martin Exp $ */ +/* $NetBSD: isp_sbus.c,v 1.67 2007/03/04 06:02:40 christos Exp $ */ /* * This driver, which is contained in NetBSD in the files: * @@ -59,7 +59,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: isp_sbus.c,v 1.66 2006/10/15 20:50:29 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: isp_sbus.c,v 1.67 2007/03/04 06:02:40 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -430,7 +430,7 @@ isp_sbus_mbxdma(struct ispsoftc *isp) } progress++; if (bus_dmamem_map(isp->isp_dmatag, &reqseg, reqrs, len, - (caddr_t *)&isp->isp_rquest, BUS_DMA_NOWAIT|BUS_DMA_COHERENT)) { + (void **)&isp->isp_rquest, BUS_DMA_NOWAIT|BUS_DMA_COHERENT)) { goto dmafail; } progress++; @@ -453,7 +453,7 @@ isp_sbus_mbxdma(struct ispsoftc *isp) } progress++; if (bus_dmamem_map(isp->isp_dmatag, &rspseg, rsprs, len, - (caddr_t *)&isp->isp_result, BUS_DMA_NOWAIT|BUS_DMA_COHERENT)) { + (void **)&isp->isp_result, BUS_DMA_NOWAIT|BUS_DMA_COHERENT)) { goto dmafail; } progress++; diff --git a/sys/dev/sbus/lebuffervar.h b/sys/dev/sbus/lebuffervar.h index 155b53a7e10..ffa638a573e 100644 --- a/sys/dev/sbus/lebuffervar.h +++ b/sys/dev/sbus/lebuffervar.h @@ -1,4 +1,4 @@ -/* $NetBSD: lebuffervar.h,v 1.4 2005/12/11 12:23:44 christos Exp $ */ +/* $NetBSD: lebuffervar.h,v 1.5 2007/03/04 06:02:40 christos Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -42,7 +42,7 @@ struct lebuf_softc { u_int sc_rev; /* revision */ int sc_node; /* PROM node ID */ int sc_burst; /* DVMA burst size in effect */ - caddr_t sc_buffer; /* VA of the buffer we provide */ + void * sc_buffer; /* VA of the buffer we provide */ int sc_bufsiz; /* Size of buffer */ int attached; /* 1: in use by `le' device */ }; diff --git a/sys/dev/sbus/magma.c b/sys/dev/sbus/magma.c index 90add73b0ab..64c3b0a09b1 100644 --- a/sys/dev/sbus/magma.c +++ b/sys/dev/sbus/magma.c @@ -1,4 +1,4 @@ -/* $NetBSD: magma.c,v 1.38 2006/10/01 20:31:51 elad Exp $ */ +/* $NetBSD: magma.c,v 1.39 2007/03/04 06:02:40 christos Exp $ */ /* * magma.c * @@ -38,7 +38,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: magma.c,v 1.38 2006/10/01 20:31:51 elad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: magma.c,v 1.39 2007/03/04 06:02:40 christos Exp $"); #if 0 #define MAGMA_DEBUG @@ -404,11 +404,11 @@ magma_attach(parent, self, aux) } /* the SVCACK* lines are daisychained */ - sc->ms_svcackr = (caddr_t)bus_space_vaddr(sa->sa_bustag, bh) + sc->ms_svcackr = (void *)bus_space_vaddr(sa->sa_bustag, bh) + card->mb_svcackr; - sc->ms_svcackt = (caddr_t)bus_space_vaddr(sa->sa_bustag, bh) + sc->ms_svcackt = (void *)bus_space_vaddr(sa->sa_bustag, bh) + card->mb_svcackt; - sc->ms_svcackm = (caddr_t)bus_space_vaddr(sa->sa_bustag, bh) + sc->ms_svcackm = (void *)bus_space_vaddr(sa->sa_bustag, bh) + card->mb_svcackm; /* @@ -430,7 +430,7 @@ magma_attach(parent, self, aux) struct cd1400 *cd = &sc->ms_cd1400[chip]; cd->cd_clock = cd_clock; - cd->cd_reg = (caddr_t)bh + card->mb_cd1400[chip]; + cd->cd_reg = (void *)bh + card->mb_cd1400[chip]; /* prom_getpropstring(node, "chiprev"); */ /* seemingly the Magma drivers just ignore the propstring */ @@ -469,7 +469,7 @@ magma_attach(parent, self, aux) for( chip = 0 ; chip < card->mb_ncd1190 ; chip++ ) { struct cd1190 *cd = &sc->ms_cd1190[chip]; - cd->cd_reg = (caddr_t)bh + card->mb_cd1190[chip]; + cd->cd_reg = (void *)bh + card->mb_cd1190[chip]; /* XXX don't know anything about these chips yet */ printf("%s: CD1190 %d addr %p (unsupported)\n", @@ -1104,7 +1104,7 @@ int mttyioctl(dev, cmd, data, flags, l) dev_t dev; u_long cmd; - caddr_t data; + void *data; int flags; struct lwp *l; { @@ -1572,7 +1572,7 @@ int mbppioctl(dev, cmd, data, flags, l) dev_t dev; u_long cmd; - caddr_t data; + void *data; int flags; struct lwp *l; { @@ -1624,7 +1624,7 @@ mbpp_rw(dev, uio, flag) int port = MAGMA_PORT(dev); struct mbpp_softc *ms = mbpp_cd.cd_devs[card]; struct mbpp_port *mp = &ms->ms_port[port]; - caddr_t buffer, ptr; + void *buffer, ptr; int buflen, cnt, len; int s, error = 0; int gotdata = 0; @@ -1757,7 +1757,7 @@ mbpp_start(arg) int mbpp_send(mp, ptr, len) struct mbpp_port *mp; - caddr_t ptr; + void *ptr; int len; { int s; @@ -1803,7 +1803,7 @@ mbpp_send(mp, ptr, len) int mbpp_recv(mp, ptr, len) struct mbpp_port *mp; - caddr_t ptr; + void *ptr; int len; { int s; diff --git a/sys/dev/sbus/magmareg.h b/sys/dev/sbus/magmareg.h index a12a9f00e56..74ea08f09dc 100644 --- a/sys/dev/sbus/magmareg.h +++ b/sys/dev/sbus/magmareg.h @@ -1,4 +1,4 @@ -/* $NetBSD: magmareg.h,v 1.11 2006/02/16 20:17:19 perry Exp $ */ +/* $NetBSD: magmareg.h,v 1.12 2007/03/04 06:02:41 christos Exp $ */ /* magmareg.h * * Copyright (c) 1998 Iain Hibbert @@ -224,7 +224,7 @@ int mbpp_match(struct device *, struct cfdata *, void *); void mbpp_attach(struct device *, struct device *, void *); void mbpp_timeout(void *); void mbpp_start(void *); -int mbpp_send(struct mbpp_port *, caddr_t, int); -int mbpp_recv(struct mbpp_port *, caddr_t, int); +int mbpp_send(struct mbpp_port *, void *, int); +int mbpp_recv(struct mbpp_port *, void *, int); int mbpp_hztoms(int); int mbpp_mstohz(int); diff --git a/sys/dev/sbus/p9100.c b/sys/dev/sbus/p9100.c index ab775c6c8bf..aeb28b98ae3 100644 --- a/sys/dev/sbus/p9100.c +++ b/sys/dev/sbus/p9100.c @@ -1,4 +1,4 @@ -/* $NetBSD: p9100.c,v 1.34 2006/09/24 03:54:00 jmcneill Exp $ */ +/* $NetBSD: p9100.c,v 1.35 2007/03/04 06:02:41 christos Exp $ */ /*- * Copyright (c) 1998, 2005, 2006 The NetBSD Foundation, Inc. @@ -45,7 +45,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: p9100.c,v 1.34 2006/09/24 03:54:00 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: p9100.c,v 1.35 2007/03/04 06:02:41 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -219,7 +219,7 @@ static int p9100_allocattr(void *, int, int, int, long *); static int p9100_putcmap(struct p9100_softc *, struct wsdisplay_cmap *); static int p9100_getcmap(struct p9100_softc *, struct wsdisplay_cmap *); -static int p9100_ioctl(void *, void *, u_long, caddr_t, int, struct lwp *); +static int p9100_ioctl(void *, void *, u_long, void *, int, struct lwp *); static paddr_t p9100_mmap(void *, void *, off_t, int); /*static int p9100_load_font(void *, void *, struct wsdisplay_font *);*/ @@ -347,7 +347,7 @@ p9100_sbus_attach(struct device *parent, struct device *self, void *args) } if (sa->sa_npromvaddrs != 0) - fb->fb_pixels = (caddr_t)sa->sa_promvaddrs[0]; + fb->fb_pixels = (void *)sa->sa_promvaddrs[0]; if (fb->fb_pixels == NULL) { if (sbus_bus_map(sc->sc_bustag, @@ -514,7 +514,7 @@ p9100open(dev_t dev, int flags, int mode, struct lwp *l) } int -p9100ioctl(dev_t dev, u_long cmd, caddr_t data, int flags, struct lwp *l) +p9100ioctl(dev_t dev, u_long cmd, void *data, int flags, struct lwp *l) { struct p9100_softc *sc = pnozz_cd.cd_devs[minor(dev)]; struct fbgattr *fba; @@ -1120,7 +1120,7 @@ p9100_putchar(void *cookie, int row, int col, u_int c, long attr) */ int -p9100_ioctl(void *v, void *vs, u_long cmd, caddr_t data, int flag, +p9100_ioctl(void *v, void *vs, u_long cmd, void *data, int flag, struct lwp *l) { struct vcons_data *vd = v; diff --git a/sys/dev/sbus/qe.c b/sys/dev/sbus/qe.c index 5f20229c400..18e0d4b63dc 100644 --- a/sys/dev/sbus/qe.c +++ b/sys/dev/sbus/qe.c @@ -1,4 +1,4 @@ -/* $NetBSD: qe.c,v 1.39 2006/09/07 02:40:33 dogcow Exp $ */ +/* $NetBSD: qe.c,v 1.40 2007/03/04 06:02:41 christos Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -73,7 +73,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: qe.c,v 1.39 2006/09/07 02:40:33 dogcow Exp $"); +__KERNEL_RCSID(0, "$NetBSD: qe.c,v 1.40 2007/03/04 06:02:41 christos Exp $"); #define QEDEBUG @@ -163,7 +163,7 @@ void qeinit(struct qe_softc *); void qestart(struct ifnet *); void qestop(struct qe_softc *); void qewatchdog(struct ifnet *); -int qeioctl(struct ifnet *, u_long, caddr_t); +int qeioctl(struct ifnet *, u_long, void *); void qereset(struct qe_softc *); int qeintr(void *); @@ -346,7 +346,7 @@ qe_get(sc, idx, totlen) struct mbuf *m; struct mbuf *top, **mp; int len, pad, boff = 0; - caddr_t bp; + void *bp; bp = sc->sc_rb.rb_rxbuf + (idx % sc->sc_rb.rb_nrbuf) * QE_PKT_BUF_SZ; @@ -376,7 +376,7 @@ qe_get(sc, idx, totlen) len = MCLBYTES; } m->m_len = len = min(totlen, len); - bcopy(bp + boff, mtod(m, caddr_t), len); + bcopy(bp + boff, mtod(m, void *), len); boff += len; totlen -= len; *mp = m; @@ -398,7 +398,7 @@ qe_put(sc, idx, m) { struct mbuf *n; int len, tlen = 0, boff = 0; - caddr_t bp; + void *bp; bp = sc->sc_rb.rb_txbuf + (idx % sc->sc_rb.rb_ntbuf) * QE_PKT_BUF_SZ; @@ -408,7 +408,7 @@ qe_put(sc, idx, m) MFREE(m, n); continue; } - bcopy(mtod(m, caddr_t), bp+boff, len); + bcopy(mtod(m, void *), bp+boff, len); boff += len; tlen += len; MFREE(m, n); @@ -919,7 +919,7 @@ int qeioctl(ifp, cmd, data) struct ifnet *ifp; u_long cmd; - caddr_t data; + void *data; { struct qe_softc *sc = ifp->if_softc; struct ifaddr *ifa = (struct ifaddr *)data; diff --git a/sys/dev/sbus/qec.c b/sys/dev/sbus/qec.c index 8ff7857c32b..63ceb459107 100644 --- a/sys/dev/sbus/qec.c +++ b/sys/dev/sbus/qec.c @@ -1,4 +1,4 @@ -/* $NetBSD: qec.c,v 1.34 2005/12/11 12:23:44 christos Exp $ */ +/* $NetBSD: qec.c,v 1.35 2007/03/04 06:02:41 christos Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: qec.c,v 1.34 2005/12/11 12:23:44 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: qec.c,v 1.35 2007/03/04 06:02:41 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -151,7 +151,7 @@ qecattach(parent, self, aux) printf("%s: attach: cannot map registers\n", self->dv_xname); return; } - sc->sc_buffer = (caddr_t)bus_space_vaddr(sa->sa_bustag, bh); + sc->sc_buffer = (void *)bus_space_vaddr(sa->sa_bustag, bh); sc->sc_bufsiz = (bus_size_t)sa->sa_reg[1].oa_size; /* Get number of on-board channels */ @@ -326,7 +326,7 @@ qec_meminit(qr, pktbufsz) { bus_addr_t txbufdma, rxbufdma; bus_addr_t dma; - caddr_t p; + void *p; unsigned int ntbuf, nrbuf, i; p = qr->rb_membase; diff --git a/sys/dev/sbus/qecvar.h b/sys/dev/sbus/qecvar.h index f6c5be0db34..7c0b1a42441 100644 --- a/sys/dev/sbus/qecvar.h +++ b/sys/dev/sbus/qecvar.h @@ -1,4 +1,4 @@ -/* $NetBSD: qecvar.h,v 1.9 2005/12/11 12:23:44 christos Exp $ */ +/* $NetBSD: qecvar.h,v 1.10 2007/03/04 06:02:41 christos Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -46,7 +46,7 @@ struct qec_softc { bus_space_handle_t sc_regs; /* QEC registers */ int sc_nchannels; /* # of channels on board */ int sc_burst; /* DVMA burst size in effect */ - caddr_t sc_buffer; /* VA of the buffer we provide */ + void * sc_buffer; /* VA of the buffer we provide */ int sc_bufsiz; /* Size of buffer */ u_int sc_msize; /* QEC buffer offset per channel */ @@ -55,14 +55,14 @@ struct qec_softc { struct qec_ring { /* Ring Descriptors */ - caddr_t rb_membase; /* Packet buffer: CPU address */ + void * rb_membase; /* Packet buffer: CPU address */ bus_addr_t rb_dmabase; /* Packet buffer: DMA address */ struct qec_xd *rb_txd; /* Transmit descriptors */ bus_addr_t rb_txddma; /* DMA address of same */ struct qec_xd *rb_rxd; /* Receive descriptors */ bus_addr_t rb_rxddma; /* DMA address of same */ - caddr_t rb_txbuf; /* Transmit buffers */ - caddr_t rb_rxbuf; /* Receive buffers */ + void * rb_txbuf; /* Transmit buffers */ + void * rb_rxbuf; /* Receive buffers */ int rb_ntbuf; /* # of transmit buffers */ int rb_nrbuf; /* # of receive buffers */ diff --git a/sys/dev/sbus/spif.c b/sys/dev/sbus/spif.c index abbab34b5ce..d8c7652ad5c 100644 --- a/sys/dev/sbus/spif.c +++ b/sys/dev/sbus/spif.c @@ -1,4 +1,4 @@ -/* $NetBSD: spif.c,v 1.9 2006/10/01 20:31:51 elad Exp $ */ +/* $NetBSD: spif.c,v 1.10 2007/03/04 06:02:41 christos Exp $ */ /* $OpenBSD: spif.c,v 1.12 2003/10/03 16:44:51 miod Exp $ */ /* @@ -41,7 +41,7 @@ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: spif.c,v 1.9 2006/10/01 20:31:51 elad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: spif.c,v 1.10 2007/03/04 06:02:41 christos Exp $"); #include "spif.h" #if NSPIF > 0 @@ -442,7 +442,7 @@ int stty_ioctl(dev, cmd, data, flags, l) dev_t dev; u_long cmd; - caddr_t data; + void *data; int flags; struct lwp *l; { @@ -1135,7 +1135,7 @@ int sbpp_ioctl(dev, cmd, data, flags, l) dev_t dev; u_long cmd; - caddr_t data; + void *data; int flags; struct lwp *l; { diff --git a/sys/dev/sbus/tcx.c b/sys/dev/sbus/tcx.c index 069f594de4e..f631708376b 100644 --- a/sys/dev/sbus/tcx.c +++ b/sys/dev/sbus/tcx.c @@ -1,4 +1,4 @@ -/* $NetBSD: tcx.c,v 1.20 2007/01/07 12:32:29 jdc Exp $ */ +/* $NetBSD: tcx.c,v 1.21 2007/03/04 06:02:41 christos Exp $ */ /* * Copyright (c) 1996,1998 The NetBSD Foundation, Inc. @@ -45,7 +45,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: tcx.c,v 1.20 2007/01/07 12:32:29 jdc Exp $"); +__KERNEL_RCSID(0, "$NetBSD: tcx.c,v 1.21 2007/03/04 06:02:41 christos Exp $"); /* * define for cg8 emulation on S24 (24-bit version of tcx) for the SS5; @@ -427,7 +427,7 @@ int tcxioctl(dev, cmd, data, flags, l) dev_t dev; u_long cmd; - caddr_t data; + void *data; int flags; struct lwp *l; { diff --git a/sys/dev/sbus/zx.c b/sys/dev/sbus/zx.c index c09c8413746..9516b4efc70 100644 --- a/sys/dev/sbus/zx.c +++ b/sys/dev/sbus/zx.c @@ -1,4 +1,4 @@ -/* $NetBSD: zx.c,v 1.18 2007/01/07 12:54:57 jdc Exp $ */ +/* $NetBSD: zx.c,v 1.19 2007/03/04 06:02:41 christos Exp $ */ /* * Copyright (c) 2002 The NetBSD Foundation, Inc. @@ -52,7 +52,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: zx.c,v 1.18 2007/01/07 12:54:57 jdc Exp $"); +__KERNEL_RCSID(0, "$NetBSD: zx.c,v 1.19 2007/03/04 06:02:41 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -184,7 +184,7 @@ zx_attach(struct device *parent, struct device *self, void *args) printf("%s: can't map bits\n", self->dv_xname); return; } - fb->fb_pixels = (caddr_t)bus_space_vaddr(bt, bh); + fb->fb_pixels = (void *)bus_space_vaddr(bt, bh); sc->sc_pixels = (u_int32_t *)fb->fb_pixels; if (sbus_bus_map(bt, sa->sa_slot, sa->sa_offset + ZX_OFF_LC_SS0_USR, @@ -298,7 +298,7 @@ zxclose(dev_t dev, int flags, int mode, struct lwp *l) } int -zxioctl(dev_t dev, u_long cmd, caddr_t data, int flags, struct lwp *l) +zxioctl(dev_t dev, u_long cmd, void *data, int flags, struct lwp *l) { struct zx_softc *sc; struct fbcmap *cm; diff --git a/sys/dev/scsipi/cd.c b/sys/dev/scsipi/cd.c index 0dad5988adb..5718379c541 100644 --- a/sys/dev/scsipi/cd.c +++ b/sys/dev/scsipi/cd.c @@ -1,4 +1,4 @@ -/* $NetBSD: cd.c,v 1.261 2007/01/14 09:29:24 martin Exp $ */ +/* $NetBSD: cd.c,v 1.262 2007/03/04 06:02:42 christos Exp $ */ /*- * Copyright (c) 1998, 2001, 2003, 2004, 2005 The NetBSD Foundation, Inc. @@ -57,7 +57,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: cd.c,v 1.261 2007/01/14 09:29:24 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cd.c,v 1.262 2007/03/04 06:02:42 christos Exp $"); #include "rnd.h" @@ -766,7 +766,7 @@ cdstart(struct scsipi_periph *periph) */ if (periph->periph_flags & PERIPH_WAITING) { periph->periph_flags &= ~PERIPH_WAITING; - wakeup((caddr_t)periph); + wakeup((void *)periph); return; } @@ -920,7 +920,7 @@ cdbounce(struct buf *bp) } if (obp->b_flags & B_READ) { /* Copy data to the final destination and free the buf. */ - memcpy(obp->b_data, bp->b_data+obp->b_rawblkno, + memcpy(obp->b_data, (char *)bp->b_data+obp->b_rawblkno, obp->b_bcount); } else { /* @@ -933,7 +933,7 @@ cdbounce(struct buf *bp) int s; /* Read part of RMW complete. */ - memcpy(bp->b_data+obp->b_rawblkno, obp->b_data, + memcpy((char *)bp->b_data+obp->b_rawblkno, obp->b_data, obp->b_bcount); /* We need to alloc a new buf. */ @@ -1185,7 +1185,7 @@ cdcachesync(struct scsipi_periph *periph, int flags) { * Knows about the internals of this device */ static int -cdioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct lwp *l) +cdioctl(dev_t dev, u_long cmd, void *addr, int flag, struct lwp *l) { struct cd_softc *cd = cd_cd.cd_devs[CDUNIT(dev)]; struct scsipi_periph *periph = cd->sc_periph; @@ -2014,7 +2014,7 @@ cdsize(dev_t dev) } static int -cddump(dev_t dev, daddr_t blkno, caddr_t va, +cddump(dev_t dev, daddr_t blkno, void *va, size_t size) { diff --git a/sys/dev/scsipi/ch.c b/sys/dev/scsipi/ch.c index 6849751a33d..964b69cab0c 100644 --- a/sys/dev/scsipi/ch.c +++ b/sys/dev/scsipi/ch.c @@ -1,4 +1,4 @@ -/* $NetBSD: ch.c,v 1.76 2006/11/16 01:33:26 christos Exp $ */ +/* $NetBSD: ch.c,v 1.77 2007/03/04 06:02:42 christos Exp $ */ /*- * Copyright (c) 1996, 1997, 1998, 1999, 2004 The NetBSD Foundation, Inc. @@ -38,7 +38,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ch.c,v 1.76 2006/11/16 01:33:26 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ch.c,v 1.77 2007/03/04 06:02:42 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -187,7 +187,7 @@ chmatch(struct device *parent, struct cfdata *match, int priority; (void)scsipi_inqmatch(&sa->sa_inqbuf, - (caddr_t)ch_patterns, sizeof(ch_patterns) / sizeof(ch_patterns[0]), + (void *)ch_patterns, sizeof(ch_patterns) / sizeof(ch_patterns[0]), sizeof(ch_patterns[0]), &priority); return (priority); @@ -343,7 +343,7 @@ chread(dev_t dev, struct uio *uio, int flags) } static int -chioctl(dev_t dev, u_long cmd, caddr_t data, int flags, struct lwp *l) +chioctl(dev_t dev, u_long cmd, void *data, int flags, struct lwp *l) { struct ch_softc *sc = ch_cd.cd_devs[CHUNIT(dev)]; int error = 0; @@ -722,7 +722,7 @@ ch_ousergetelemstatus(struct ch_softc *sc, int chet, u_int8_t *uptr) struct read_element_status_page_header *pg_hdrp; struct read_element_status_descriptor *desc; size_t size, desclen; - caddr_t data; + void *data; int avail, i, error = 0; u_int8_t user_data; @@ -813,7 +813,7 @@ ch_usergetelemstatus(struct ch_softc *sc, struct changer_volume_tag *avol, *pvol; size_t size, desclen, stddesclen, offset; int first, avail, i, error = 0; - caddr_t data; + void *data; void *uvendptr; struct changer_element_status ces; @@ -899,7 +899,7 @@ ch_usergetelemstatus(struct ch_softc *sc, } desc = (struct read_element_status_descriptor *) - (data + offset); + ((char *)data + offset); stddesclen = sizeof(struct read_element_status_descriptor); offset += desclen; diff --git a/sys/dev/scsipi/if_se.c b/sys/dev/scsipi/if_se.c index b64246d1de4..64a78ba63b3 100644 --- a/sys/dev/scsipi/if_se.c +++ b/sys/dev/scsipi/if_se.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_se.c,v 1.63 2007/01/13 18:42:45 cube Exp $ */ +/* $NetBSD: if_se.c,v 1.64 2007/03/04 06:02:42 christos Exp $ */ /* * Copyright (c) 1997 Ian W. Dall <ian.dall@dsto.defence.gov.au> @@ -59,7 +59,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_se.c,v 1.63 2007/01/13 18:42:45 cube Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_se.c,v 1.64 2007/03/04 06:02:42 christos Exp $"); #include "opt_inet.h" #include "opt_atalk.h" @@ -201,7 +201,7 @@ static void se_ifstart(struct ifnet *); static void sestart(struct scsipi_periph *); static void sedone(struct scsipi_xfer *, int); -static int se_ioctl(struct ifnet *, u_long, caddr_t); +static int se_ioctl(struct ifnet *, u_long, void *); static void sewatchdog(struct ifnet *); static inline u_int16_t ether_cmp(void *, void *); @@ -606,7 +606,7 @@ se_get(sc, data, totlen) } if (m == m0) { - caddr_t newdata = (caddr_t) + void *newdata = (void *) ALIGN(m->m_data + sizeof(struct ether_header)) - sizeof(struct ether_header); len -= newdata - m->m_data; @@ -614,7 +614,7 @@ se_get(sc, data, totlen) } m->m_len = len = min(totlen, len); - memcpy(mtod(m, caddr_t), data, len); + memcpy(mtod(m, void *), data, len); data += len; totlen -= len; @@ -973,7 +973,7 @@ static int se_ioctl(ifp, cmd, data) struct ifnet *ifp; u_long cmd; - caddr_t data; + void *data; { struct se_softc *sc = ifp->if_softc; struct ifaddr *ifa = (struct ifaddr *)data; @@ -1181,7 +1181,7 @@ int seioctl(dev, cmd, addr, flag, l) dev_t dev; u_long cmd; - caddr_t addr; + void *addr; int flag; struct lwp *l; { diff --git a/sys/dev/scsipi/scsiconf.c b/sys/dev/scsipi/scsiconf.c index 975f0fb62fc..21057d8d322 100644 --- a/sys/dev/scsipi/scsiconf.c +++ b/sys/dev/scsipi/scsiconf.c @@ -1,4 +1,4 @@ -/* $NetBSD: scsiconf.c,v 1.242 2007/02/17 17:01:29 bouyer Exp $ */ +/* $NetBSD: scsiconf.c,v 1.243 2007/03/04 06:02:42 christos Exp $ */ /*- * Copyright (c) 1998, 1999, 2004 The NetBSD Foundation, Inc. @@ -55,7 +55,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: scsiconf.c,v 1.242 2007/02/17 17:01:29 bouyer Exp $"); +__KERNEL_RCSID(0, "$NetBSD: scsiconf.c,v 1.243 2007/03/04 06:02:42 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -1007,7 +1007,7 @@ scsibusclose(dev_t dev, int flag, int fmt, } static int -scsibusioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct lwp *l) +scsibusioctl(dev_t dev, u_long cmd, void *addr, int flag, struct lwp *l) { struct scsibus_softc *sc = scsibus_cd.cd_devs[minor(dev)]; struct scsipi_channel *chan = sc->sc_channel; diff --git a/sys/dev/scsipi/scsipi_ioctl.c b/sys/dev/scsipi/scsipi_ioctl.c index bd989780c1c..1ab22369774 100644 --- a/sys/dev/scsipi/scsipi_ioctl.c +++ b/sys/dev/scsipi/scsipi_ioctl.c @@ -1,4 +1,4 @@ -/* $NetBSD: scsipi_ioctl.c,v 1.61 2006/04/14 17:33:10 christos Exp $ */ +/* $NetBSD: scsipi_ioctl.c,v 1.62 2007/03/04 06:02:43 christos Exp $ */ /*- * Copyright (c) 1998, 2004 The NetBSD Foundation, Inc. @@ -44,7 +44,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: scsipi_ioctl.c,v 1.61 2006/04/14 17:33:10 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: scsipi_ioctl.c,v 1.62 2007/03/04 06:02:43 christos Exp $"); #include "opt_compat_freebsd.h" #include "opt_compat_netbsd.h" @@ -299,7 +299,7 @@ bad: */ int scsipi_do_ioctl(struct scsipi_periph *periph, dev_t dev, u_long cmd, - caddr_t addr, int flag, struct lwp *l) + void *addr, int flag, struct lwp *l) { int error; diff --git a/sys/dev/scsipi/scsipiconf.h b/sys/dev/scsipi/scsipiconf.h index 522b3cb70cd..4a70c85d9e6 100644 --- a/sys/dev/scsipi/scsipiconf.h +++ b/sys/dev/scsipi/scsipiconf.h @@ -1,4 +1,4 @@ -/* $NetBSD: scsipiconf.h,v 1.108 2006/11/26 05:01:09 itohy Exp $ */ +/* $NetBSD: scsipiconf.h,v 1.109 2007/03/04 06:02:43 christos Exp $ */ /*- * Copyright (c) 1998, 1999, 2000, 2004 The NetBSD Foundation, Inc. @@ -204,7 +204,7 @@ struct scsipi_adapter { scsipi_adapter_req_t, void *); void (*adapt_minphys)(struct buf *); int (*adapt_ioctl)(struct scsipi_channel *, u_long, - caddr_t, int, struct proc *); + void *, int, struct proc *); int (*adapt_enable)(struct device *, int); int (*adapt_getgeom)(struct scsipi_periph *, struct disk_parms *, u_long); @@ -663,7 +663,7 @@ int scsipi_thread_call_callback(struct scsipi_channel *, void *); void scsipi_async_event(struct scsipi_channel *, scsipi_async_event_t, void *); -int scsipi_do_ioctl(struct scsipi_periph *, dev_t, u_long, caddr_t, +int scsipi_do_ioctl(struct scsipi_periph *, dev_t, u_long, void *, int, struct lwp *); void scsipi_print_xfer_mode(struct scsipi_periph *); diff --git a/sys/dev/scsipi/sd.c b/sys/dev/scsipi/sd.c index e85dd322f18..4874f834b04 100644 --- a/sys/dev/scsipi/sd.c +++ b/sys/dev/scsipi/sd.c @@ -1,4 +1,4 @@ -/* $NetBSD: sd.c,v 1.260 2007/03/03 02:44:44 jnemeth Exp $ */ +/* $NetBSD: sd.c,v 1.261 2007/03/04 06:02:43 christos Exp $ */ /*- * Copyright (c) 1998, 2003, 2004 The NetBSD Foundation, Inc. @@ -54,7 +54,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: sd.c,v 1.260 2007/03/03 02:44:44 jnemeth Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sd.c,v 1.261 2007/03/04 06:02:43 christos Exp $"); #include "opt_scsi.h" #include "rnd.h" @@ -800,7 +800,7 @@ sdstart(struct scsipi_periph *periph) */ if (periph->periph_flags & PERIPH_WAITING) { periph->periph_flags &= ~PERIPH_WAITING; - wakeup((caddr_t)periph); + wakeup((void *)periph); return; } @@ -1010,7 +1010,7 @@ sdwrite(dev_t dev, struct uio *uio, int ioflag) * Knows about the internals of this device */ static int -sdioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct lwp *l) +sdioctl(dev_t dev, u_long cmd, void *addr, int flag, struct lwp *l) { struct sd_softc *sd = sd_cd.cd_devs[SDUNIT(dev)]; struct scsipi_periph *periph = sd->sc_periph; @@ -1492,7 +1492,7 @@ static int sddoingadump; * at offset 'dumplo' into the partition. */ static int -sddump(dev_t dev, daddr_t blkno, caddr_t va, size_t size) +sddump(dev_t dev, daddr_t blkno, void *va, size_t size) { struct sd_softc *sd; /* disk unit to do the I/O */ struct disklabel *lp; /* disk's disklabel */ @@ -1598,7 +1598,7 @@ sddump(dev_t dev, daddr_t blkno, caddr_t va, size_t size) /* update block count */ totwrt -= nwrt; blkno += nwrt; - va += sectorsize * nwrt; + va = (char *)va + sectorsize * nwrt; } sddoingadump = 0; return (0); diff --git a/sys/dev/scsipi/ses.c b/sys/dev/scsipi/ses.c index 1faa867d6ab..2f1e74d9037 100644 --- a/sys/dev/scsipi/ses.c +++ b/sys/dev/scsipi/ses.c @@ -1,4 +1,4 @@ -/* $NetBSD: ses.c,v 1.37 2006/11/16 01:33:26 christos Exp $ */ +/* $NetBSD: ses.c,v 1.38 2007/03/04 06:02:44 christos Exp $ */ /* * Copyright (C) 2000 National Aeronautics & Space Administration * All rights reserved. @@ -26,7 +26,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ses.c,v 1.37 2006/11/16 01:33:26 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ses.c,v 1.38 2007/03/04 06:02:44 christos Exp $"); #include "opt_scsi.h" @@ -354,7 +354,7 @@ sesclose(dev_t dev, int flags, int fmt, } static int -sesioctl(dev_t dev, u_long cmd, caddr_t arg_addr, int flag, struct lwp *l) +sesioctl(dev_t dev, u_long cmd, void *arg_addr, int flag, struct lwp *l) { ses_encstat tmp; ses_objstat objs; @@ -365,7 +365,7 @@ sesioctl(dev_t dev, u_long cmd, caddr_t arg_addr, int flag, struct lwp *l) if (arg_addr) - addr = *((caddr_t *) arg_addr); + addr = *((void **) arg_addr); else addr = NULL; @@ -946,7 +946,7 @@ ses_getconfig(ses_softc_t *ssc) maxima = cf.Nsubenc + 1; cdp = (SesEncDesc *) storage; for (ntype = i = 0; i < maxima; i++) { - MEMZERO((caddr_t)cdp, sizeof (*cdp)); + MEMZERO((void *)cdp, sizeof (*cdp)); if (ses_enchdr((uint8_t *) sdata, amt, i, &hd)) { SES_LOG(ssc, "Cannot Extract Enclosure Header %d\n", i); SES_FREE(sdata, SCSZ); diff --git a/sys/dev/scsipi/ss.c b/sys/dev/scsipi/ss.c index d676b22f2a4..95d6b37665c 100644 --- a/sys/dev/scsipi/ss.c +++ b/sys/dev/scsipi/ss.c @@ -1,4 +1,4 @@ -/* $NetBSD: ss.c,v 1.69 2006/11/16 01:33:26 christos Exp $ */ +/* $NetBSD: ss.c,v 1.70 2007/03/04 06:02:44 christos Exp $ */ /* * Copyright (c) 1995 Kenneth Stailey. All rights reserved. @@ -31,7 +31,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ss.c,v 1.69 2006/11/16 01:33:26 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ss.c,v 1.70 2007/03/04 06:02:44 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -490,7 +490,7 @@ ssstart(struct scsipi_periph *periph) /* if a special awaits, let it proceed first */ if (periph->periph_flags & PERIPH_WAITING) { periph->periph_flags &= ~PERIPH_WAITING; - wakeup((caddr_t)periph); + wakeup((void *)periph); return; } @@ -537,7 +537,7 @@ ssdone(struct scsipi_xfer *xs, int error) * knows about the internals of this device */ int -ssioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct lwp *l) +ssioctl(dev_t dev, u_long cmd, void *addr, int flag, struct lwp *l) { struct ss_softc *ss = ss_cd.cd_devs[SSUNIT(dev)]; int error = 0; diff --git a/sys/dev/scsipi/ss_mustek.c b/sys/dev/scsipi/ss_mustek.c index d637585b3ae..5d85ba9ccd4 100644 --- a/sys/dev/scsipi/ss_mustek.c +++ b/sys/dev/scsipi/ss_mustek.c @@ -1,4 +1,4 @@ -/* $NetBSD: ss_mustek.c,v 1.35 2006/11/16 01:33:26 christos Exp $ */ +/* $NetBSD: ss_mustek.c,v 1.36 2007/03/04 06:02:44 christos Exp $ */ /* * Copyright (c) 1995 Joachim Koenig-Baltes. All rights reserved. @@ -46,7 +46,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ss_mustek.c,v 1.35 2006/11/16 01:33:26 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ss_mustek.c,v 1.36 2007/03/04 06:02:44 christos Exp $"); #include <sys/param.h> #include <sys/kernel.h> @@ -547,7 +547,7 @@ mustek_get_status(struct ss_softc *ss, int timeout, int update) (timeout-- <= 0)) break; /* please wait a second */ - tsleep((caddr_t)mustek_get_status, PRIBIO + 1, "mtkrdy", hz); + tsleep((void *)mustek_get_status, PRIBIO + 1, "mtkrdy", hz); } if (update) { diff --git a/sys/dev/scsipi/st.c b/sys/dev/scsipi/st.c index b8e1869fcee..a5ff220bc0f 100644 --- a/sys/dev/scsipi/st.c +++ b/sys/dev/scsipi/st.c @@ -1,4 +1,4 @@ -/* $NetBSD: st.c,v 1.195 2007/03/01 17:31:36 thorpej Exp $ */ +/* $NetBSD: st.c,v 1.196 2007/03/04 06:02:44 christos Exp $ */ /*- * Copyright (c) 1998, 2004 The NetBSD Foundation, Inc. @@ -57,7 +57,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: st.c,v 1.195 2007/03/01 17:31:36 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: st.c,v 1.196 2007/03/04 06:02:44 christos Exp $"); #include "opt_scsi.h" @@ -1175,7 +1175,7 @@ ststart(struct scsipi_periph *periph) /* if a special awaits, let it proceed first */ if (periph->periph_flags & PERIPH_WAITING) { periph->periph_flags &= ~PERIPH_WAITING; - wakeup((caddr_t)periph); + wakeup((void *)periph); return; } @@ -1387,7 +1387,7 @@ stwrite(dev_t dev, struct uio *uio, int iomode) * knows about the internals of this device */ static int -stioctl(dev_t dev, u_long cmd, caddr_t arg, int flag, struct lwp *l) +stioctl(dev_t dev, u_long cmd, void *arg, int flag, struct lwp *l) { int error = 0; int unit; @@ -2395,7 +2395,7 @@ bad: free(bf, M_TEMP); } static int -stdump(dev_t dev, daddr_t blkno, caddr_t va, +stdump(dev_t dev, daddr_t blkno, void *va, size_t size) { diff --git a/sys/dev/scsipi/uk.c b/sys/dev/scsipi/uk.c index 28f61295ff1..6578b04b741 100644 --- a/sys/dev/scsipi/uk.c +++ b/sys/dev/scsipi/uk.c @@ -1,4 +1,4 @@ -/* $NetBSD: uk.c,v 1.51 2006/11/16 01:33:26 christos Exp $ */ +/* $NetBSD: uk.c,v 1.52 2007/03/04 06:02:44 christos Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -42,7 +42,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: uk.c,v 1.51 2006/11/16 01:33:26 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uk.c,v 1.52 2007/03/04 06:02:44 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -217,7 +217,7 @@ ukclose(dev_t dev, int flag, int fmt, struct lwp *l) * Only does generic scsi ioctls. */ static int -ukioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct lwp *l) +ukioctl(dev_t dev, u_long cmd, void *addr, int flag, struct lwp *l) { register struct uk_softc *uk = uk_cd.cd_devs[UKUNIT(dev)]; diff --git a/sys/dev/sequencer.c b/sys/dev/sequencer.c index a28abc3c8c1..2405abb75a1 100644 --- a/sys/dev/sequencer.c +++ b/sys/dev/sequencer.c @@ -1,4 +1,4 @@ -/* $NetBSD: sequencer.c,v 1.39 2007/02/09 21:55:26 ad Exp $ */ +/* $NetBSD: sequencer.c,v 1.40 2007/03/04 06:01:43 christos Exp $ */ /* * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: sequencer.c,v 1.39 2007/02/09 21:55:26 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sequencer.c,v 1.40 2007/03/04 06:01:43 christos Exp $"); #include "sequencer.h" @@ -460,7 +460,7 @@ sequencerwrite(dev_t dev, struct uio *uio, int ioflag) } static int -sequencerioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, +sequencerioctl(dev_t dev, u_long cmd, void *addr, int flag, struct lwp *l) { struct sequencer_softc *sc = &seqdevs[SEQUENCERUNIT(dev)]; @@ -529,10 +529,10 @@ sequencerioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, case SEQUENCER_OUTOFBAND: DPRINTFN(3, ("sequencer_ioctl: OOB=%02x %02x %02x %02x %02x %02x %02x %02x\n", - *(u_char *)addr, *(u_char *)(addr+1), - *(u_char *)(addr+2), *(u_char *)(addr+3), - *(u_char *)(addr+4), *(u_char *)(addr+5), - *(u_char *)(addr+6), *(u_char *)(addr+7))); + *(u_char *)addr, *((u_char *)addr+1), + *((u_char *)addr+2), *((u_char *)addr+3), + *((u_char *)addr+4), *((u_char *)addr+5), + *((u_char *)addr+6), *((u_char *)addr+7))); if ( !(sc->flags & FWRITE ) ) return EBADF; error = seq_do_command(sc, (seq_event_t *)addr); diff --git a/sys/dev/spi/spiflash.c b/sys/dev/spi/spiflash.c index 6bf2d30cf64..4c36b50224e 100644 --- a/sys/dev/spi/spiflash.c +++ b/sys/dev/spi/spiflash.c @@ -1,4 +1,4 @@ -/* $NetBSD: spiflash.c,v 1.2 2006/10/20 06:41:47 gdamore Exp $ */ +/* $NetBSD: spiflash.c,v 1.3 2007/03/04 06:02:44 christos Exp $ */ /*- * Copyright (c) 2006 Urbana-Champaign Independent Media Center. @@ -42,7 +42,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: spiflash.c,v 1.2 2006/10/20 06:41:47 gdamore Exp $"); +__KERNEL_RCSID(0, "$NetBSD: spiflash.c,v 1.3 2007/03/04 06:02:44 christos Exp $"); #include <sys/param.h> #include <sys/conf.h> @@ -290,7 +290,7 @@ spiflash_write(dev_t dev, struct uio *uio, int ioflag) } int -spiflash_ioctl(dev_t dev, u_long cmd, caddr_t data, int flags, struct lwp *l) +spiflash_ioctl(dev_t dev, u_long cmd, void *data, int flags, struct lwp *l) { spiflash_handle_t sc; diff --git a/sys/dev/sun/bwtwo.c b/sys/dev/sun/bwtwo.c index d1031e50d51..327bb3eaddf 100644 --- a/sys/dev/sun/bwtwo.c +++ b/sys/dev/sun/bwtwo.c @@ -1,4 +1,4 @@ -/* $NetBSD: bwtwo.c,v 1.14 2005/12/11 12:23:56 christos Exp $ */ +/* $NetBSD: bwtwo.c,v 1.15 2007/03/04 06:02:44 christos Exp $ */ /*- * Copyright (c) 1996, 1997 The NetBSD Foundation, Inc. @@ -86,7 +86,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: bwtwo.c,v 1.14 2005/12/11 12:23:56 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: bwtwo.c,v 1.15 2007/03/04 06:02:44 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -232,7 +232,7 @@ int bwtwoioctl(dev, cmd, data, flags, l) dev_t dev; u_long cmd; - caddr_t data; + void *data; int flags; struct lwp *l; { diff --git a/sys/dev/sun/cgsix.c b/sys/dev/sun/cgsix.c index 5709676afe8..6a8a9574052 100644 --- a/sys/dev/sun/cgsix.c +++ b/sys/dev/sun/cgsix.c @@ -1,4 +1,4 @@ -/* $NetBSD: cgsix.c,v 1.33 2006/10/16 22:27:16 macallan Exp $ */ +/* $NetBSD: cgsix.c,v 1.34 2007/03/04 06:02:44 christos Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -85,7 +85,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: cgsix.c,v 1.33 2006/10/16 22:27:16 macallan Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cgsix.c,v 1.34 2007/03/04 06:02:44 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -167,7 +167,7 @@ struct wsscreen_descr cgsix_defaultscreen = { NULL /* modecookie */ }; -static int cgsix_ioctl(void *, void *, u_long, caddr_t, int, struct lwp *); +static int cgsix_ioctl(void *, void *, u_long, void *, int, struct lwp *); static paddr_t cgsix_mmap(void *, void *, off_t, int); static void cgsix_init_screen(void *, struct vcons_screen *, int, long *); @@ -704,7 +704,7 @@ cgsixclose(dev_t dev, int flags, int mode, struct lwp *l) } int -cgsixioctl(dev_t dev, u_long cmd, caddr_t data, int flags, struct lwp *l) +cgsixioctl(dev_t dev, u_long cmd, void *data, int flags, struct lwp *l) { struct cgsix_softc *sc = cgsix_cd.cd_devs[minor(dev)]; union cursor_cmap tcm; @@ -1128,7 +1128,7 @@ cg6_setup_palette(struct cgsix_softc *sc) } int -cgsix_ioctl(void *v, void *vs, u_long cmd, caddr_t data, int flag, +cgsix_ioctl(void *v, void *vs, u_long cmd, void *data, int flag, struct lwp *l) { /* we'll probably need to add more stuff here */ diff --git a/sys/dev/sun/cgthree.c b/sys/dev/sun/cgthree.c index 89816ae46fd..b5e42350903 100644 --- a/sys/dev/sun/cgthree.c +++ b/sys/dev/sun/cgthree.c @@ -1,4 +1,4 @@ -/* $NetBSD: cgthree.c,v 1.12 2005/12/11 12:23:56 christos Exp $ */ +/* $NetBSD: cgthree.c,v 1.13 2007/03/04 06:02:45 christos Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -45,7 +45,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: cgthree.c,v 1.12 2005/12/11 12:23:56 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cgthree.c,v 1.13 2007/03/04 06:02:45 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -178,7 +178,7 @@ int cgthreeioctl(dev, cmd, data, flags, l) dev_t dev; u_long cmd; - caddr_t data; + void *data; int flags; struct lwp *l; { diff --git a/sys/dev/sun/event.c b/sys/dev/sun/event.c index 0ff33a8f63c..0ef1e48e3c4 100644 --- a/sys/dev/sun/event.c +++ b/sys/dev/sun/event.c @@ -1,4 +1,4 @@ -/* $NetBSD: event.c,v 1.19 2007/02/17 22:31:42 pavel Exp $ */ +/* $NetBSD: event.c,v 1.20 2007/03/04 06:02:45 christos Exp $ */ /* * Copyright (c) 1992, 1993 @@ -45,7 +45,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: event.c,v 1.19 2007/02/17 22:31:42 pavel Exp $"); +__KERNEL_RCSID(0, "$NetBSD: event.c,v 1.20 2007/03/04 06:02:45 christos Exp $"); #include <sys/param.h> #include <sys/fcntl.h> @@ -109,7 +109,7 @@ ev_read(ev, uio, flags) return (EWOULDBLOCK); } ev->ev_wanted = 1; - error = tsleep((caddr_t)ev, PEVENT | PCATCH, "firm_event", 0); + error = tsleep((void *)ev, PEVENT | PCATCH, "firm_event", 0); if (error) { splx(s); return (error); @@ -130,7 +130,7 @@ ev_read(ev, uio, flags) if ((curproc->p_flag & PK_32) && ev_out32_hook != NULL) error = (*ev_out32_hook)(&ev->ev_q[ev->ev_get], cnt, uio); else - error = uiomove((caddr_t)&ev->ev_q[ev->ev_get], + error = uiomove((void *)&ev->ev_q[ev->ev_get], cnt * sizeof(struct firm_event), uio); n -= cnt; /* @@ -146,7 +146,7 @@ ev_read(ev, uio, flags) if ((curproc->p_flag & PK_32) && ev_out32_hook != NULL) error = (*ev_out32_hook)(&ev->ev_q[0], cnt, uio); else - error = uiomove((caddr_t)&ev->ev_q[0], + error = uiomove((void *)&ev->ev_q[0], cnt * sizeof(struct firm_event), uio); ev->ev_get = cnt; return (error); diff --git a/sys/dev/sun/event_var.h b/sys/dev/sun/event_var.h index 49dde963e16..3cfa736d496 100644 --- a/sys/dev/sun/event_var.h +++ b/sys/dev/sun/event_var.h @@ -1,4 +1,4 @@ -/* $NetBSD: event_var.h,v 1.10 2007/02/09 21:55:29 ad Exp $ */ +/* $NetBSD: event_var.h,v 1.11 2007/03/04 06:02:45 christos Exp $ */ /* * Copyright (c) 1992, 1993 @@ -66,7 +66,7 @@ struct evvar { selnotify(&(ev)->ev_sel, 0); \ if ((ev)->ev_wanted) { \ (ev)->ev_wanted = 0; \ - wakeup((caddr_t)(ev)); \ + wakeup((void *)(ev)); \ } \ if ((ev)->ev_async) { \ mutex_enter(&proclist_mutex); \ diff --git a/sys/dev/sun/fb.c b/sys/dev/sun/fb.c index 2b9c090cabc..fd8edbeaaf5 100644 --- a/sys/dev/sun/fb.c +++ b/sys/dev/sun/fb.c @@ -1,4 +1,4 @@ -/* $NetBSD: fb.c,v 1.26 2007/01/29 01:52:45 hubertf Exp $ */ +/* $NetBSD: fb.c,v 1.27 2007/03/04 06:02:45 christos Exp $ */ /* * Copyright (c) 1992, 1993 @@ -46,7 +46,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: fb.c,v 1.26 2007/01/29 01:52:45 hubertf Exp $"); +__KERNEL_RCSID(0, "$NetBSD: fb.c,v 1.27 2007/03/04 06:02:45 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -250,7 +250,7 @@ int fbioctl(dev, cmd, data, flags, l) dev_t dev; u_long cmd; - caddr_t data; + void *data; int flags; struct lwp *l; { @@ -425,7 +425,7 @@ fbrcons_init(fb) /* Set up what rasops needs to know about */ bzero(ri, sizeof *ri); ri->ri_stride = fb->fb_linebytes; - ri->ri_bits = (caddr_t)fb->fb_pixels; + ri->ri_bits = (void *)fb->fb_pixels; ri->ri_depth = fb->fb_type.fb_depth; ri->ri_width = fb->fb_type.fb_width; ri->ri_height = fb->fb_type.fb_height; diff --git a/sys/dev/sun/fbvar.h b/sys/dev/sun/fbvar.h index ee2f435bd2c..b8c18bb3ff4 100644 --- a/sys/dev/sun/fbvar.h +++ b/sys/dev/sun/fbvar.h @@ -1,4 +1,4 @@ -/* $NetBSD: fbvar.h,v 1.10 2005/12/11 12:23:56 christos Exp $ */ +/* $NetBSD: fbvar.h,v 1.11 2007/03/04 06:02:45 christos Exp $ */ /* * Copyright (c) 1992, 1993 @@ -56,7 +56,7 @@ struct fbdriver { void (*fbd_unblank)(struct device *); int (*fbd_open)(dev_t, int, int, struct lwp *); int (*fbd_close)(dev_t, int, int, struct lwp *); - int (*fbd_ioctl)(dev_t, u_long, caddr_t, int, struct lwp *); + int (*fbd_ioctl)(dev_t, u_long, void *, int, struct lwp *); int (*fbd_poll)(dev_t, int, struct lwp *); paddr_t (*fbd_mmap)(dev_t, off_t, int); int (*fbd_kqfilter)(dev_t, struct knote *); @@ -74,7 +74,7 @@ struct fbdriver { struct fbdevice { int fb_major; /* XXX */ struct fbtype fb_type; /* what it says */ - caddr_t fb_pixels; /* display RAM */ + void * fb_pixels; /* display RAM */ int fb_linebytes; /* bytes per display line */ struct fbdriver *fb_driver; /* pointer to driver */ diff --git a/sys/dev/sun/kbd.c b/sys/dev/sun/kbd.c index 708846b8fd2..0515c12709e 100644 --- a/sys/dev/sun/kbd.c +++ b/sys/dev/sun/kbd.c @@ -1,4 +1,4 @@ -/* $NetBSD: kbd.c,v 1.57 2006/10/15 20:54:49 martin Exp $ */ +/* $NetBSD: kbd.c,v 1.58 2007/03/04 06:02:45 christos Exp $ */ /* * Copyright (c) 1992, 1993 @@ -47,7 +47,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: kbd.c,v 1.57 2006/10/15 20:54:49 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kbd.c,v 1.58 2007/03/04 06:02:45 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -93,7 +93,7 @@ const struct cdevsw kbd_cdevsw = { #if NWSKBD > 0 static int wssunkbd_enable(void *, int); static void wssunkbd_set_leds(void *, int); -static int wssunkbd_ioctl(void *, u_long, caddr_t, int, struct lwp *); +static int wssunkbd_ioctl(void *, u_long, void *, int, struct lwp *); static void sunkbd_wskbd_cngetc(void *, u_int *, int *); static void sunkbd_wskbd_cnpollc(void *, int); static void sunkbd_wskbd_cnbell(void *, u_int, u_int, u_int); @@ -266,7 +266,7 @@ kbdkqfilter(dev_t dev, struct knote *kn) } int -kbdioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct lwp *l) +kbdioctl(dev_t dev, u_long cmd, void *data, int flag, struct lwp *l) { struct kbd_softc *k; struct kbd_state *ks; @@ -958,7 +958,7 @@ wssunkbd_set_leds(void *v, int leds) } static int -wssunkbd_ioctl(void *v, u_long cmd, caddr_t data, int flag, struct lwp *l) +wssunkbd_ioctl(void *v, u_long cmd, void *data, int flag, struct lwp *l) { struct kbd_softc *k = v; diff --git a/sys/dev/sun/kbdsun.c b/sys/dev/sun/kbdsun.c index 427bfe7242c..56df0ba82b3 100644 --- a/sys/dev/sun/kbdsun.c +++ b/sys/dev/sun/kbdsun.c @@ -1,4 +1,4 @@ -/* $NetBSD: kbdsun.c,v 1.9 2005/12/11 12:23:56 christos Exp $ */ +/* $NetBSD: kbdsun.c,v 1.10 2007/03/04 06:02:45 christos Exp $ */ /* NetBSD: kbd.c,v 1.29 2001/11/13 06:54:32 lukem Exp */ /* @@ -47,7 +47,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: kbdsun.c,v 1.9 2005/12/11 12:23:56 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kbdsun.c,v 1.10 2007/03/04 06:02:45 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -136,7 +136,7 @@ kbd_sun_open(kbd) /* the wakeup for this is in kbd_sun_was_reset(). */ for (ntries = 30; ntries; ntries--) { - error = tsleep((caddr_t)&ks->kbd_id, PZERO | PCATCH, devopn, + error = tsleep((void *)&ks->kbd_id, PZERO | PCATCH, devopn, hz/10); if (ks->kbd_id) break; @@ -164,7 +164,7 @@ kbd_sun_open(kbd) /* the wakeup for this is in kbd_sun_new_layout() */ for (ntries = 200; ntries; ntries--) { - error = tsleep((caddr_t)&ks->kbd_layout, PZERO | PCATCH, + error = tsleep((void *)&ks->kbd_layout, PZERO | PCATCH, devopn, hz); if (ks->kbd_layout != 0xff || error) break; @@ -468,7 +468,7 @@ kbd_sun_was_reset(k) * On first identification, wake up anyone waiting for type * and set up the table pointers. */ - wakeup((caddr_t)&ks->kbd_id); + wakeup((void *)&ks->kbd_id); /* Restore keyclick, if necessary */ switch (ks->kbd_id) { @@ -517,7 +517,7 @@ kbd_sun_new_layout(k) * On first identification, wake up anyone waiting for type * and set up the table pointers. */ - wakeup((caddr_t)&ks->kbd_layout); + wakeup((void *)&ks->kbd_layout); /* XXX: switch decoding tables? */ } diff --git a/sys/dev/sun/ms.c b/sys/dev/sun/ms.c index 97ddf7901e5..4a3d0ea3087 100644 --- a/sys/dev/sun/ms.c +++ b/sys/dev/sun/ms.c @@ -1,4 +1,4 @@ -/* $NetBSD: ms.c,v 1.34 2006/11/12 19:00:43 plunky Exp $ */ +/* $NetBSD: ms.c,v 1.35 2007/03/04 06:02:45 christos Exp $ */ /* * Copyright (c) 1992, 1993 @@ -52,7 +52,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ms.c,v 1.34 2006/11/12 19:00:43 plunky Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ms.c,v 1.35 2007/03/04 06:02:45 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -171,7 +171,7 @@ int msioctl(dev, cmd, data, flag, l) dev_t dev; u_long cmd; - caddr_t data; + void *data; int flag; struct lwp *l; { diff --git a/sys/dev/sun/sunms.c b/sys/dev/sun/sunms.c index d9d5c22af2b..3f9b3a04532 100644 --- a/sys/dev/sun/sunms.c +++ b/sys/dev/sun/sunms.c @@ -1,4 +1,4 @@ -/* $NetBSD: sunms.c,v 1.25 2007/01/29 01:52:45 hubertf Exp $ */ +/* $NetBSD: sunms.c,v 1.26 2007/03/04 06:02:45 christos Exp $ */ /* * Copyright (c) 1992, 1993 @@ -52,7 +52,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: sunms.c,v 1.25 2007/01/29 01:52:45 hubertf Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sunms.c,v 1.26 2007/03/04 06:02:45 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -110,7 +110,7 @@ struct linesw sunms_disc = { }; int sunms_enable(void *); -int sunms_ioctl(void *, u_long, caddr_t, int, struct lwp *); +int sunms_ioctl(void *, u_long, void *, int, struct lwp *); void sunms_disable(void *); const struct wsmouse_accessops sunms_accessops = { @@ -241,7 +241,7 @@ int sunms_ioctl(v, cmd, data, flag, l) void *v; u_long cmd; - caddr_t data; + void *data; int flag; struct lwp *l; { diff --git a/sys/dev/sysmon/sysmon.c b/sys/dev/sysmon/sysmon.c index 84fd0166632..e78f9fcd7bb 100644 --- a/sys/dev/sysmon/sysmon.c +++ b/sys/dev/sysmon/sysmon.c @@ -1,4 +1,4 @@ -/* $NetBSD: sysmon.c,v 1.14 2006/11/16 01:33:26 christos Exp $ */ +/* $NetBSD: sysmon.c,v 1.15 2007/03/04 06:02:45 christos Exp $ */ /*- * Copyright (c) 2000 Zembu Labs, Inc. @@ -39,7 +39,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: sysmon.c,v 1.14 2006/11/16 01:33:26 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sysmon.c,v 1.15 2007/03/04 06:02:45 christos Exp $"); #include <sys/param.h> #include <sys/conf.h> @@ -138,7 +138,7 @@ sysmonclose(dev_t dev, int flag, int mode, struct lwp *l) * Perform a control request. */ int -sysmonioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct lwp *l) +sysmonioctl(dev_t dev, u_long cmd, void *data, int flag, struct lwp *l) { int error; diff --git a/sys/dev/sysmon/sysmon_envsys.c b/sys/dev/sysmon/sysmon_envsys.c index e06765cbbcf..c15b3c75b04 100644 --- a/sys/dev/sysmon/sysmon_envsys.c +++ b/sys/dev/sysmon/sysmon_envsys.c @@ -1,4 +1,4 @@ -/* $NetBSD: sysmon_envsys.c,v 1.16 2007/02/19 06:08:37 ad Exp $ */ +/* $NetBSD: sysmon_envsys.c,v 1.17 2007/03/04 06:02:45 christos Exp $ */ /*- * Copyright (c) 2000 Zembu Labs, Inc. @@ -41,7 +41,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: sysmon_envsys.c,v 1.16 2007/02/19 06:08:37 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sysmon_envsys.c,v 1.17 2007/03/04 06:02:45 christos Exp $"); #include <sys/param.h> #include <sys/conf.h> @@ -117,7 +117,7 @@ sysmonclose_envsys(dev_t dev, int flag, int mode, * Perform an envsys control request. */ int -sysmonioctl_envsys(dev_t dev, u_long cmd, caddr_t data, +sysmonioctl_envsys(dev_t dev, u_long cmd, void *data, int flag, struct lwp *l) { struct sysmon_envsys *sme; diff --git a/sys/dev/sysmon/sysmon_power.c b/sys/dev/sysmon/sysmon_power.c index 5fb85f59dca..bcd851cf656 100644 --- a/sys/dev/sysmon/sysmon_power.c +++ b/sys/dev/sysmon/sysmon_power.c @@ -1,4 +1,4 @@ -/* $NetBSD: sysmon_power.c,v 1.16 2007/02/19 06:08:37 ad Exp $ */ +/* $NetBSD: sysmon_power.c,v 1.17 2007/03/04 06:02:45 christos Exp $ */ /* * Copyright (c) 2003 Wasabi Systems, Inc. @@ -44,7 +44,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: sysmon_power.c,v 1.16 2007/02/19 06:08:37 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sysmon_power.c,v 1.17 2007/03/04 06:02:45 christos Exp $"); #include <sys/param.h> #include <sys/reboot.h> @@ -315,7 +315,7 @@ sysmonkqfilter_power(dev_t dev, struct knote *kn) * Perform a power managmenet control request. */ int -sysmonioctl_power(dev_t dev, u_long cmd, caddr_t data, +sysmonioctl_power(dev_t dev, u_long cmd, void *data, int flag, struct lwp *l) { int error = 0; diff --git a/sys/dev/sysmon/sysmon_wdog.c b/sys/dev/sysmon/sysmon_wdog.c index 56a9f517c55..47faea1e3b6 100644 --- a/sys/dev/sysmon/sysmon_wdog.c +++ b/sys/dev/sysmon/sysmon_wdog.c @@ -1,4 +1,4 @@ -/* $NetBSD: sysmon_wdog.c,v 1.17 2007/02/19 06:08:37 ad Exp $ */ +/* $NetBSD: sysmon_wdog.c,v 1.18 2007/03/04 06:02:45 christos Exp $ */ /*- * Copyright (c) 2000 Zembu Labs, Inc. @@ -41,7 +41,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: sysmon_wdog.c,v 1.17 2007/02/19 06:08:37 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sysmon_wdog.c,v 1.18 2007/03/04 06:02:45 christos Exp $"); #include <sys/param.h> #include <sys/conf.h> @@ -151,7 +151,7 @@ sysmonclose_wdog(dev_t dev, int flag, int mode, * Perform a watchdog control request. */ int -sysmonioctl_wdog(dev_t dev, u_long cmd, caddr_t data, int flag, +sysmonioctl_wdog(dev_t dev, u_long cmd, void *data, int flag, struct lwp *l) { struct sysmon_wdog *smw; diff --git a/sys/dev/sysmon/sysmonvar.h b/sys/dev/sysmon/sysmonvar.h index 58470d2d485..9fa56f12d88 100644 --- a/sys/dev/sysmon/sysmonvar.h +++ b/sys/dev/sysmon/sysmonvar.h @@ -1,4 +1,4 @@ -/* $NetBSD: sysmonvar.h,v 1.12 2006/07/08 20:26:06 christos Exp $ */ +/* $NetBSD: sysmonvar.h,v 1.13 2007/03/04 06:02:45 christos Exp $ */ /*- * Copyright (c) 2000 Zembu Labs, Inc. @@ -80,7 +80,7 @@ struct sysmon_envsys { int sysmonopen_envsys(dev_t, int, int, struct lwp *); int sysmonclose_envsys(dev_t, int, int, struct lwp *); -int sysmonioctl_envsys(dev_t, u_long, caddr_t, int, struct lwp *); +int sysmonioctl_envsys(dev_t, u_long, void *, int, struct lwp *); int sysmon_envsys_register(struct sysmon_envsys *); void sysmon_envsys_unregister(struct sysmon_envsys *); @@ -105,7 +105,7 @@ struct sysmon_wdog { int sysmonopen_wdog(dev_t, int, int, struct lwp *); int sysmonclose_wdog(dev_t, int, int, struct lwp *); -int sysmonioctl_wdog(dev_t, u_long, caddr_t, int, struct lwp *); +int sysmonioctl_wdog(dev_t, u_long, void *, int, struct lwp *); int sysmon_wdog_register(struct sysmon_wdog *); void sysmon_wdog_unregister(struct sysmon_wdog *); @@ -126,7 +126,7 @@ int sysmonclose_power(dev_t, int, int, struct lwp *); int sysmonread_power(dev_t, struct uio *, int); int sysmonpoll_power(dev_t, int, struct lwp *); int sysmonkqfilter_power(dev_t, struct knote *); -int sysmonioctl_power(dev_t, u_long, caddr_t, int, struct lwp *); +int sysmonioctl_power(dev_t, u_long, void *, int, struct lwp *); void sysmon_power_settype(const char *); @@ -135,6 +135,6 @@ void sysmon_pswitch_unregister(struct sysmon_pswitch *); void sysmon_pswitch_event(struct sysmon_pswitch *, int); -int sysmonioctl_envsys(dev_t, u_long, caddr_t, int, struct lwp *); +int sysmonioctl_envsys(dev_t, u_long, void *, int, struct lwp *); #endif /* _DEV_SYSMON_SYSMONVAR_H_ */ diff --git a/sys/dev/tc/asc_tc.c b/sys/dev/tc/asc_tc.c index c1f17de3352..192caa83495 100644 --- a/sys/dev/tc/asc_tc.c +++ b/sys/dev/tc/asc_tc.c @@ -1,4 +1,4 @@ -/* $NetBSD: asc_tc.c,v 1.28 2006/03/31 17:39:33 thorpej Exp $ */ +/* $NetBSD: asc_tc.c,v 1.29 2007/03/04 06:02:45 christos Exp $ */ /*- * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: asc_tc.c,v 1.28 2006/03/31 17:39:33 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: asc_tc.c,v 1.29 2007/03/04 06:02:45 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -62,14 +62,14 @@ struct asc_softc { bus_space_handle_t sc_bsh; bus_dma_tag_t sc_dmat; bus_dmamap_t sc_dmamap; - caddr_t *sc_dmaaddr; + void **sc_dmaaddr; size_t *sc_dmalen; size_t sc_dmasize; int sc_active; /* DMA active ? */ int sc_ispullup; /* DMA into main memory? */ /* XXX XXX XXX */ - caddr_t sc_base, sc_bounce, sc_target; + void *sc_base, sc_bounce, sc_target; }; static int asc_tc_match(struct device *, struct cfdata *, void *); @@ -83,7 +83,7 @@ static void asc_write_reg(struct ncr53c9x_softc *, int, u_char); static int asc_dma_isintr(struct ncr53c9x_softc *); static void asc_tc_reset(struct ncr53c9x_softc *); static int asc_tc_intr(struct ncr53c9x_softc *); -static int asc_tc_setup(struct ncr53c9x_softc *, caddr_t *, +static int asc_tc_setup(struct ncr53c9x_softc *, void **, size_t *, int, size_t *); static void asc_tc_go(struct ncr53c9x_softc *); static void asc_tc_stop(struct ncr53c9x_softc *); @@ -147,7 +147,7 @@ asc_tc_attach(struct device *parent, struct device *self, void *aux) printf("%s: unable to map device\n", sc->sc_dev.dv_xname); return; } - asc->sc_base = (caddr_t)ta->ta_addr; /* XXX XXX XXX */ + asc->sc_base = (void *)ta->ta_addr; /* XXX XXX XXX */ tc_intr_establish(parent, ta->ta_cookie, IPL_BIO, ncr53c9x_intr, sc); @@ -232,7 +232,7 @@ asc_tc_intr(struct ncr53c9x_softc *sc) } static int -asc_tc_setup(struct ncr53c9x_softc *sc, caddr_t *addr, size_t *len, +asc_tc_setup(struct ncr53c9x_softc *sc, void **addr, size_t *len, int datain, size_t *dmasize) { struct asc_softc *asc = (struct asc_softc *)sc; diff --git a/sys/dev/tc/asc_tcds.c b/sys/dev/tc/asc_tcds.c index 1dafd6dcdfe..27d4d28e670 100644 --- a/sys/dev/tc/asc_tcds.c +++ b/sys/dev/tc/asc_tcds.c @@ -1,4 +1,4 @@ -/* $NetBSD: asc_tcds.c,v 1.17 2006/05/14 21:47:00 elad Exp $ */ +/* $NetBSD: asc_tcds.c,v 1.18 2007/03/04 06:02:46 christos Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -67,7 +67,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: asc_tcds.c,v 1.17 2006/05/14 21:47:00 elad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: asc_tcds.c,v 1.18 2007/03/04 06:02:46 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -95,7 +95,7 @@ struct asc_softc { bus_space_handle_t sc_scsi_bsh; /* ASC register handle */ bus_dma_tag_t sc_dmat; /* bus DMA tag */ bus_dmamap_t sc_dmamap; /* bus dmamap */ - caddr_t *sc_dmaaddr; + void **sc_dmaaddr; size_t *sc_dmalen; size_t sc_dmasize; unsigned sc_flags; @@ -119,7 +119,7 @@ static void asc_write_reg(struct ncr53c9x_softc *, int, u_char); static int tcds_dma_isintr(struct ncr53c9x_softc *); static void tcds_dma_reset(struct ncr53c9x_softc *); static int tcds_dma_intr(struct ncr53c9x_softc *); -static int tcds_dma_setup(struct ncr53c9x_softc *, caddr_t *, +static int tcds_dma_setup(struct ncr53c9x_softc *, void **, size_t *, int, size_t *); static void tcds_dma_go(struct ncr53c9x_softc *); static void tcds_dma_stop(struct ncr53c9x_softc *); @@ -251,7 +251,7 @@ tcds_dma_reset(struct ncr53c9x_softc *sc) * start a DMA transfer or keep it going */ int -tcds_dma_setup(struct ncr53c9x_softc *sc, caddr_t *addr, size_t *len, +tcds_dma_setup(struct ncr53c9x_softc *sc, void **addr, size_t *len, int ispullup, size_t *dmasize) { struct asc_softc *asc = (struct asc_softc *)sc; diff --git a/sys/dev/tc/ascvar.h b/sys/dev/tc/ascvar.h index f2adc210fc8..4d52870b347 100644 --- a/sys/dev/tc/ascvar.h +++ b/sys/dev/tc/ascvar.h @@ -1,4 +1,4 @@ -/* $NetBSD: ascvar.h,v 1.10 2005/12/11 12:24:00 christos Exp $ */ +/* $NetBSD: ascvar.h,v 1.11 2007/03/04 06:02:46 christos Exp $ */ /* @@ -61,7 +61,7 @@ struct asc_softc { /* Start DMA routine */ int (*dma_start)(struct asc_softc *asc, struct scsi_state *state, - caddr_t cp, int flag, int len, int off); + void *cp, int flag, int len, int off); /* End DMA routine */ void (*dma_end)(struct asc_softc *asc, struct scsi_state *state, int flag); diff --git a/sys/dev/tc/bba.c b/sys/dev/tc/bba.c index 77a9117e43b..059da05fbfb 100644 --- a/sys/dev/tc/bba.c +++ b/sys/dev/tc/bba.c @@ -1,4 +1,4 @@ -/* $NetBSD: bba.c,v 1.30 2006/03/31 07:34:31 he Exp $ */ +/* $NetBSD: bba.c,v 1.31 2007/03/04 06:02:46 christos Exp $ */ /* * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -36,7 +36,7 @@ /* maxine/alpha baseboard audio (bba) */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: bba.c,v 1.30 2006/03/31 07:34:31 he Exp $"); +__KERNEL_RCSID(0, "$NetBSD: bba.c,v 1.31 2007/03/04 06:02:46 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -74,7 +74,7 @@ struct bba_mem { struct bba_mem *next; bus_addr_t addr; bus_size_t size; - caddr_t kva; + void *kva; }; struct bba_dma_state { @@ -301,7 +301,7 @@ bba_allocm(void *addr, int direction, size_t size, struct bba_softc *sc; bus_dma_segment_t seg; int rseg; - caddr_t kva; + void *kva; struct bba_mem *m; int w; int state; @@ -353,10 +353,10 @@ bba_freem(void *addr, void *ptr, struct malloc_type *pool) struct bba_softc *sc; struct bba_mem **mp, *m; bus_dma_segment_t seg; - caddr_t kva; + void *kva; sc = addr; - kva = (caddr_t)addr; + kva = (void *)addr; for (mp = &sc->sc_mem_head; *mp && (*mp)->kva != kva; mp = &(*mp)->next) continue; @@ -630,10 +630,10 @@ bba_mappage(void *addr, void *mem, off_t offset, int prot) struct bba_softc *sc; struct bba_mem **mp; bus_dma_segment_t seg; - caddr_t kva; + void *kva; sc = addr; - kva = (caddr_t)mem; + kva = (void *)mem; for (mp = &sc->sc_mem_head; *mp && (*mp)->kva != kva; mp = &(*mp)->next) continue; diff --git a/sys/dev/tc/cfb.c b/sys/dev/tc/cfb.c index 328109e96a6..d3b31847786 100644 --- a/sys/dev/tc/cfb.c +++ b/sys/dev/tc/cfb.c @@ -1,4 +1,4 @@ -/* $NetBSD: cfb.c,v 1.50 2006/04/12 19:38:24 jmmv Exp $ */ +/* $NetBSD: cfb.c,v 1.51 2007/03/04 06:02:46 christos Exp $ */ /* * Copyright (c) 1998, 1999 Tohru Nishimura. All rights reserved. @@ -31,7 +31,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: cfb.c,v 1.50 2006/04/12 19:38:24 jmmv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cfb.c,v 1.51 2007/03/04 06:02:46 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -163,7 +163,7 @@ static const struct wsscreen_list cfb_screenlist = { sizeof(_cfb_scrlist) / sizeof(struct wsscreen_descr *), _cfb_scrlist }; -static int cfbioctl(void *, void *, u_long, caddr_t, int, struct lwp *); +static int cfbioctl(void *, void *, u_long, void *, int, struct lwp *); static paddr_t cfbmmap(void *, void *, off_t, int); static int cfb_alloc_screen(void *, const struct wsscreen_descr *, @@ -183,7 +183,7 @@ static const struct wsdisplay_accessops cfb_accessops = { int cfb_cnattach(tc_addr_t); static int cfbintr(void *); -static void cfbhwinit(caddr_t); +static void cfbhwinit(void *); static void cfb_cmap_init(struct cfb_softc *); static int get_cmap(struct cfb_softc *, struct wsdisplay_cmap *); @@ -284,7 +284,7 @@ cfbattach(struct device *parent, struct device *self, void *aux) tc_intr_establish(parent, ta->ta_cookie, IPL_TTY, cfbintr, sc); /* clear any pending interrupts */ - *(volatile u_int8_t *)((caddr_t)ri->ri_hw + CX_OFFSET_IREQ) = 0; + *(volatile u_int8_t *)((void *)ri->ri_hw + CX_OFFSET_IREQ) = 0; waa.console = console; waa.scrdata = &cfb_screenlist; @@ -313,10 +313,10 @@ cfb_cmap_init(struct cfb_softc *sc) static void cfb_common_init(struct rasops_info *ri) { - caddr_t base; + void *base; int cookie; - base = (caddr_t)ri->ri_hw; + base = (void *)ri->ri_hw; /* initialize colormap and cursor hardware */ cfbhwinit(base); @@ -359,7 +359,7 @@ cfb_common_init(struct rasops_info *ri) } static int -cfbioctl(void *v, void *vs, u_long cmd, caddr_t data, int flag, struct lwp *l) +cfbioctl(void *v, void *vs, u_long cmd, void *data, int flag, struct lwp *l) { struct cfb_softc *sc = v; struct rasops_info *ri = sc->sc_ri; @@ -503,10 +503,10 @@ static int cfbintr(void *arg) { struct cfb_softc *sc = arg; - caddr_t base, vdac; + void *base, vdac; int v; - base = (caddr_t)sc->sc_ri->ri_hw; + base = (void *)sc->sc_ri->ri_hw; *(u_int8_t *)(base + CX_OFFSET_IREQ) = 0; if (sc->sc_changed == 0) return (1); @@ -595,9 +595,9 @@ cfbintr(void *arg) } static void -cfbhwinit(caddr_t cfbbase) +cfbhwinit(void *cfbbase) { - caddr_t vdac = cfbbase + CX_BT459_OFFSET; + void *vdac = cfbbase + CX_BT459_OFFSET; const u_int8_t *p; int i; diff --git a/sys/dev/tc/if_fta.c b/sys/dev/tc/if_fta.c index 2fed679d2bf..f3800e868ce 100644 --- a/sys/dev/tc/if_fta.c +++ b/sys/dev/tc/if_fta.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_fta.c,v 1.23 2006/03/30 16:18:49 thorpej Exp $ */ +/* $NetBSD: if_fta.c,v 1.24 2007/03/04 06:02:46 christos Exp $ */ /*- * Copyright (c) 1996 Matt Thomas <matt@3am-software.com> @@ -36,7 +36,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_fta.c,v 1.23 2006/03/30 16:18:49 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_fta.c,v 1.24 2007/03/04 06:02:46 christos Exp $"); #include "opt_inet.h" @@ -81,7 +81,7 @@ static void pdq_tc_attach( struct device * const parent, struct device * const self, - void * const aux) + void *const aux) { pdq_softc_t * const sc = device_private(self); struct tc_attach_args * const ta = (struct tc_attach_args *) aux; diff --git a/sys/dev/tc/if_le_ioasic.c b/sys/dev/tc/if_le_ioasic.c index 61c5fbc039c..098050864f4 100644 --- a/sys/dev/tc/if_le_ioasic.c +++ b/sys/dev/tc/if_le_ioasic.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_le_ioasic.c,v 1.27 2006/03/31 17:39:33 thorpej Exp $ */ +/* $NetBSD: if_le_ioasic.c,v 1.28 2007/03/04 06:02:46 christos Exp $ */ /* * Copyright (c) 1996 Carnegie-Mellon University. @@ -32,7 +32,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_le_ioasic.c,v 1.27 2006/03/31 17:39:33 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_le_ioasic.c,v 1.28 2007/03/04 06:02:46 christos Exp $"); #include "opt_inet.h" @@ -113,7 +113,7 @@ le_ioasic_attach(struct device *parent, struct device *self, void *aux) tc_addr_t tca; u_int32_t ssr; int rseg; - caddr_t le_iomem; + void *le_iomem; ioasic_bst = iosc->sc_bst; ioasic_bsh = iosc->sc_bsh; @@ -190,8 +190,8 @@ le_ioasic_attach(struct device *parent, struct device *self, void *aux) void le_ioasic_copytobuf_gap2(struct lance_softc *sc, void *fromv, int boff, int len) { - volatile caddr_t buf = sc->sc_mem; - caddr_t from = fromv; + volatile void *buf = sc->sc_mem; + void *from = fromv; volatile u_int16_t *bptr; if (boff & 0x1) { @@ -215,8 +215,8 @@ le_ioasic_copytobuf_gap2(struct lance_softc *sc, void *fromv, int boff, int len) void le_ioasic_copyfrombuf_gap2(struct lance_softc *sc, void *tov, int boff, int len) { - volatile caddr_t buf = sc->sc_mem; - caddr_t to = tov; + volatile void *buf = sc->sc_mem; + void *to = tov; volatile u_int16_t *bptr; u_int16_t tmp; @@ -249,9 +249,9 @@ void le_ioasic_copytobuf_gap16(struct lance_softc *sc, void *fromv, int boff, int len) { - volatile caddr_t buf = sc->sc_mem; - caddr_t from = fromv; - caddr_t bptr; + volatile void *buf = sc->sc_mem; + void *from = fromv; + void *bptr; bptr = buf + ((boff << 1) & ~0x1f); boff &= 0xf; @@ -331,9 +331,9 @@ void le_ioasic_copyfrombuf_gap16(struct lance_softc *sc, void *tov, int boff, int len) { - volatile caddr_t buf = sc->sc_mem; - caddr_t to = tov; - caddr_t bptr; + volatile void *buf = sc->sc_mem; + void *to = tov; + void *bptr; bptr = buf + ((boff << 1) & ~0x1f); boff &= 0xf; @@ -404,8 +404,8 @@ le_ioasic_copyfrombuf_gap16(struct lance_softc *sc, void *tov, int boff, void le_ioasic_zerobuf_gap16(struct lance_softc *sc, int boff, int len) { - volatile caddr_t buf = sc->sc_mem; - caddr_t bptr; + volatile void *buf = sc->sc_mem; + void *bptr; int xfer; bptr = buf + ((boff << 1) & ~0x1f); diff --git a/sys/dev/tc/mfb.c b/sys/dev/tc/mfb.c index ef2c541445c..8440838ed17 100644 --- a/sys/dev/tc/mfb.c +++ b/sys/dev/tc/mfb.c @@ -1,4 +1,4 @@ -/* $NetBSD: mfb.c,v 1.47 2006/04/12 19:38:24 jmmv Exp $ */ +/* $NetBSD: mfb.c,v 1.48 2007/03/04 06:02:46 christos Exp $ */ /* * Copyright (c) 1998, 1999 Tohru Nishimura. All rights reserved. @@ -31,7 +31,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: mfb.c,v 1.47 2006/04/12 19:38:24 jmmv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mfb.c,v 1.48 2007/03/04 06:02:46 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -150,7 +150,7 @@ static const struct wsscreen_list mfb_screenlist = { sizeof(_mfb_scrlist) / sizeof(struct wsscreen_descr *), _mfb_scrlist }; -static int mfbioctl(void *, void *, u_long, caddr_t, int, struct lwp *); +static int mfbioctl(void *, void *, u_long, void *, int, struct lwp *); static paddr_t mfbmmap(void *, void *, off_t, int); static int mfb_alloc_screen(void *, const struct wsscreen_descr *, @@ -170,7 +170,7 @@ static const struct wsdisplay_accessops mfb_accessops = { int mfb_cnattach(tc_addr_t); static int mfbintr(void *); -static void mfbhwinit(caddr_t); +static void mfbhwinit(void *); static int set_cursor(struct mfb_softc *, struct wsdisplay_cursor *); static int get_cursor(struct mfb_softc *, struct wsdisplay_cursor *); @@ -261,9 +261,9 @@ mfbattach(struct device *parent, struct device *self, void *aux) tc_intr_establish(parent, ta->ta_cookie, IPL_TTY, mfbintr, sc); /* clear any pending interrupts */ - *(u_int8_t *)((caddr_t)ri->ri_hw + MX_IREQ_OFFSET) = 0; - junk = *(u_int8_t *)((caddr_t)ri->ri_hw + MX_IREQ_OFFSET); - *(u_int8_t *)((caddr_t)ri->ri_hw + MX_IREQ_OFFSET) = 1; + *(u_int8_t *)((void *)ri->ri_hw + MX_IREQ_OFFSET) = 0; + junk = *(u_int8_t *)((void *)ri->ri_hw + MX_IREQ_OFFSET); + *(u_int8_t *)((void *)ri->ri_hw + MX_IREQ_OFFSET) = 1; waa.console = console; waa.scrdata = &mfb_screenlist; @@ -276,10 +276,10 @@ mfbattach(struct device *parent, struct device *self, void *aux) static void mfb_common_init(struct rasops_info *ri) { - caddr_t base; + void *base; int cookie; - base = (caddr_t)ri->ri_hw; + base = (void *)ri->ri_hw; /* initialize colormap and cursor hardware */ mfbhwinit(base); @@ -322,7 +322,7 @@ mfb_common_init(struct rasops_info *ri) } static int -mfbioctl(void *v, void *vs, u_long cmd, caddr_t data, int flag, struct lwp *l) +mfbioctl(void *v, void *vs, u_long cmd, void *data, int flag, struct lwp *l) { struct mfb_softc *sc = v; struct rasops_info *ri = sc->sc_ri; @@ -466,11 +466,11 @@ static int mfbintr(void *arg) { struct mfb_softc *sc = arg; - caddr_t base, vdac, curs; + void *base, vdac, curs; int v; volatile register int junk; - base = (caddr_t)sc->sc_ri->ri_hw; + base = (void *)sc->sc_ri->ri_hw; junk = *(u_int8_t *)(base + MX_IREQ_OFFSET); #if 0 *(u_int8_t *)(base + MX_IREQ_OFFSET) = 0; @@ -557,9 +557,9 @@ mfbintr(void *arg) } static void -mfbhwinit(caddr_t mfbbase) +mfbhwinit(void *mfbbase) { - caddr_t vdac, curs; + void *vdac, curs; int i; vdac = mfbbase + MX_BT455_OFFSET; diff --git a/sys/dev/tc/px.c b/sys/dev/tc/px.c index 98f7de50b8b..934ea4421a3 100644 --- a/sys/dev/tc/px.c +++ b/sys/dev/tc/px.c @@ -1,4 +1,4 @@ -/* $NetBSD: px.c,v 1.28 2006/03/31 17:39:33 thorpej Exp $ */ +/* $NetBSD: px.c,v 1.29 2007/03/04 06:02:46 christos Exp $ */ /*- * Copyright (c) 1999, 2000, 2001 The NetBSD Foundation, Inc. @@ -41,7 +41,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: px.c,v 1.28 2006/03/31 17:39:33 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: px.c,v 1.29 2007/03/04 06:02:46 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -99,7 +99,7 @@ __KERNEL_RCSID(0, "$NetBSD: px.c,v 1.28 2006/03/31 17:39:33 thorpej Exp $"); static void px_attach(struct device *, struct device *, void *); static void px_init(struct stic_info *, int); -static int px_ioctl(struct stic_info *, u_long, caddr_t, int, +static int px_ioctl(struct stic_info *, u_long, void *, int, struct lwp *); static int px_match(struct device *, struct cfdata *, void *); @@ -165,7 +165,7 @@ px_attach(struct device *parent, struct device *self, void *aux) si->si_buf_phys + STIC_XCOMM_SIZE; v = ((v & 0xffff8000) << 3) | (v & 0x7fff); px->px_qpoll[i] = (volatile u_int32_t *) - ((caddr_t)si->si_slotbase + (v >> 9)); + ((void *)si->si_slotbase + (v >> 9)); } stic_attach(self, si, console); @@ -186,10 +186,10 @@ static void px_init(struct stic_info *si, int bootstrap) { struct pglist pglist; - caddr_t kva, bva; + void *kva, bva; paddr_t bpa; - kva = (caddr_t)si->si_slotbase; + kva = (void *)si->si_slotbase; /* * Allocate memory for the packet buffers. It must be located below @@ -202,7 +202,7 @@ px_init(struct stic_info *si, int bootstrap) * UVM won't be initialised at this point, so grab memory * directly from vm_physmem[]. */ - bva = (caddr_t)uvm_pageboot_alloc(PX_BUF_SIZE + PX_BUF_ALIGN); + bva = (void *)uvm_pageboot_alloc(PX_BUF_SIZE + PX_BUF_ALIGN); bpa = (STIC_KSEG_TO_PHYS(bva) + PX_BUF_ALIGN - 1) & ~(PX_BUF_ALIGN - 1); if (bpa + PX_BUF_SIZE > 8192*1024) @@ -319,7 +319,7 @@ px_pbuf_get(struct stic_info *si) si->si_pbuf_select ^= STIC_PACKET_SIZE; off = si->si_pbuf_select + STIC_XCOMM_SIZE; - return ((u_int32_t *)((caddr_t)si->si_buf + off)); + return ((u_int32_t *)((void *)si->si_buf + off)); } static int @@ -335,7 +335,7 @@ px_pbuf_post(struct stic_info *si, u_int32_t *buf) /* Get address of poll register for this buffer. */ v = (u_long)STIC_KSEG_TO_PHYS(buf); v = ((v & 0xffff8000) << 3) | (v & 0x7fff); - poll = (volatile u_int32_t *)((caddr_t)si->si_slotbase + (v >> 9)); + poll = (volatile u_int32_t *)((void *)si->si_slotbase + (v >> 9)); /* * Read the poll register and make sure the stamp wants to accept @@ -360,7 +360,7 @@ px_pbuf_post(struct stic_info *si, u_int32_t *buf) } static int -px_ioctl(struct stic_info *si, u_long cmd, caddr_t data, int flag, +px_ioctl(struct stic_info *si, u_long cmd, void *data, int flag, struct lwp *l) { volatile struct stic_xcomm *sxc; diff --git a/sys/dev/tc/pxg.c b/sys/dev/tc/pxg.c index 5ed876a26f3..85e6403c7f0 100644 --- a/sys/dev/tc/pxg.c +++ b/sys/dev/tc/pxg.c @@ -1,4 +1,4 @@ -/* $NetBSD: pxg.c,v 1.25 2007/01/04 18:44:46 elad Exp $ */ +/* $NetBSD: pxg.c,v 1.26 2007/03/04 06:02:46 christos Exp $ */ /*- * Copyright (c) 1999, 2000, 2001 The NetBSD Foundation, Inc. @@ -42,7 +42,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: pxg.c,v 1.25 2007/01/04 18:44:46 elad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pxg.c,v 1.26 2007/03/04 06:02:46 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -92,7 +92,7 @@ static int pxg_intr(void *); static int pxg_match(struct device *, struct cfdata *, void *); static void pxg_init(struct stic_info *); -static int pxg_ioctl(struct stic_info *, u_long, caddr_t, int, struct lwp *); +static int pxg_ioctl(struct stic_info *, u_long, void *, int, struct lwp *); static uint32_t *pxg_pbuf_get(struct stic_info *); static int pxg_pbuf_post(struct stic_info *, u_int32_t *); static int pxg_probe_planes(struct stic_info *); @@ -193,9 +193,9 @@ static void pxg_init(struct stic_info *si) { volatile u_int32_t *slot; - caddr_t kva; + void *kva; - kva = (caddr_t)si->si_slotbase; + kva = (void *)si->si_slotbase; si->si_vdac = (u_int32_t *)(kva + PXG_VDAC_OFFSET); si->si_vdac_reset = (u_int32_t *)(kva + PXG_VDAC_RESET_OFFSET); @@ -317,7 +317,7 @@ pxg_pbuf_get(struct stic_info *si) si->si_pbuf_select ^= STIC_PACKET_SIZE; off = si->si_pbuf_select + STIC_XCOMM_SIZE; - return ((u_int32_t *)((caddr_t)si->si_buf + off)); + return ((u_int32_t *)((void *)si->si_buf + off)); } static int @@ -332,7 +332,7 @@ pxg_pbuf_post(struct stic_info *si, u_int32_t *buf) /* Get address of poll register for this buffer. */ v = ((u_long)buf - (u_long)si->si_buf) >> 9; - poll = (volatile u_int32_t *)((caddr_t)si->si_slotbase + v); + poll = (volatile u_int32_t *)((void *)si->si_slotbase + v); /* * Read the poll register and make sure the stamp wants to accept @@ -357,7 +357,7 @@ pxg_pbuf_post(struct stic_info *si, u_int32_t *buf) } static int -pxg_ioctl(struct stic_info *si, u_long cmd, caddr_t data, int flag, +pxg_ioctl(struct stic_info *si, u_long cmd, void *data, int flag, struct lwp *l) { struct stic_xinfo *sxi; @@ -422,7 +422,7 @@ pxg_load_fwseg(struct stic_info *si, struct pxg_fwseg *pfs) u_int32_t *dst; u_int left, i; - dst = (u_int32_t *)((caddr_t)si->si_buf + pfs->pfs_addr); + dst = (u_int32_t *)((void *)si->si_buf + pfs->pfs_addr); src = pfs->pfs_data; for (left = pfs->pfs_compsize; left != 0; left -= 4) { diff --git a/sys/dev/tc/sfb.c b/sys/dev/tc/sfb.c index bb39505ea0d..5eee826dd3f 100644 --- a/sys/dev/tc/sfb.c +++ b/sys/dev/tc/sfb.c @@ -1,4 +1,4 @@ -/* $NetBSD: sfb.c,v 1.71 2006/04/12 19:38:24 jmmv Exp $ */ +/* $NetBSD: sfb.c,v 1.72 2007/03/04 06:02:47 christos Exp $ */ /* * Copyright (c) 1998, 1999 Tohru Nishimura. All rights reserved. @@ -31,7 +31,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: sfb.c,v 1.71 2006/04/12 19:38:24 jmmv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sfb.c,v 1.72 2007/03/04 06:02:47 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -175,7 +175,7 @@ static const struct wsscreen_list sfb_screenlist = { sizeof(_sfb_scrlist) / sizeof(struct wsscreen_descr *), _sfb_scrlist }; -static int sfbioctl(void *, void *, u_long, caddr_t, int, struct lwp *); +static int sfbioctl(void *, void *, u_long, void *, int, struct lwp *); static paddr_t sfbmmap(void *, void *, off_t, int); static int sfb_alloc_screen(void *, const struct wsscreen_descr *, @@ -195,7 +195,7 @@ static const struct wsdisplay_accessops sfb_accessops = { int sfb_cnattach(tc_addr_t); static int sfbintr(void *); -static void sfbhwinit(caddr_t); +static void sfbhwinit(void *); static void sfb_cmap_init(struct sfb_softc *); static void sfb_screenblank(struct sfb_softc *); @@ -264,7 +264,7 @@ sfbattach(struct device *parent, struct device *self, void *aux) struct tc_attach_args *ta = aux; struct rasops_info *ri; struct wsemuldisplaydev_attach_args waa; - caddr_t asic; + void *asic; int console; console = (ta->ta_addr == sfb_consaddr); @@ -296,7 +296,7 @@ sfbattach(struct device *parent, struct device *self, void *aux) tc_intr_establish(parent, ta->ta_cookie, IPL_TTY, sfbintr, sc); - asic = (caddr_t)ri->ri_hw + SFB_ASIC_OFFSET; + asic = (void *)ri->ri_hw + SFB_ASIC_OFFSET; SFBWRITE32(asic, SFB_ASIC_CLEAR_INTR, 0); SFBWRITE32(asic, SFB_ASIC_ENABLE_INTR, 1); @@ -328,10 +328,10 @@ sfb_cmap_init(struct sfb_softc *sc) static void sfb_common_init(struct rasops_info *ri) { - caddr_t base, asic; + void *base, asic; int hsetup, vsetup, vbase, cookie; - base = (caddr_t)ri->ri_hw; + base = (void *)ri->ri_hw; asic = base + SFB_ASIC_OFFSET; hsetup = *(u_int32_t *)(asic + SFB_ASIC_VIDEO_HSETUP); vsetup = *(u_int32_t *)(asic + SFB_ASIC_VIDEO_VSETUP); @@ -393,7 +393,7 @@ sfb_common_init(struct rasops_info *ri) } static int -sfbioctl(void *v, void *vs, u_long cmd, caddr_t data, int flag, struct lwp *l) +sfbioctl(void *v, void *vs, u_long cmd, void *data, int flag, struct lwp *l) { struct sfb_softc *sc = v; struct rasops_info *ri = sc->sc_ri; @@ -474,10 +474,10 @@ static void sfb_screenblank(struct sfb_softc *sc) { struct rasops_info *ri; - caddr_t asic; + void *asic; ri = sc->sc_ri; - asic = (caddr_t)ri->ri_hw + SFB_ASIC_OFFSET; + asic = (void *)ri->ri_hw + SFB_ASIC_OFFSET; SFBWRITE32(asic, SFB_ASIC_VIDEO_VALID, !sc->sc_blanked); tc_wmb(); } @@ -550,10 +550,10 @@ static int sfbintr(void *arg) { struct sfb_softc *sc = arg; - caddr_t base, asic, vdac; + void *base, asic, vdac; int v; - base = (caddr_t)sc->sc_ri->ri_hw; + base = (void *)sc->sc_ri->ri_hw; asic = base + SFB_ASIC_OFFSET; SFBWRITE32(asic, SFB_ASIC_CLEAR_INTR, 0); /* SFBWRITE32(asic, SFB_ASIC_ENABLE_INTR, 1); */ @@ -648,9 +648,9 @@ done: } static void -sfbhwinit(caddr_t base) +sfbhwinit(void *base) { - caddr_t vdac = base + SFB_RAMDAC_OFFSET; + void *vdac = base + SFB_RAMDAC_OFFSET; const u_int8_t *p; int i; @@ -876,7 +876,7 @@ set_curpos(struct sfb_softc *sc, struct wsdisplay_curpos *curpos) #if defined(alpha) #define WRITE_MB() tc_wmb() /* SFB registers replicated in 128B stride; cycle after eight iterations */ -#define BUMP(p) ((p) = (caddr_t)(((long)(p) + 0x80) & ~0x400)) +#define BUMP(p) ((p) = (void *)(((long)(p) + 0x80) & ~0x400)) #endif #define SFBMODE(p, v) \ @@ -904,7 +904,7 @@ set_curpos(struct sfb_softc *sc, struct wsdisplay_curpos *curpos) static void sfb_do_cursor(struct rasops_info *ri) { - caddr_t sfb, p; + void *sfb, p; int scanspan, height, width, align, x, y; u_int32_t lmask, rmask; @@ -919,7 +919,7 @@ sfb_do_cursor(struct rasops_info *ri) width = ri->ri_font->fontwidth + align; lmask = SFBSTIPPLEALL1 << align; rmask = SFBSTIPPLEALL1 >> (-width & SFBSTIPPLEBITMASK); - sfb = (caddr_t)ri->ri_hw + SFB_ASIC_OFFSET; + sfb = (void *)ri->ri_hw + SFB_ASIC_OFFSET; SFBMODE(sfb, MODE_TRANSPARENTSTIPPLE); SFBPLANEMASK(sfb, ~0); @@ -944,7 +944,7 @@ static void sfb_putchar(void *id, int row, int col, u_int uc, long attr) { struct rasops_info *ri = id; - caddr_t sfb, p; + void *sfb, p; int scanspan, height, width, align, x, y; u_int32_t lmask, rmask, glyph; u_int8_t *g; @@ -962,7 +962,7 @@ sfb_putchar(void *id, int row, int col, u_int uc, long attr) width = ri->ri_font->fontwidth + align; lmask = SFBSTIPPLEALL1 << align; rmask = SFBSTIPPLEALL1 >> (-width & SFBSTIPPLEBITMASK); - sfb = (caddr_t)ri->ri_hw + SFB_ASIC_OFFSET; + sfb = (void *)ri->ri_hw + SFB_ASIC_OFFSET; SFBMODE(sfb, MODE_OPAQUESTIPPLE); SFBPLANEMASK(sfb, ~0); @@ -999,7 +999,7 @@ static void sfb_copycols(void *id, int row, int srccol, int dstcol, int ncols) { struct rasops_info *ri = id; - caddr_t sp, dp, basex, sfb; + void *sp, dp, basex, sfb; int scanspan, height, width, aligns, alignd, shift, w, y; u_int32_t lmaskd, rmaskd; @@ -1013,7 +1013,7 @@ sfb_copycols(void *id, int row, int srccol, int dstcol, int ncols) aligns = (long)sp & SFBALIGNMASK; dp = basex + ri->ri_font->fontwidth * dstcol; alignd = (long)dp & SFBALIGNMASK; - sfb = (caddr_t)ri->ri_hw + SFB_ASIC_OFFSET; + sfb = (void *)ri->ri_hw + SFB_ASIC_OFFSET; SFBMODE(sfb, MODE_COPY); SFBPLANEMASK(sfb, ~0); @@ -1035,7 +1035,7 @@ sfb_copycols(void *id, int row, int srccol, int dstcol, int ncols) } /* copy forward (left-to-right) */ else if (dstcol < srccol || srccol + ncols < dstcol) { - caddr_t sq, dq; + void *sq, dq; shift = alignd - aligns; if (shift < 0) { @@ -1075,7 +1075,7 @@ sfb_copycols(void *id, int row, int srccol, int dstcol, int ncols) } /* copy backward (right-to-left) */ else { - caddr_t sq, dq; + void *sq, dq; shift = alignd - aligns; if (shift > 0) { @@ -1126,7 +1126,7 @@ static void sfb_erasecols(void *id, int row, int startcol, int ncols, long attr) { struct rasops_info *ri = id; - caddr_t sfb, p; + void *sfb, p; int scanspan, startx, height, width, align, w, y; u_int32_t lmask, rmask; @@ -1142,7 +1142,7 @@ sfb_erasecols(void *id, int row, int startcol, int ncols, long attr) width = w + align; lmask = SFBSTIPPLEALL1 << align; rmask = SFBSTIPPLEALL1 >> (-width & SFBSTIPPLEBITMASK); - sfb = (caddr_t)ri->ri_hw + SFB_ASIC_OFFSET; + sfb = (void *)ri->ri_hw + SFB_ASIC_OFFSET; SFBMODE(sfb, MODE_TRANSPARENTSTIPPLE); SFBPLANEMASK(sfb, ~0); @@ -1157,7 +1157,7 @@ sfb_erasecols(void *id, int row, int startcol, int ncols, long attr) } } else { - caddr_t q = p; + void *q = p; while (height > 0) { MEMWRITE32(p, lmask); WRITE_MB(); width -= 2 * SFBSTIPPLEBITS; @@ -1185,7 +1185,7 @@ static void sfb_copyrows(void *id, int srcrow, int dstrow, int nrows) { struct rasops_info *ri = id; - caddr_t sfb, p; + void *sfb, p; int scanspan, offset, srcy, height, width, align, w; u_int32_t lmask, rmask; @@ -1205,7 +1205,7 @@ sfb_copyrows(void *id, int srcrow, int dstrow, int nrows) width = w + align; lmask = SFBCOPYALL1 << align; rmask = SFBCOPYALL1 >> (-width & SFBCOPYBITMASK); - sfb = (caddr_t)ri->ri_hw + SFB_ASIC_OFFSET; + sfb = (void *)ri->ri_hw + SFB_ASIC_OFFSET; SFBMODE(sfb, MODE_COPY); SFBPLANEMASK(sfb, ~0); @@ -1214,7 +1214,7 @@ sfb_copyrows(void *id, int srcrow, int dstrow, int nrows) /* never happens */; } else { - caddr_t q = p; + void *q = p; while (height > 0) { MEMWRITE32(p, lmask); MEMWRITE32(p + offset, lmask); @@ -1244,7 +1244,7 @@ void sfb_eraserows(void *id, int startrow, int nrows, long attr) { struct rasops_info *ri = id; - caddr_t sfb, p; + void *sfb, p; int scanspan, starty, height, width, align, w; u_int32_t lmask, rmask; @@ -1259,7 +1259,7 @@ sfb_eraserows(void *id, int startrow, int nrows, long attr) width = w + align; lmask = SFBSTIPPLEALL1 << align; rmask = SFBSTIPPLEALL1 >> (-width & SFBSTIPPLEBITMASK); - sfb = (caddr_t)ri->ri_hw + SFB_ASIC_OFFSET; + sfb = (void *)ri->ri_hw + SFB_ASIC_OFFSET; SFBMODE(sfb, MODE_TRANSPARENTSTIPPLE); SFBPLANEMASK(sfb, ~0); @@ -1268,7 +1268,7 @@ sfb_eraserows(void *id, int startrow, int nrows, long attr) /* never happens */; } else { - caddr_t q = p; + void *q = p; while (height > 0) { MEMWRITE32(p, lmask); WRITE_MB(); width -= 2 * SFBSTIPPLEBITS; diff --git a/sys/dev/tc/sfbplus.c b/sys/dev/tc/sfbplus.c index 95fa64c1f0f..5a58ee85168 100644 --- a/sys/dev/tc/sfbplus.c +++ b/sys/dev/tc/sfbplus.c @@ -1,4 +1,4 @@ -/* $NetBSD: sfbplus.c,v 1.26 2006/04/12 19:38:24 jmmv Exp $ */ +/* $NetBSD: sfbplus.c,v 1.27 2007/03/04 06:02:47 christos Exp $ */ /* * Copyright (c) 1999, 2000, 2001 Tohru Nishimura. All rights reserved. @@ -31,7 +31,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: sfbplus.c,v 1.26 2006/04/12 19:38:24 jmmv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sfbplus.c,v 1.27 2007/03/04 06:02:47 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -98,12 +98,12 @@ struct hwcursor64 { }; struct hwops { - void (*setlut)(caddr_t, struct hwcmap256 *); - void (*getlut)(caddr_t, struct hwcmap256 *); - void (*visible)(caddr_t, int); - void (*locate)(caddr_t, struct hwcursor64 *); - void (*shape)(caddr_t, struct wsdisplay_curpos *, u_int64_t *); - void (*color)(caddr_t, u_int8_t *); + void (*setlut)(void *, struct hwcmap256 *); + void (*getlut)(void *, struct hwcmap256 *); + void (*visible)(void *, int); + void (*locate)(void *, struct hwcursor64 *); + void (*shape)(void *, struct wsdisplay_curpos *, u_int64_t *); + void (*color)(void *, u_int8_t *); }; struct sfbp_softc { @@ -149,7 +149,7 @@ static const struct wsscreen_list sfb_screenlist = { sizeof(_sfb_scrlist) / sizeof(struct wsscreen_descr *), _sfb_scrlist }; -static int sfbioctl(void *, void *, u_long, caddr_t, int, struct proc *); +static int sfbioctl(void *, void *, u_long, void *, int, struct proc *); static paddr_t sfbmmap(void *, void *, off_t, int); static int sfb_alloc_screen(void *, const struct wsscreen_descr *, @@ -171,19 +171,19 @@ static const struct wsdisplay_accessops sfb_accessops = { 0 /* load_font */ }; -static void bt459init(caddr_t); -static void bt459visible(caddr_t, int); -static void bt459locate(caddr_t, struct hwcursor64 *); -static void bt459shape(caddr_t, struct wsdisplay_curpos *, u_int64_t *); -static void bt459color(caddr_t, u_int8_t *); -static void bt459setlut(caddr_t, struct hwcmap256 *); +static void bt459init(void *); +static void bt459visible(void *, int); +static void bt459locate(void *, struct hwcursor64 *); +static void bt459shape(void *, struct wsdisplay_curpos *, u_int64_t *); +static void bt459color(void *, u_int8_t *); +static void bt459setlut(void *, struct hwcmap256 *); -static void sfbpvisible(caddr_t, int); -static void sfbplocate(caddr_t, struct hwcursor64 *); -static void sfbpshape(caddr_t, struct wsdisplay_curpos *, u_int64_t *); -static void bt463init(caddr_t); -static void bt463color(caddr_t, u_int8_t *); -static void noplut(caddr_t, struct hwcmap256 *); +static void sfbpvisible(void *, int); +static void sfbplocate(void *, struct hwcursor64 *); +static void sfbpshape(void *, struct wsdisplay_curpos *, u_int64_t *); +static void bt463init(void *); +static void bt463color(void *, u_int8_t *); +static void noplut(void *, struct hwcmap256 *); /* EXPORT */ int sfbp_cnattach(tc_addr_t); static int sfbpintr(void *); @@ -256,7 +256,7 @@ sfbpattach(struct device *parent, struct device *self, void *aux) struct tc_attach_args *ta = aux; struct rasops_info *ri; struct wsemuldisplaydev_attach_args waa; - caddr_t asic; + void *asic; int console; console = (ta->ta_addr == sfbp_consaddr); @@ -304,7 +304,7 @@ sfbpattach(struct device *parent, struct device *self, void *aux) tc_intr_establish(parent, ta->ta_cookie, IPL_TTY, sfbpintr, sc); - asic = (caddr_t)ri->ri_hw + SFB_ASIC_OFFSET; + asic = (void *)ri->ri_hw + SFB_ASIC_OFFSET; *(u_int32_t *)(asic + SFB_ASIC_CLEAR_INTR) = 0; *(u_int32_t *)(asic + SFB_ASIC_ENABLE_INTR) = 1; @@ -338,10 +338,10 @@ sfbp_cmap_init(struct sfbp_softc *sc) static void sfbp_common_init(struct rasops_info *ri) { - caddr_t base, asic; + void *base, asic; int i, depth, hsetup, vsetup, vbase, cookie; - base = (caddr_t)ri->ri_hw; + base = (void *)ri->ri_hw; asic = base + SFB_ASIC_OFFSET; hsetup = *(u_int32_t *)(asic + SFB_ASIC_VIDEO_HSETUP); vsetup = *(u_int32_t *)(asic + SFB_ASIC_VIDEO_VSETUP); @@ -428,7 +428,7 @@ sfbp_common_init(struct rasops_info *ri) } static int -sfbioctl(void *v, void *vs, u_long cmd, caddr_t data, int flag, struct proc *p) +sfbioctl(void *v, void *vs, u_long cmd, void *data, int flag, struct proc *p) { struct sfbp_softc *sc = v; struct rasops_info *ri = sc->sc_ri; @@ -575,11 +575,11 @@ sfbpintr(void *arg) { #define cc (&sc->sc_cursor) struct sfbp_softc *sc = arg; - caddr_t base, asic; + void *base, asic; u_int32_t sisr; int v; - base = (caddr_t)sc->sc_ri->ri_hw; + base = (void *)sc->sc_ri->ri_hw; asic = base + SFB_ASIC_OFFSET; sisr = *((u_int32_t *)asic + TGA_REG_SISR); *(u_int32_t *)(asic + SFB_ASIC_CLEAR_INTR) = 0; @@ -606,7 +606,7 @@ done: } static void -bt459init(caddr_t vdac) +bt459init(void *vdac) { const u_int8_t *p; int i; @@ -673,7 +673,7 @@ bt459init(caddr_t vdac) } static void -bt463init(caddr_t vdac) +bt463init(void *vdac) { int i; @@ -835,7 +835,7 @@ set_curpos(struct sfbp_softc *sc, struct wsdisplay_curpos *curpos) } static void -bt459visible(caddr_t hw, int on) +bt459visible(void *hw, int on) { hw += SFB_RAMDAC_OFFSET; SELECT(hw, BT459_IREG_CCR); @@ -844,13 +844,13 @@ bt459visible(caddr_t hw, int on) } static void -sfbpvisible(caddr_t hw, int on) +sfbpvisible(void *hw, int on) { /* XXX use SFBplus ASIC XX */ } static void -bt459locate(caddr_t hw, struct hwcursor64 *cc) +bt459locate(void *hw, struct hwcursor64 *cc) { int x, y, s; @@ -871,7 +871,7 @@ bt459locate(caddr_t hw, struct hwcursor64 *cc) } static void -sfbplocate(caddr_t hw, struct hwcursor64 *cc) +sfbplocate(void *hw, struct hwcursor64 *cc) { int x, y; @@ -884,7 +884,7 @@ sfbplocate(caddr_t hw, struct hwcursor64 *cc) } static void -bt459color(caddr_t hw, u_int8_t *cp) +bt459color(void *hw, u_int8_t *cp) { hw += SFB_RAMDAC_OFFSET; @@ -900,12 +900,12 @@ bt459color(caddr_t hw, u_int8_t *cp) } static void -bt463color(caddr_t hw, u_int8_t *cp) +bt463color(void *hw, u_int8_t *cp) { } static void -bt459shape(caddr_t hw, struct wsdisplay_curpos *size, u_int64_t *image) +bt459shape(void *hw, struct wsdisplay_curpos *size, u_int64_t *image) { u_int8_t *ip, *mp, img, msk; u_int8_t u; @@ -944,13 +944,13 @@ bt459shape(caddr_t hw, struct wsdisplay_curpos *size, u_int64_t *image) } static void -sfbpshape(caddr_t hw, struct wsdisplay_curpos *size, u_int64_t *image) +sfbpshape(void *hw, struct wsdisplay_curpos *size, u_int64_t *image) { /* XXX use SFBplus ASIC XXX */ } static void -bt459setlut(caddr_t hw, struct hwcmap265 *cm) +bt459setlut(void *hw, struct hwcmap265 *cm) { int index; @@ -964,7 +964,7 @@ bt459setlut(caddr_t hw, struct hwcmap265 *cm) } static void -noplut(caddr_t hw, struct hwcmap265 *cm) +noplut(void *hw, struct hwcmap265 *cm) { } @@ -1012,7 +1012,7 @@ noplut(caddr_t hw, struct hwcmap265 *cm) #ifdef alpha #define WRITE_MB() tc_wmb() /* registers is replicated in 1KB stride; rap round 4th iteration */ -#define BUMP(p) ((p) = (caddr_t)(((long)(p) + 0x400) & ~0x1000)) +#define BUMP(p) ((p) = (void *)(((long)(p) + 0x400) & ~0x1000)) #endif #define SFBMODE(p, v) \ @@ -1053,7 +1053,7 @@ static void sfbp_putchar(void *id, int row, int col, u_int uc, long attr) { struct rasops_info *ri = id; - caddr_t sfb, p; + void *sfb, p; int scanspan, height, width, align, x, y; u_int32_t lmask, rmask, glyph; u_int8_t *g; @@ -1072,7 +1072,7 @@ sfbp_putchar(void *id, int row, int col, u_int uc, long attr) width = ri->ri_font->fontwidth + align; lmask = SFBSTIPPLEALL1 << align; rmask = SFBSTIPPLEALL1 >> (-width & SFBSTIPPLEBITMASK); - sfb = (caddr_t)ri->ri_hw + SFB_ASIC_OFFSET; + sfb = (void *)ri->ri_hw + SFB_ASIC_OFFSET; SFBMODE(sfb, MODE_OPAQUESTIPPLE); SFBPLANEMASK(sfb, ~0); @@ -1107,7 +1107,7 @@ static void sfbp_erasecols(void *id, int row, int startcol, int ncols, long attr) { struct rasops_info *ri = id; - caddr_t sfb, p; + void *sfb, p; int scanspan, startx, height, width, align, w, y; u_int32_t lmask, rmask; @@ -1124,7 +1124,7 @@ sfbp_erasecols(void *id, int row, int startcol, int ncols, long attr) width = w + align; lmask = SFBSTIPPLEALL1 << align; rmask = SFBSTIPPLEALL1 >> (-width & SFBSTIPPLEBITMASK); - sfb = (caddr_t)ri->ri_hw + SFB_ASIC_OFFSET; + sfb = (void *)ri->ri_hw + SFB_ASIC_OFFSET; SFBMODE(sfb, MODE_TRANSPARENTSTIPPLE); SFBPLANEMASK(sfb, ~0); @@ -1138,7 +1138,7 @@ sfbp_erasecols(void *id, int row, int startcol, int ncols, long attr) } } else { - caddr_t q = p; + void *q = p; while (height > 0) { *(u_int32_t *)p = lmask; WRITE_MB(); @@ -1169,7 +1169,7 @@ static void sfbp_copyrows(void *id, int srcrow, int dstrow, int nrows) { struct rasops_info *ri = id; - caddr_t sfb, p; + void *sfb, p; int scanspan, offset, srcy, height, width, align, w; u_int32_t lmask, rmask; @@ -1190,7 +1190,7 @@ sfbp_copyrows(void *id, int srcrow, int dstrow, int nrows) width = w + align; lmask = SFBCOPYALL1 << align; rmask = SFBCOPYALL1 >> (-width & SFBCOPYBITMASK); - sfb = (caddr_t)ri->ri_hw + SFB_ASIC_OFFSET; + sfb = (void *)ri->ri_hw + SFB_ASIC_OFFSET; SFBMODE(sfb, MODE_COPY); SFBPLANEMASK(sfb, ~0); @@ -1199,7 +1199,7 @@ sfbp_copyrows(void *id, int srcrow, int dstrow, int nrows) /* never happens */; } else { - caddr_t q = p; + void *q = p; while (height > 0) { *(u_int32_t *)p = lmask; *(u_int32_t *)(p + offset) = lmask; @@ -1229,7 +1229,7 @@ static void sfbp_copyrows(void *id, int srcrow, int dstrow, int nrows) { struct rasops_info *ri = id; - caddr_t sfb, p, q; + void *sfb, p, q; int scanspan, offset, srcy, height, width, w, align; u_int32_t rmask, lmask; @@ -1248,7 +1248,7 @@ sfbp_copyrows(void *id, int srcrow, int dstrow, int nrows) width = w + align; lmask = SFBCOPYALL1 << align; rmask = SFBCOPYALL1 >> (-width & SFBCOPYBITMASK); - sfb = (caddr_t)ri->ri_hw + SFB_ASIC_OFFSET; + sfb = (void *)ri->ri_hw + SFB_ASIC_OFFSET; q = p; SFBMODE(sfb, MODE_COPY); @@ -1296,7 +1296,7 @@ static void sfbp_eraserows(void *id, int startrow, int nrows, long attr) { struct rasops_info *ri = id; - caddr_t sfb, p; + void *sfb, p; int scanspan, starty, height, width, align, w; u_int32_t lmask, rmask; @@ -1312,7 +1312,7 @@ sfbp_eraserows(void *id, int startrow, int nrows, long attr) width = w + align; lmask = SFBSTIPPLEALL1 << align; rmask = SFBSTIPPLEALL1 >> (-width & SFBSTIPPLEBITMASK); - sfb = (caddr_t)ri->ri_hw + SFB_ASIC_OFFSET; + sfb = (void *)ri->ri_hw + SFB_ASIC_OFFSET; SFBMODE(sfb, MODE_TRANSPARENTSTIPPLE); SFBPLANEMASK(sfb, ~0); @@ -1321,7 +1321,7 @@ sfbp_eraserows(void *id, int startrow, int nrows, long attr) /* never happens */; } else { - caddr_t q = p; + void *q = p; while (height > 0) { *(u_int32_t *)p = lmask; WRITE_MB(); diff --git a/sys/dev/tc/stic.c b/sys/dev/tc/stic.c index 71fa950d645..54edb4bb53f 100644 --- a/sys/dev/tc/stic.c +++ b/sys/dev/tc/stic.c @@ -1,4 +1,4 @@ -/* $NetBSD: stic.c,v 1.37 2006/12/02 03:10:43 elad Exp $ */ +/* $NetBSD: stic.c,v 1.38 2007/03/04 06:02:47 christos Exp $ */ /*- * Copyright (c) 1999, 2000, 2001 The NetBSD Foundation, Inc. @@ -73,7 +73,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: stic.c,v 1.37 2006/12/02 03:10:43 elad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: stic.c,v 1.38 2007/03/04 06:02:47 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -158,7 +158,7 @@ __KERNEL_RCSID(0, "$NetBSD: stic.c,v 1.37 2006/12/02 03:10:43 elad Exp $"); tc_wmb(); \ } while (0) -static int sticioctl(void *, void *, u_long, caddr_t, int, struct lwp *); +static int sticioctl(void *, void *, u_long, void *, int, struct lwp *); static int stic_alloc_screen(void *, const struct wsscreen_descr *, void **, int *, int *, long *); static void stic_free_screen(void *, void *); @@ -559,7 +559,7 @@ stic_clear_screen(struct stic_info *si) } static int -sticioctl(void *v, void *vs, u_long cmd, caddr_t data, int flag, struct lwp *l) +sticioctl(void *v, void *vs, u_long cmd, void *data, int flag, struct lwp *l) { struct stic_info *si; int s; @@ -1045,7 +1045,7 @@ stic_putchar(void *cookie, int r, int c, u_int uc, long attr) r *= font->fontheight; c *= font->fontwidth; uc = (uc - font->firstchar) * font->stride * font->fontheight; - fr = (u_short *)((caddr_t)font->data + uc); + fr = (u_short *)((void *)font->data + uc); bgcolor = DUPBYTE0((attr & 0xf0) >> 4); fgcolor = DUPBYTE0(attr & 0x0f); diff --git a/sys/dev/tc/sticvar.h b/sys/dev/tc/sticvar.h index d6f077851e5..b95788907bc 100644 --- a/sys/dev/tc/sticvar.h +++ b/sys/dev/tc/sticvar.h @@ -1,4 +1,4 @@ -/* $NetBSD: sticvar.h,v 1.15 2005/12/11 12:24:00 christos Exp $ */ +/* $NetBSD: sticvar.h,v 1.16 2007/03/04 06:02:47 christos Exp $ */ /*- * Copyright (c) 1999, 2000, 2001 The NetBSD Foundation, Inc. @@ -90,7 +90,7 @@ struct stic_info { u_int32_t *(*si_pbuf_get)(struct stic_info *); int (*si_pbuf_post)(struct stic_info *, u_int32_t *); - int (*si_ioctl)(struct stic_info *, u_long, caddr_t, int, + int (*si_ioctl)(struct stic_info *, u_long, void *, int, struct lwp *); int si_pbuf_select; int si_hwflags; diff --git a/sys/dev/tc/tfb.c b/sys/dev/tc/tfb.c index 87951513220..96f7e92f40d 100644 --- a/sys/dev/tc/tfb.c +++ b/sys/dev/tc/tfb.c @@ -1,4 +1,4 @@ -/* $NetBSD: tfb.c,v 1.50 2006/04/12 19:38:24 jmmv Exp $ */ +/* $NetBSD: tfb.c,v 1.51 2007/03/04 06:02:47 christos Exp $ */ /* * Copyright (c) 1998, 1999 Tohru Nishimura. All rights reserved. @@ -31,7 +31,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: tfb.c,v 1.50 2006/04/12 19:38:24 jmmv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: tfb.c,v 1.51 2007/03/04 06:02:47 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -202,7 +202,7 @@ static const struct wsscreen_list tfb_screenlist = { sizeof(_tfb_scrlist) / sizeof(struct wsscreen_descr *), _tfb_scrlist }; -static int tfbioctl(void *, void *, u_long, caddr_t, int, struct lwp *); +static int tfbioctl(void *, void *, u_long, void *, int, struct lwp *); static paddr_t tfbmmap(void *, void *, off_t, int); static int tfb_alloc_screen(void *, const struct wsscreen_descr *, @@ -222,7 +222,7 @@ static const struct wsdisplay_accessops tfb_accessops = { int tfb_cnattach(tc_addr_t); static int tfbintr(void *); -static void tfbhwinit(caddr_t); +static void tfbhwinit(void *); static int get_cmap(struct tfb_softc *, struct wsdisplay_cmap *); static int set_cmap(struct tfb_softc *, struct wsdisplay_cmap *); @@ -317,8 +317,8 @@ tfbattach(struct device *parent, struct device *self, void *aux) tc_intr_establish(parent, ta->ta_cookie, IPL_TTY, tfbintr, sc); - *(u_int8_t *)((caddr_t)ri->ri_hw + TX_CONTROL) &= ~0x40; - *(u_int8_t *)((caddr_t)ri->ri_hw + TX_CONTROL) |= 0x40; + *(u_int8_t *)((void *)ri->ri_hw + TX_CONTROL) &= ~0x40; + *(u_int8_t *)((void *)ri->ri_hw + TX_CONTROL) |= 0x40; waa.console = console; waa.scrdata = &tfb_screenlist; @@ -331,10 +331,10 @@ tfbattach(struct device *parent, struct device *self, void *aux) static void tfb_common_init(struct rasops_info *ri) { - caddr_t base; + void *base; int cookie; - base = (caddr_t)ri->ri_hw; + base = (void *)ri->ri_hw; /* initialize colormap and cursor hardware */ tfbhwinit(base); @@ -393,7 +393,7 @@ tfb_cmap_init(struct tfb_softc *sc) } static int -tfbioctl(void *v, void *vs, u_long cmd, caddr_t data, int flag, struct lwp *l) +tfbioctl(void *v, void *vs, u_long cmd, void *data, int flag, struct lwp *l) { struct tfb_softc *sc = v; struct rasops_info *ri = sc->sc_ri; @@ -541,10 +541,10 @@ static int tfbintr(void *arg) { struct tfb_softc *sc = arg; - caddr_t base, vdac, curs; + void *base, vdac, curs; int v; - base = (caddr_t)sc->sc_ri->ri_hw; + base = (void *)sc->sc_ri->ri_hw; *(u_int8_t *)(base + TX_CONTROL) &= ~0x40; if (sc->sc_changed == 0) goto done; @@ -645,9 +645,9 @@ done: } static void -tfbhwinit(caddr_t tfbbase) +tfbhwinit(void *tfbbase) { - caddr_t vdac, curs; + void *vdac, curs; const u_int8_t *p; int i; diff --git a/sys/dev/tc/xcfb.c b/sys/dev/tc/xcfb.c index b9e154bab94..1ca4d54d7e7 100644 --- a/sys/dev/tc/xcfb.c +++ b/sys/dev/tc/xcfb.c @@ -1,4 +1,4 @@ -/* $NetBSD: xcfb.c,v 1.42 2006/04/12 19:38:24 jmmv Exp $ */ +/* $NetBSD: xcfb.c,v 1.43 2007/03/04 06:02:47 christos Exp $ */ /* * Copyright (c) 1998, 1999 Tohru Nishimura. All rights reserved. @@ -31,7 +31,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: xcfb.c,v 1.42 2006/04/12 19:38:24 jmmv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: xcfb.c,v 1.43 2007/03/04 06:02:47 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -105,7 +105,7 @@ CFATTACH_DECL(xcfb, sizeof(struct xcfb_softc), static tc_addr_t xcfb_consaddr; static struct rasops_info xcfb_console_ri; static void xcfb_common_init(struct rasops_info *); -static void xcfbhwinit(caddr_t); +static void xcfbhwinit(void *); int xcfb_cnattach(void); struct wsscreen_descr xcfb_stdscreen = { @@ -123,7 +123,7 @@ static const struct wsscreen_list xcfb_screenlist = { sizeof(_xcfb_scrlist) / sizeof(struct wsscreen_descr *), _xcfb_scrlist }; -static int xcfbioctl(void *, void *, u_long, caddr_t, int, struct lwp *); +static int xcfbioctl(void *, void *, u_long, void *, int, struct lwp *); static paddr_t xcfbmmap(void *, void *, off_t, int); static int xcfb_alloc_screen(void *, const struct wsscreen_descr *, @@ -280,14 +280,14 @@ xcfb_common_init(struct rasops_info *ri) int cookie; /* initialize colormap and cursor hardware */ - xcfbhwinit((caddr_t)ri->ri_hw); + xcfbhwinit((void *)ri->ri_hw); ri->ri_flg = RI_CENTER; ri->ri_depth = 8; ri->ri_width = 1024; ri->ri_height = 768; ri->ri_stride = 1024; - ri->ri_bits = (caddr_t)MIPS_PHYS_TO_KSEG1(XCFB_FB_BASE); + ri->ri_bits = (void *)MIPS_PHYS_TO_KSEG1(XCFB_FB_BASE); /* clear the screen */ memset(ri->ri_bits, 0, ri->ri_stride * ri->ri_height); @@ -335,7 +335,7 @@ xcfb_cnattach(void) } static void -xcfbhwinit(caddr_t base) +xcfbhwinit(void *base) { volatile u_int32_t *csr; u_int32_t i; @@ -393,7 +393,7 @@ xcfbhwinit(caddr_t base) } static int -xcfbioctl(void *v, void *vs, u_long cmd, caddr_t data, int flag, struct lwp *l) +xcfbioctl(void *v, void *vs, u_long cmd, void *data, int flag, struct lwp *l) { struct xcfb_softc *sc = v; struct rasops_info *ri = sc->sc_ri; @@ -523,7 +523,7 @@ xcfbintr(void *v) struct xcfb_softc *sc = v; u_int32_t *intr, i; - intr = (u_int32_t *)((caddr_t)sc->sc_ri->ri_hw + IOASIC_INTR); + intr = (u_int32_t *)((void *)sc->sc_ri->ri_hw + IOASIC_INTR); i = *intr; i &= ~XINE_INTR_VINT; *intr = i; @@ -753,8 +753,8 @@ ims332_load_curshape(struct xcfb_softc *sc) static void ims332_write_reg(int regno, u_int32_t val) { - caddr_t high8 = (caddr_t)(ioasic_base + IMS332_HIGH); - caddr_t low16 = (caddr_t)(ioasic_base + IMS332_WLOW) + (regno << 4); + void *high8 = (void *)(ioasic_base + IMS332_HIGH); + void *low16 = (void *)(ioasic_base + IMS332_WLOW) + (regno << 4); *(volatile u_int16_t *)high8 = (val & 0xff0000) >> 8; *(volatile u_int16_t *)low16 = val; @@ -764,8 +764,8 @@ ims332_write_reg(int regno, u_int32_t val) static u_int32_t ims332_read_reg(int regno) { - caddr_t high8 = (caddr_t)(ioasic_base + IMS332_HIGH); - caddr_t low16 = (caddr_t)(ioasic_base + IMS332_RLOW) + (regno << 4); + void *high8 = (void *)(ioasic_base + IMS332_HIGH); + void *low16 = (void *)(ioasic_base + IMS332_RLOW) + (regno << 4); u_int v0, v1; v1 = *(volatile u_int16_t *)high8; diff --git a/sys/dev/tc/zskbd.c b/sys/dev/tc/zskbd.c index e66bc0569af..7b3ac15aad8 100644 --- a/sys/dev/tc/zskbd.c +++ b/sys/dev/tc/zskbd.c @@ -1,4 +1,4 @@ -/* $NetBSD: zskbd.c,v 1.14 2006/03/31 17:39:33 thorpej Exp $ */ +/* $NetBSD: zskbd.c,v 1.15 2007/03/04 06:02:47 christos Exp $ */ /* * Copyright (c) 1992, 1993 @@ -45,7 +45,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: zskbd.c,v 1.14 2006/03/31 17:39:33 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: zskbd.c,v 1.15 2007/03/04 06:02:47 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -128,7 +128,7 @@ CFATTACH_DECL(zskbd, sizeof(struct zskbd_softc), static int zskbd_enable(void *, int); static void zskbd_set_leds(void *, int); -static int zskbd_ioctl(void *, u_long, caddr_t, int, struct lwp *); +static int zskbd_ioctl(void *, u_long, void *, int, struct lwp *); static const struct wskbd_accessops zskbd_accessops = { zskbd_enable, @@ -299,7 +299,7 @@ zskbd_set_leds(void *v, int leds) } static int -zskbd_ioctl(void *v, u_long cmd, caddr_t data, int flag, struct lwp *l) +zskbd_ioctl(void *v, u_long cmd, void *data, int flag, struct lwp *l) { struct zskbd_softc *sc = (struct zskbd_softc *)v; diff --git a/sys/dev/tc/zsms.c b/sys/dev/tc/zsms.c index 3c0f515ae93..dc0e7b1b5d7 100644 --- a/sys/dev/tc/zsms.c +++ b/sys/dev/tc/zsms.c @@ -1,4 +1,4 @@ -/* $NetBSD: zsms.c,v 1.15 2006/11/12 19:00:43 plunky Exp $ */ +/* $NetBSD: zsms.c,v 1.16 2007/03/04 06:02:47 christos Exp $ */ /* * Copyright (c) 1992, 1993 @@ -45,7 +45,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: zsms.c,v 1.15 2006/11/12 19:00:43 plunky Exp $"); +__KERNEL_RCSID(0, "$NetBSD: zsms.c,v 1.16 2007/03/04 06:02:47 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -118,7 +118,7 @@ CFATTACH_DECL(zsms, sizeof(struct zsms_softc), zsms_match, zsms_attach, NULL, NULL); static int zsms_enable(void *); -static int zsms_ioctl(void *, u_long, caddr_t, int, struct lwp *); +static int zsms_ioctl(void *, u_long, void *, int, struct lwp *); static void zsms_disable(void *); static const struct wsmouse_accessops zsms_accessops = { @@ -215,7 +215,7 @@ zsms_disable(void *v) } static int -zsms_ioctl(void *v, u_long cmd, caddr_t data, int flag, struct lwp *l) +zsms_ioctl(void *v, u_long cmd, void *data, int flag, struct lwp *l) { if (cmd == WSMOUSEIO_GTYPE) { diff --git a/sys/dev/usb/if_atu.c b/sys/dev/usb/if_atu.c index c461a80cb7b..4a20aa231e9 100644 --- a/sys/dev/usb/if_atu.c +++ b/sys/dev/usb/if_atu.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_atu.c,v 1.24 2006/12/25 18:39:48 wiz Exp $ */ +/* $NetBSD: if_atu.c,v 1.25 2007/03/04 06:02:47 christos Exp $ */ /* $OpenBSD: if_atu.c,v 1.48 2004/12/30 01:53:21 dlg Exp $ */ /* * Copyright (c) 2003, 2004 @@ -48,7 +48,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_atu.c,v 1.24 2006/12/25 18:39:48 wiz Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_atu.c,v 1.25 2007/03/04 06:02:47 christos Exp $"); #include "bpfilter.h" @@ -175,7 +175,7 @@ int atu_newbuf(struct atu_softc *, struct atu_chain *, struct mbuf *); void atu_rxeof(usbd_xfer_handle, usbd_private_handle, usbd_status); void atu_txeof(usbd_xfer_handle, usbd_private_handle, usbd_status); void atu_start(struct ifnet *); -int atu_ioctl(struct ifnet *, u_long, caddr_t); +int atu_ioctl(struct ifnet *, u_long, void *); int atu_init(struct ifnet *); void atu_stop(struct ifnet *, int); void atu_watchdog(struct ifnet *); @@ -2087,7 +2087,7 @@ atu_debug_print(struct atu_softc *sc) #endif /* ATU_DEBUG */ int -atu_ioctl(struct ifnet *ifp, u_long command, caddr_t data) +atu_ioctl(struct ifnet *ifp, u_long command, void *data) { struct atu_softc *sc = ifp->if_softc; struct ifreq *ifr = (struct ifreq *)data; diff --git a/sys/dev/usb/if_aue.c b/sys/dev/usb/if_aue.c index 5e552259f23..617ce60fa7f 100644 --- a/sys/dev/usb/if_aue.c +++ b/sys/dev/usb/if_aue.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_aue.c,v 1.99 2006/11/16 01:33:26 christos Exp $ */ +/* $NetBSD: if_aue.c,v 1.100 2007/03/04 06:02:47 christos Exp $ */ /* * Copyright (c) 1997, 1998, 1999, 2000 * Bill Paul <wpaul@ee.columbia.edu>. All rights reserved. @@ -77,7 +77,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_aue.c,v 1.99 2006/11/16 01:33:26 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_aue.c,v 1.100 2007/03/04 06:02:47 christos Exp $"); #if defined(__NetBSD__) #include "opt_inet.h" @@ -249,7 +249,7 @@ Static void aue_txeof(usbd_xfer_handle, usbd_private_handle, usbd_status); Static void aue_tick(void *); Static void aue_tick_task(void *); Static void aue_start(struct ifnet *); -Static int aue_ioctl(struct ifnet *, u_long, caddr_t); +Static int aue_ioctl(struct ifnet *, u_long, void *); Static void aue_init(void *); Static void aue_stop(struct aue_softc *); Static void aue_watchdog(struct ifnet *); @@ -267,7 +267,7 @@ Static void aue_lock_mii(struct aue_softc *); Static void aue_unlock_mii(struct aue_softc *); Static void aue_setmulti(struct aue_softc *); -Static u_int32_t aue_crc(caddr_t); +Static u_int32_t aue_crc(void *); Static void aue_reset(struct aue_softc *); Static int aue_csr_read_1(struct aue_softc *, int); @@ -580,9 +580,10 @@ aue_miibus_statchg(device_ptr_t dev) #define AUE_BITS 6 Static u_int32_t -aue_crc(caddr_t addr) +aue_crc(void *addrv) { u_int32_t idx, bit, data, crc; + char *addr = addrv; /* Compute CRC for the address value. */ crc = 0xFFFFFFFF; /* initial value */ @@ -1556,7 +1557,7 @@ aue_ifmedia_sts(struct ifnet *ifp, struct ifmediareq *ifmr) } Static int -aue_ioctl(struct ifnet *ifp, u_long command, caddr_t data) +aue_ioctl(struct ifnet *ifp, u_long command, void *data) { struct aue_softc *sc = ifp->if_softc; struct ifaddr *ifa = (struct ifaddr *)data; diff --git a/sys/dev/usb/if_axe.c b/sys/dev/usb/if_axe.c index 7d7101497cb..b272b276ed2 100644 --- a/sys/dev/usb/if_axe.c +++ b/sys/dev/usb/if_axe.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_axe.c,v 1.17 2006/11/16 01:33:26 christos Exp $ */ +/* $NetBSD: if_axe.c,v 1.18 2007/03/04 06:02:48 christos Exp $ */ /* * Copyright (c) 1997, 1998, 1999, 2000-2003 @@ -73,7 +73,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_axe.c,v 1.17 2006/11/16 01:33:26 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_axe.c,v 1.18 2007/03/04 06:02:48 christos Exp $"); #if defined(__NetBSD__) #include "opt_inet.h" @@ -178,7 +178,7 @@ Static void axe_tick_task(void *); Static void axe_rxstart(struct ifnet *); #endif Static void axe_start(struct ifnet *); -Static int axe_ioctl(struct ifnet *, u_long, caddr_t); +Static int axe_ioctl(struct ifnet *, u_long, void *); Static void axe_init(void *); Static void axe_stop(struct axe_softc *); Static void axe_watchdog(struct ifnet *); @@ -1175,7 +1175,7 @@ axe_init(void *xsc) } Static int -axe_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) +axe_ioctl(struct ifnet *ifp, u_long cmd, void *data) { struct axe_softc *sc = ifp->if_softc; struct ifreq *ifr = (struct ifreq *)data; diff --git a/sys/dev/usb/if_cdce.c b/sys/dev/usb/if_cdce.c index 7757568e2cd..45b3bd3b68a 100644 --- a/sys/dev/usb/if_cdce.c +++ b/sys/dev/usb/if_cdce.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_cdce.c,v 1.12 2006/11/16 01:33:26 christos Exp $ */ +/* $NetBSD: if_cdce.c,v 1.13 2007/03/04 06:02:48 christos Exp $ */ /* * Copyright (c) 1997, 1998, 1999, 2000-2003 Bill Paul <wpaul@windriver.com> @@ -41,7 +41,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_cdce.c,v 1.12 2006/11/16 01:33:26 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_cdce.c,v 1.13 2007/03/04 06:02:48 christos Exp $"); #include "bpfilter.h" #include <sys/param.h> @@ -108,7 +108,7 @@ Static int cdce_encap(struct cdce_softc *, struct mbuf *, int); Static void cdce_rxeof(usbd_xfer_handle, usbd_private_handle, usbd_status); Static void cdce_txeof(usbd_xfer_handle, usbd_private_handle, usbd_status); Static void cdce_start(struct ifnet *); -Static int cdce_ioctl(struct ifnet *, u_long, caddr_t); +Static int cdce_ioctl(struct ifnet *, u_long, void *); Static void cdce_init(void *); Static void cdce_watchdog(struct ifnet *); Static void cdce_stop(struct cdce_softc *); @@ -444,7 +444,7 @@ cdce_stop(struct cdce_softc *sc) } Static int -cdce_ioctl(struct ifnet *ifp, u_long command, caddr_t data) +cdce_ioctl(struct ifnet *ifp, u_long command, void *data) { struct cdce_softc *sc = ifp->if_softc; struct ifaddr *ifa = (struct ifaddr *)data; diff --git a/sys/dev/usb/if_cue.c b/sys/dev/usb/if_cue.c index 17349c6f6ff..3de71123f40 100644 --- a/sys/dev/usb/if_cue.c +++ b/sys/dev/usb/if_cue.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_cue.c,v 1.48 2006/11/16 01:33:26 christos Exp $ */ +/* $NetBSD: if_cue.c,v 1.49 2007/03/04 06:02:48 christos Exp $ */ /* * Copyright (c) 1997, 1998, 1999, 2000 * Bill Paul <wpaul@ee.columbia.edu>. All rights reserved. @@ -56,7 +56,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_cue.c,v 1.48 2006/11/16 01:33:26 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_cue.c,v 1.49 2007/03/04 06:02:48 christos Exp $"); #if defined(__NetBSD__) #include "opt_inet.h" @@ -152,7 +152,7 @@ Static void cue_txeof(usbd_xfer_handle, usbd_private_handle, usbd_status); Static void cue_tick(void *); Static void cue_tick_task(void *); Static void cue_start(struct ifnet *); -Static int cue_ioctl(struct ifnet *, u_long, caddr_t); +Static int cue_ioctl(struct ifnet *, u_long, void *); Static void cue_init(void *); Static void cue_stop(struct cue_softc *); Static void cue_watchdog(struct ifnet *); @@ -1155,7 +1155,7 @@ cue_open_pipes(struct cue_softc *sc) } Static int -cue_ioctl(struct ifnet *ifp, u_long command, caddr_t data) +cue_ioctl(struct ifnet *ifp, u_long command, void *data) { struct cue_softc *sc = ifp->if_softc; struct ifaddr *ifa = (struct ifaddr *)data; diff --git a/sys/dev/usb/if_kue.c b/sys/dev/usb/if_kue.c index a46e021f672..c614de905bb 100644 --- a/sys/dev/usb/if_kue.c +++ b/sys/dev/usb/if_kue.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_kue.c,v 1.58 2006/11/16 01:33:26 christos Exp $ */ +/* $NetBSD: if_kue.c,v 1.59 2007/03/04 06:02:48 christos Exp $ */ /* * Copyright (c) 1997, 1998, 1999, 2000 * Bill Paul <wpaul@ee.columbia.edu>. All rights reserved. @@ -70,7 +70,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_kue.c,v 1.58 2006/11/16 01:33:26 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_kue.c,v 1.59 2007/03/04 06:02:48 christos Exp $"); #if defined(__NetBSD__) #include "opt_inet.h" @@ -189,7 +189,7 @@ Static int kue_open_pipes(struct kue_softc *); Static void kue_rxeof(usbd_xfer_handle, usbd_private_handle, usbd_status); Static void kue_txeof(usbd_xfer_handle, usbd_private_handle, usbd_status); Static void kue_start(struct ifnet *); -Static int kue_ioctl(struct ifnet *, u_long, caddr_t); +Static int kue_ioctl(struct ifnet *, u_long, void *); Static void kue_init(void *); Static void kue_stop(struct kue_softc *); Static void kue_watchdog(struct ifnet *); @@ -1058,7 +1058,7 @@ kue_open_pipes(struct kue_softc *sc) } Static int -kue_ioctl(struct ifnet *ifp, u_long command, caddr_t data) +kue_ioctl(struct ifnet *ifp, u_long command, void *data) { struct kue_softc *sc = ifp->if_softc; struct ifaddr *ifa = (struct ifaddr *)data; diff --git a/sys/dev/usb/if_rum.c b/sys/dev/usb/if_rum.c index 403ad10564d..5eb0d9a973a 100644 --- a/sys/dev/usb/if_rum.c +++ b/sys/dev/usb/if_rum.c @@ -1,5 +1,5 @@ /* $OpenBSD: if_rum.c,v 1.40 2006/09/18 16:20:20 damien Exp $ */ -/* $NetBSD: if_rum.c,v 1.6 2007/02/26 21:35:44 wiz Exp $ */ +/* $NetBSD: if_rum.c,v 1.7 2007/03/04 06:02:48 christos Exp $ */ /*- * Copyright (c) 2005, 2006 Damien Bergamini <damien.bergamini@free.fr> @@ -24,7 +24,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_rum.c,v 1.6 2007/02/26 21:35:44 wiz Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_rum.c,v 1.7 2007/03/04 06:02:48 christos Exp $"); #include "bpfilter.h" @@ -146,7 +146,7 @@ Static int rum_tx_data(struct rum_softc *, struct mbuf *, struct ieee80211_node *); Static void rum_start(struct ifnet *); Static void rum_watchdog(struct ifnet *); -Static int rum_ioctl(struct ifnet *, u_long, caddr_t); +Static int rum_ioctl(struct ifnet *, u_long, void *); Static void rum_eeprom_read(struct rum_softc *, uint16_t, void *, int); Static uint32_t rum_read(struct rum_softc *, uint16_t); @@ -860,7 +860,7 @@ rum_rxeof(usbd_xfer_handle xfer, usbd_private_handle priv, usbd_status status) /* finalize mbuf */ m->m_pkthdr.rcvif = ifp; - m->m_data = (caddr_t)(desc + 1); + m->m_data = (void *)(desc + 1); m->m_pkthdr.len = m->m_len = (le32toh(desc->flags) >> 16) & 0xfff; s = splnet(); @@ -1332,7 +1332,7 @@ rum_watchdog(struct ifnet *ifp) } Static int -rum_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) +rum_ioctl(struct ifnet *ifp, u_long cmd, void *data) { struct rum_softc *sc = ifp->if_softc; struct ieee80211com *ic = &sc->sc_ic; diff --git a/sys/dev/usb/if_rumvar.h b/sys/dev/usb/if_rumvar.h index bc59e8fe053..608ef5d01e0 100644 --- a/sys/dev/usb/if_rumvar.h +++ b/sys/dev/usb/if_rumvar.h @@ -134,7 +134,7 @@ struct rum_softc { uint8_t bbp17; #if NBPFILTER > 0 - caddr_t sc_drvbpf; + void * sc_drvbpf; union { struct rum_rx_radiotap_header th; diff --git a/sys/dev/usb/if_udav.c b/sys/dev/usb/if_udav.c index 9032fe3da11..9ec4979c294 100644 --- a/sys/dev/usb/if_udav.c +++ b/sys/dev/usb/if_udav.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_udav.c,v 1.15 2006/12/01 20:56:42 drochner Exp $ */ +/* $NetBSD: if_udav.c,v 1.16 2007/03/04 06:02:48 christos Exp $ */ /* $nabe: if_udav.c,v 1.3 2003/08/21 16:57:19 nabe Exp $ */ /* * Copyright (c) 2003 @@ -44,7 +44,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_udav.c,v 1.15 2006/12/01 20:56:42 drochner Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_udav.c,v 1.16 2007/03/04 06:02:48 christos Exp $"); #include "opt_inet.h" #include "bpfilter.h" @@ -102,7 +102,7 @@ Static void udav_txeof(usbd_xfer_handle, usbd_private_handle, usbd_status); Static void udav_rxeof(usbd_xfer_handle, usbd_private_handle, usbd_status); Static void udav_tick(void *); Static void udav_tick_task(void *); -Static int udav_ioctl(struct ifnet *, u_long, caddr_t); +Static int udav_ioctl(struct ifnet *, u_long, void *); Static void udav_stop_task(struct udav_softc *); Static void udav_stop(struct ifnet *, int); Static void udav_watchdog(struct ifnet *); @@ -1209,7 +1209,7 @@ Static void udav_intr() #endif Static int -udav_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) +udav_ioctl(struct ifnet *ifp, u_long cmd, void *data) { struct udav_softc *sc = ifp->if_softc; struct ifreq *ifr = (struct ifreq *)data; diff --git a/sys/dev/usb/if_upl.c b/sys/dev/usb/if_upl.c index 917651dc4cc..583d96aa2a9 100644 --- a/sys/dev/usb/if_upl.c +++ b/sys/dev/usb/if_upl.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_upl.c,v 1.27 2007/02/17 22:34:07 dyoung Exp $ */ +/* $NetBSD: if_upl.c,v 1.28 2007/03/04 06:02:48 christos Exp $ */ /* * Copyright (c) 2000 The NetBSD Foundation, Inc. * All rights reserved. @@ -41,7 +41,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_upl.c,v 1.27 2007/02/17 22:34:07 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_upl.c,v 1.28 2007/03/04 06:02:48 christos Exp $"); #include "opt_inet.h" #include "bpfilter.h" @@ -198,7 +198,7 @@ Static void upl_intr(usbd_xfer_handle, usbd_private_handle, usbd_status); Static void upl_rxeof(usbd_xfer_handle, usbd_private_handle, usbd_status); Static void upl_txeof(usbd_xfer_handle, usbd_private_handle, usbd_status); Static void upl_start(struct ifnet *); -Static int upl_ioctl(struct ifnet *, u_long, caddr_t); +Static int upl_ioctl(struct ifnet *, u_long, void *); Static void upl_init(void *); Static void upl_stop(struct upl_softc *); Static void upl_watchdog(struct ifnet *); @@ -852,7 +852,7 @@ upl_intr(usbd_xfer_handle xfer, usbd_private_handle priv, } Static int -upl_ioctl(struct ifnet *ifp, u_long command, caddr_t data) +upl_ioctl(struct ifnet *ifp, u_long command, void *data) { struct upl_softc *sc = ifp->if_softc; struct ifaddr *ifa = (struct ifaddr *)data; diff --git a/sys/dev/usb/if_ural.c b/sys/dev/usb/if_ural.c index cf3e44924dc..0b1991b9d7b 100644 --- a/sys/dev/usb/if_ural.c +++ b/sys/dev/usb/if_ural.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_ural.c,v 1.18 2006/11/16 01:33:26 christos Exp $ */ +/* $NetBSD: if_ural.c,v 1.19 2007/03/04 06:02:48 christos Exp $ */ /* $FreeBSD: /repoman/r/ncvs/src/sys/dev/usb/if_ural.c,v 1.40 2006/06/02 23:14:40 sam Exp $ */ /*- @@ -24,7 +24,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_ural.c,v 1.18 2006/11/16 01:33:26 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_ural.c,v 1.19 2007/03/04 06:02:48 christos Exp $"); #include "bpfilter.h" @@ -139,7 +139,7 @@ Static int ural_tx_data(struct ural_softc *, struct mbuf *, Static void ural_start(struct ifnet *); Static void ural_watchdog(struct ifnet *); Static int ural_reset(struct ifnet *); -Static int ural_ioctl(struct ifnet *, u_long, caddr_t); +Static int ural_ioctl(struct ifnet *, u_long, void *); Static void ural_set_testmode(struct ural_softc *); Static void ural_eeprom_read(struct ural_softc *, uint16_t, void *, int); @@ -1487,7 +1487,7 @@ ural_reset(struct ifnet *ifp) } Static int -ural_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) +ural_ioctl(struct ifnet *ifp, u_long cmd, void *data) { struct ural_softc *sc = ifp->if_softc; struct ieee80211com *ic = &sc->sc_ic; diff --git a/sys/dev/usb/if_uralvar.h b/sys/dev/usb/if_uralvar.h index b267e5de8a3..d6fe2bd9925 100644 --- a/sys/dev/usb/if_uralvar.h +++ b/sys/dev/usb/if_uralvar.h @@ -1,4 +1,4 @@ -/* $NetBSD: if_uralvar.h,v 1.6 2006/10/31 21:53:41 joerg Exp $ */ +/* $NetBSD: if_uralvar.h,v 1.7 2007/03/04 06:02:48 christos Exp $ */ /* $OpenBSD: if_ralvar.h,v 1.2 2005/05/13 18:42:50 damien Exp $ */ /*- @@ -125,7 +125,7 @@ struct ural_softc { int nb_ant; #if NBPFILTER > 0 - caddr_t sc_drvbpf; + void * sc_drvbpf; union { struct ural_rx_radiotap_header th; diff --git a/sys/dev/usb/if_url.c b/sys/dev/usb/if_url.c index 40ea96b4a7c..557a4c860a8 100644 --- a/sys/dev/usb/if_url.c +++ b/sys/dev/usb/if_url.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_url.c,v 1.24 2006/12/01 20:56:42 drochner Exp $ */ +/* $NetBSD: if_url.c,v 1.25 2007/03/04 06:02:48 christos Exp $ */ /* * Copyright (c) 2001, 2002 * Shingo WATANABE <nabe@nabechan.org>. All rights reserved. @@ -43,7 +43,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_url.c,v 1.24 2006/12/01 20:56:42 drochner Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_url.c,v 1.25 2007/03/04 06:02:48 christos Exp $"); #include "opt_inet.h" #include "bpfilter.h" @@ -102,7 +102,7 @@ Static void url_txeof(usbd_xfer_handle, usbd_private_handle, usbd_status); Static void url_rxeof(usbd_xfer_handle, usbd_private_handle, usbd_status); Static void url_tick(void *); Static void url_tick_task(void *); -Static int url_ioctl(struct ifnet *, u_long, caddr_t); +Static int url_ioctl(struct ifnet *, u_long, void *); Static void url_stop_task(struct url_softc *); Static void url_stop(struct ifnet *, int); Static void url_watchdog(struct ifnet *); @@ -1094,7 +1094,7 @@ Static void url_intr() #endif Static int -url_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) +url_ioctl(struct ifnet *ifp, u_long cmd, void *data) { struct url_softc *sc = ifp->if_softc; struct ifreq *ifr = (struct ifreq *)data; diff --git a/sys/dev/usb/ucom.c b/sys/dev/usb/ucom.c index e174042a041..a4e3e658852 100644 --- a/sys/dev/usb/ucom.c +++ b/sys/dev/usb/ucom.c @@ -1,4 +1,4 @@ -/* $NetBSD: ucom.c,v 1.69 2006/11/16 01:33:26 christos Exp $ */ +/* $NetBSD: ucom.c,v 1.70 2007/03/04 06:02:48 christos Exp $ */ /* * Copyright (c) 1998, 2000 The NetBSD Foundation, Inc. @@ -41,7 +41,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ucom.c,v 1.69 2006/11/16 01:33:26 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ucom.c,v 1.70 2007/03/04 06:02:48 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -155,7 +155,7 @@ Static void ucom_hwiflow(struct ucom_softc *); Static int ucomparam(struct tty *, struct termios *); Static void ucomstart(struct tty *); Static void ucom_shutdown(struct ucom_softc *); -Static int ucom_do_ioctl(struct ucom_softc *, u_long, caddr_t, +Static int ucom_do_ioctl(struct ucom_softc *, u_long, void *, int, struct lwp *); Static void ucom_dtr(struct ucom_softc *, int); Static void ucom_rts(struct ucom_softc *, int); @@ -588,7 +588,7 @@ ucomtty(dev_t dev) } int -ucomioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct lwp *l) +ucomioctl(dev_t dev, u_long cmd, void *data, int flag, struct lwp *l) { struct ucom_softc *sc = ucom_cd.cd_devs[UCOMUNIT(dev)]; int error; @@ -601,7 +601,7 @@ ucomioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct lwp *l) } Static int -ucom_do_ioctl(struct ucom_softc *sc, u_long cmd, caddr_t data, +ucom_do_ioctl(struct ucom_softc *sc, u_long cmd, void *data, int flag, struct lwp *l) { struct tty *tp = sc->sc_tty; diff --git a/sys/dev/usb/ucomvar.h b/sys/dev/usb/ucomvar.h index efbd6ed0c0f..82e2c6a92d5 100644 --- a/sys/dev/usb/ucomvar.h +++ b/sys/dev/usb/ucomvar.h @@ -1,4 +1,4 @@ -/* $NetBSD: ucomvar.h,v 1.14 2006/03/05 17:33:33 christos Exp $ */ +/* $NetBSD: ucomvar.h,v 1.15 2007/03/04 06:02:49 christos Exp $ */ /* * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -51,7 +51,7 @@ struct ucom_methods { #define UCOM_SET_BREAK 3 int (*ucom_param)(void *sc, int portno, struct termios *); int (*ucom_ioctl)(void *sc, int portno, u_long cmd, - caddr_t data, int flag, usb_proc_ptr p); + void *data, int flag, usb_proc_ptr p); int (*ucom_open)(void *sc, int portno); void (*ucom_close)(void *sc, int portno); void (*ucom_read)(void *sc, int portno, u_char **ptr, u_int32_t *count); diff --git a/sys/dev/usb/ucycom.c b/sys/dev/usb/ucycom.c index ac9d43d6124..d2a838a8d74 100644 --- a/sys/dev/usb/ucycom.c +++ b/sys/dev/usb/ucycom.c @@ -1,4 +1,4 @@ -/* $NetBSD: ucycom.c,v 1.16 2006/11/16 01:33:26 christos Exp $ */ +/* $NetBSD: ucycom.c,v 1.17 2007/03/04 06:02:49 christos Exp $ */ /* * Copyright (c) 2005 The NetBSD Foundation, Inc. @@ -45,7 +45,7 @@ */ #include <sys/cdefs.h> -__RCSID("$NetBSD: ucycom.c,v 1.16 2006/11/16 01:33:26 christos Exp $"); +__RCSID("$NetBSD: ucycom.c,v 1.17 2007/03/04 06:02:49 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -723,7 +723,7 @@ ucycomtty(dev_t dev) } int -ucycomioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct lwp *l) +ucycomioctl(dev_t dev, u_long cmd, void *data, int flag, struct lwp *l) { struct ucycom_softc *sc = ucycom_cd.cd_devs[UCYCOMUNIT(dev)]; struct tty *tp = sc->sc_tty; diff --git a/sys/dev/usb/uep.c b/sys/dev/usb/uep.c index fc161785287..fc3d229d14b 100644 --- a/sys/dev/usb/uep.c +++ b/sys/dev/usb/uep.c @@ -1,4 +1,4 @@ -/* $NetBSD: uep.c,v 1.7 2006/11/12 19:00:43 plunky Exp $ */ +/* $NetBSD: uep.c,v 1.8 2007/03/04 06:02:49 christos Exp $ */ /* * Copyright (c) 2004 The NetBSD Foundation, Inc. @@ -45,7 +45,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: uep.c,v 1.7 2006/11/12 19:00:43 plunky Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uep.c,v 1.8 2007/03/04 06:02:49 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -97,7 +97,7 @@ Static void uep_intr(usbd_xfer_handle, usbd_private_handle, usbd_status); Static int uep_enable(void *); Static void uep_disable(void *); -Static int uep_ioctl(void *, u_long, caddr_t, int, struct lwp *); +Static int uep_ioctl(void *, u_long, void *, int, struct lwp *); const struct wsmouse_accessops uep_accessops = { uep_enable, @@ -215,7 +215,7 @@ USB_ATTACH(uep) tpcalib_init(&sc->sc_tpcalib); tpcalib_ioctl(&sc->sc_tpcalib, WSMOUSEIO_SCALIBCOORDS, - (caddr_t)&default_calib, 0, 0); + (void *)&default_calib, 0, 0); USB_ATTACH_SUCCESS_RETURN; } @@ -322,7 +322,7 @@ uep_disable(void *v) } Static int -uep_ioctl(void *v, u_long cmd, caddr_t data, int flag, struct lwp *l) +uep_ioctl(void *v, u_long cmd, void *data, int flag, struct lwp *l) { struct uep_softc *sc = v; struct wsmouse_id *id; diff --git a/sys/dev/usb/ugen.c b/sys/dev/usb/ugen.c index 1a1d5970a87..15fabc30bf2 100644 --- a/sys/dev/usb/ugen.c +++ b/sys/dev/usb/ugen.c @@ -1,4 +1,4 @@ -/* $NetBSD: ugen.c,v 1.91 2007/02/26 13:28:56 drochner Exp $ */ +/* $NetBSD: ugen.c,v 1.92 2007/03/04 06:02:49 christos Exp $ */ /* * Copyright (c) 1998, 2004 The NetBSD Foundation, Inc. @@ -44,7 +44,7 @@ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ugen.c,v 1.91 2007/02/26 13:28:56 drochner Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ugen.c,v 1.92 2007/03/04 06:02:49 christos Exp $"); #include "opt_ugen_bulk_ra_wb.h" #include "opt_compat_netbsd.h" @@ -199,7 +199,7 @@ Static void ugen_bulkwb_intr(usbd_xfer_handle xfer, usbd_private_handle addr, Static int ugen_do_read(struct ugen_softc *, int, struct uio *, int); Static int ugen_do_write(struct ugen_softc *, int, struct uio *, int); Static int ugen_do_ioctl(struct ugen_softc *, int, u_long, - caddr_t, int, struct lwp *); + void *, int, struct lwp *); Static int ugen_set_config(struct ugen_softc *sc, int configno); Static usb_config_descriptor_t *ugen_get_cdesc(struct ugen_softc *sc, int index, int *lenp); @@ -1383,7 +1383,7 @@ ugen_get_alt_index(struct ugen_softc *sc, int ifaceidx) Static int ugen_do_ioctl(struct ugen_softc *sc, int endpt, u_long cmd, - caddr_t addr, int flag, struct lwp *l) + void *addr, int flag, struct lwp *l) { struct ugen_endpoint *sce; usbd_status err; @@ -1721,7 +1721,7 @@ ugen_do_ioctl(struct ugen_softc *sc, int endpt, u_long cmd, cdesc = ugen_get_cdesc(sc, fd->ufd_config_index, &len); if (len > fd->ufd_size) len = fd->ufd_size; - iov.iov_base = (caddr_t)fd->ufd_data; + iov.iov_base = (void *)fd->ufd_data; iov.iov_len = len; uio.uio_iov = &iov; uio.uio_iovcnt = 1; @@ -1766,7 +1766,7 @@ ugen_do_ioctl(struct ugen_softc *sc, int endpt, u_long cmd, if (len < 0 || len > 32767) return (EINVAL); if (len != 0) { - iov.iov_base = (caddr_t)ur->ucr_data; + iov.iov_base = (void *)ur->ucr_data; iov.iov_len = len; uio.uio_iov = &iov; uio.uio_iovcnt = 1; @@ -1820,7 +1820,7 @@ ugen_do_ioctl(struct ugen_softc *sc, int endpt, u_long cmd, } int -ugenioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct lwp *l) +ugenioctl(dev_t dev, u_long cmd, void *addr, int flag, struct lwp *l) { int endpt = UGENENDPOINT(dev); struct ugen_softc *sc; diff --git a/sys/dev/usb/uhid.c b/sys/dev/usb/uhid.c index 8f186d13695..2cc257e3148 100644 --- a/sys/dev/usb/uhid.c +++ b/sys/dev/usb/uhid.c @@ -1,4 +1,4 @@ -/* $NetBSD: uhid.c,v 1.75 2007/02/26 13:28:56 drochner Exp $ */ +/* $NetBSD: uhid.c,v 1.76 2007/03/04 06:02:49 christos Exp $ */ /* * Copyright (c) 1998, 2004 The NetBSD Foundation, Inc. @@ -42,7 +42,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: uhid.c,v 1.75 2007/02/26 13:28:56 drochner Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uhid.c,v 1.76 2007/03/04 06:02:49 christos Exp $"); #include "opt_compat_netbsd.h" @@ -122,7 +122,7 @@ Static void uhid_intr(struct uhidev *, void *, u_int len); Static int uhid_do_read(struct uhid_softc *, struct uio *uio, int); Static int uhid_do_write(struct uhid_softc *, struct uio *uio, int); -Static int uhid_do_ioctl(struct uhid_softc*, u_long, caddr_t, int, struct lwp *); +Static int uhid_do_ioctl(struct uhid_softc*, u_long, void *, int, struct lwp *); USB_DECLARE_DRIVER(uhid); @@ -421,7 +421,7 @@ uhidwrite(dev_t dev, struct uio *uio, int flag) } int -uhid_do_ioctl(struct uhid_softc *sc, u_long cmd, caddr_t addr, +uhid_do_ioctl(struct uhid_softc *sc, u_long cmd, void *addr, int flag, struct lwp *l) { struct usb_ctl_report_desc *rd; @@ -566,7 +566,7 @@ uhid_do_ioctl(struct uhid_softc *sc, u_long cmd, caddr_t addr, } int -uhidioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct lwp *l) +uhidioctl(dev_t dev, u_long cmd, void *addr, int flag, struct lwp *l) { struct uhid_softc *sc; int error; diff --git a/sys/dev/usb/ukbd.c b/sys/dev/usb/ukbd.c index 26f5d7d5fc5..77456e09044 100644 --- a/sys/dev/usb/ukbd.c +++ b/sys/dev/usb/ukbd.c @@ -1,4 +1,4 @@ -/* $NetBSD: ukbd.c,v 1.94 2006/11/16 01:33:27 christos Exp $ */ +/* $NetBSD: ukbd.c,v 1.95 2007/03/04 06:02:49 christos Exp $ */ /* * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -42,7 +42,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ukbd.c,v 1.94 2006/11/16 01:33:27 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ukbd.c,v 1.95 2007/03/04 06:02:49 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -250,7 +250,7 @@ Static int ukbd_enable(void *, int); Static void ukbd_set_leds(void *, int); #if defined(__NetBSD__) -Static int ukbd_ioctl(void *, u_long, caddr_t, int, struct lwp *); +Static int ukbd_ioctl(void *, u_long, void *, int, struct lwp *); #if defined(WSDISPLAY_COMPAT_RAWKBD) && defined(UKBD_REPEAT) Static void ukbd_rawrepeat(void *v); #endif @@ -697,7 +697,7 @@ ukbd_rawrepeat(void *v) #endif /* defined(WSDISPLAY_COMPAT_RAWKBD) && defined(UKBD_REPEAT) */ int -ukbd_ioctl(void *v, u_long cmd, caddr_t data, int flag, +ukbd_ioctl(void *v, u_long cmd, void *data, int flag, struct lwp *l) { struct ukbd_softc *sc = v; diff --git a/sys/dev/usb/ukyopon.c b/sys/dev/usb/ukyopon.c index a07528698dd..491444c7a39 100644 --- a/sys/dev/usb/ukyopon.c +++ b/sys/dev/usb/ukyopon.c @@ -1,4 +1,4 @@ -/* $NetBSD: ukyopon.c,v 1.5 2007/01/29 01:52:45 hubertf Exp $ */ +/* $NetBSD: ukyopon.c,v 1.6 2007/03/04 06:02:49 christos Exp $ */ /* * Copyright (c) 1998, 2005 The NetBSD Foundation, Inc. @@ -41,7 +41,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ukyopon.c,v 1.5 2007/01/29 01:52:45 hubertf Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ukyopon.c,v 1.6 2007/03/04 06:02:49 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -90,7 +90,7 @@ struct ukyopon_softc { #define UKYOPON_DATA_IFACE_INDEX 3 Static void ukyopon_get_status(void *, int, u_char *, u_char *); -Static int ukyopon_ioctl(void *, int, u_long, caddr_t, int, usb_proc_ptr); +Static int ukyopon_ioctl(void *, int, u_long, void *, int, usb_proc_ptr); Static struct ucom_methods ukyopon_methods = { ukyopon_get_status, @@ -160,7 +160,7 @@ ukyopon_get_status(void *addr, int portno, u_char *lsr, u_char *msr) } Static int -ukyopon_ioctl(void *addr, int portno, u_long cmd, caddr_t data, int flag, +ukyopon_ioctl(void *addr, int portno, u_long cmd, void *data, int flag, usb_proc_ptr p) { struct ukyopon_softc *sc = addr; diff --git a/sys/dev/usb/ulpt.c b/sys/dev/usb/ulpt.c index 52d7dd4e000..ff2c28b0c27 100644 --- a/sys/dev/usb/ulpt.c +++ b/sys/dev/usb/ulpt.c @@ -1,4 +1,4 @@ -/* $NetBSD: ulpt.c,v 1.76 2006/11/16 01:33:27 christos Exp $ */ +/* $NetBSD: ulpt.c,v 1.77 2007/03/04 06:02:49 christos Exp $ */ /* $FreeBSD: src/sys/dev/usb/ulpt.c,v 1.24 1999/11/17 22:33:44 n_hibma Exp $ */ /* @@ -43,7 +43,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ulpt.c,v 1.76 2006/11/16 01:33:27 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ulpt.c,v 1.77 2007/03/04 06:02:49 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -544,7 +544,7 @@ ulptopen(dev_t dev, int flag, int mode, struct lwp *l) } /* wait 1/4 second, give up if we get a signal */ - error = tsleep((caddr_t)sc, LPTPRI | PCATCH, "ulptop", STEP); + error = tsleep((void *)sc, LPTPRI | PCATCH, "ulptop", STEP); if (error != EWOULDBLOCK) { sc->sc_state = 0; goto done; @@ -833,7 +833,7 @@ ulpt_tick(void *xsc) } int -ulptioctl(dev_t dev, u_long cmd, caddr_t data, +ulptioctl(dev_t dev, u_long cmd, void *data, int flag, struct lwp *l) { return ENODEV; diff --git a/sys/dev/usb/umass_scsipi.c b/sys/dev/usb/umass_scsipi.c index 8c6e013e980..8058b6d1bbf 100644 --- a/sys/dev/usb/umass_scsipi.c +++ b/sys/dev/usb/umass_scsipi.c @@ -1,4 +1,4 @@ -/* $NetBSD: umass_scsipi.c,v 1.29 2006/11/16 01:33:27 christos Exp $ */ +/* $NetBSD: umass_scsipi.c,v 1.30 2007/03/04 06:02:49 christos Exp $ */ /* * Copyright (c) 2001, 2003 The NetBSD Foundation, Inc. @@ -38,7 +38,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: umass_scsipi.c,v 1.29 2006/11/16 01:33:27 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: umass_scsipi.c,v 1.30 2007/03/04 06:02:49 christos Exp $"); #include "atapibus.h" #include "scsibus.h" @@ -97,7 +97,7 @@ Static void umass_scsipi_request(struct scsipi_channel *, scsipi_adapter_req_t, void *); Static void umass_scsipi_minphys(struct buf *bp); Static int umass_scsipi_ioctl(struct scsipi_channel *, u_long, - caddr_t, int, usb_proc_ptr ); + void *, int, usb_proc_ptr ); Static int umass_scsipi_getgeom(struct scsipi_periph *periph, struct disk_parms *, u_long sectors); @@ -345,7 +345,7 @@ umass_scsipi_minphys(struct buf *bp) int umass_scsipi_ioctl(struct scsipi_channel *chan, u_long cmd, - caddr_t arg, int flag, usb_proc_ptr p) + void *arg, int flag, usb_proc_ptr p) { /*struct umass_softc *sc = link->adapter_softc;*/ /*struct umass_scsipi_softc *scbus = sc->bus;*/ diff --git a/sys/dev/usb/umidireg.h b/sys/dev/usb/umidireg.h index f2b69fa55b7..f4ac3465750 100644 --- a/sys/dev/usb/umidireg.h +++ b/sys/dev/usb/umidireg.h @@ -1,4 +1,4 @@ -/* $NetBSD: umidireg.h,v 1.5 2007/02/26 13:14:11 drochner Exp $ */ +/* $NetBSD: umidireg.h,v 1.6 2007/03/04 06:02:49 christos Exp $ */ /* * Copyright (c) 2001 The NetBSD Foundation, Inc. * All rights reserved. @@ -79,7 +79,7 @@ typedef struct { #define TO_D(p) ((usb_descriptor_t *)(p)) -#define NEXT_D(desc) TO_D((caddr_t)(desc)+(desc)->bLength) +#define NEXT_D(desc) TO_D((char *)(desc)+(desc)->bLength) #define TO_IFD(desc) ((usb_interface_descriptor_t *)(desc)) #define TO_CSIFD(desc) ((umidi_cs_interface_descriptor_t *)(desc)) #define TO_EPD(desc) ((usb_endpoint_descriptor_t *)(desc)) diff --git a/sys/dev/usb/umodem_common.c b/sys/dev/usb/umodem_common.c index b8adf046ffd..3baa11dbdb1 100644 --- a/sys/dev/usb/umodem_common.c +++ b/sys/dev/usb/umodem_common.c @@ -1,4 +1,4 @@ -/* $NetBSD: umodem_common.c,v 1.10 2007/01/29 01:52:45 hubertf Exp $ */ +/* $NetBSD: umodem_common.c,v 1.11 2007/03/04 06:02:49 christos Exp $ */ /* * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -51,7 +51,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: umodem_common.c,v 1.10 2007/01/29 01:52:45 hubertf Exp $"); +__KERNEL_RCSID(0, "$NetBSD: umodem_common.c,v 1.11 2007/03/04 06:02:49 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -467,7 +467,7 @@ umodem_param(void *addr, int portno, struct termios *t) } int -umodem_ioctl(void *addr, int portno, u_long cmd, caddr_t data, +umodem_ioctl(void *addr, int portno, u_long cmd, void *data, int flag, usb_proc_ptr p) { struct umodem_softc *sc = addr; diff --git a/sys/dev/usb/umodemvar.h b/sys/dev/usb/umodemvar.h index 21ada9badd6..39d86aea901 100644 --- a/sys/dev/usb/umodemvar.h +++ b/sys/dev/usb/umodemvar.h @@ -1,4 +1,4 @@ -/* $NetBSD: umodemvar.h,v 1.3 2005/12/11 12:24:01 christos Exp $ */ +/* $NetBSD: umodemvar.h,v 1.4 2007/03/04 06:02:49 christos Exp $ */ /* * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -77,7 +77,7 @@ int umodem_get_caps(usbd_device_handle, int *, int *, void umodem_get_status(void *, int portno, u_char *lsr, u_char *msr); void umodem_set(void *, int, int, int); int umodem_param(void *, int, struct termios *); -int umodem_ioctl(void *, int, u_long, caddr_t, int, usb_proc_ptr); +int umodem_ioctl(void *, int, u_long, void *, int, usb_proc_ptr); int umodem_open(void *, int portno); void umodem_close(void *, int portno); int umodem_common_activate(struct umodem_softc *, enum devact); diff --git a/sys/dev/usb/ums.c b/sys/dev/usb/ums.c index dc3ec87deb4..22270d5661d 100644 --- a/sys/dev/usb/ums.c +++ b/sys/dev/usb/ums.c @@ -1,4 +1,4 @@ -/* $NetBSD: ums.c,v 1.67 2006/11/16 01:33:27 christos Exp $ */ +/* $NetBSD: ums.c,v 1.68 2007/03/04 06:02:49 christos Exp $ */ /* * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -42,7 +42,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ums.c,v 1.67 2006/11/16 01:33:27 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ums.c,v 1.68 2007/03/04 06:02:49 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -118,7 +118,7 @@ Static void ums_intr(struct uhidev *addr, void *ibuf, u_int len); Static int ums_enable(void *); Static void ums_disable(void *); -Static int ums_ioctl(void *, u_long, caddr_t, int, struct lwp * ); +Static int ums_ioctl(void *, u_long, void *, int, struct lwp * ); const struct wsmouse_accessops ums_accessops = { ums_enable, @@ -379,7 +379,7 @@ ums_disable(void *v) } Static int -ums_ioctl(void *v, u_long cmd, caddr_t data, int flag, +ums_ioctl(void *v, u_long cmd, void *data, int flag, struct lwp * p) { diff --git a/sys/dev/usb/uplcom.c b/sys/dev/usb/uplcom.c index dcef21c4d44..a1adaffc13c 100644 --- a/sys/dev/usb/uplcom.c +++ b/sys/dev/usb/uplcom.c @@ -1,4 +1,4 @@ -/* $NetBSD: uplcom.c,v 1.52 2007/01/31 10:11:50 msaitoh Exp $ */ +/* $NetBSD: uplcom.c,v 1.53 2007/03/04 06:02:50 christos Exp $ */ /* * Copyright (c) 2001 The NetBSD Foundation, Inc. * All rights reserved. @@ -41,7 +41,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: uplcom.c,v 1.52 2007/01/31 10:11:50 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uplcom.c,v 1.53 2007/03/04 06:02:50 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -135,7 +135,7 @@ Static void uplcom_break(struct uplcom_softc *, int); Static void uplcom_set_line_state(struct uplcom_softc *); Static void uplcom_get_status(void *, int portno, u_char *lsr, u_char *msr); #if TODO -Static int uplcom_ioctl(void *, int, u_long, caddr_t, int, usb_proc_ptr ); +Static int uplcom_ioctl(void *, int, u_long, void *, int, usb_proc_ptr ); #endif Static int uplcom_param(void *, int, struct termios *); Static int uplcom_open(void *, int); @@ -826,7 +826,7 @@ uplcom_get_status(void *addr, int portno, u_char *lsr, u_char *msr) #if TODO int -uplcom_ioctl(void *addr, int portno, u_long cmd, caddr_t data, int flag, +uplcom_ioctl(void *addr, int portno, u_long cmd, void *data, int flag, usb_proc_ptr p) { struct uplcom_softc *sc = addr; diff --git a/sys/dev/usb/urio.c b/sys/dev/usb/urio.c index 0c5cde24a7b..36a760e6c1f 100644 --- a/sys/dev/usb/urio.c +++ b/sys/dev/usb/urio.c @@ -1,4 +1,4 @@ -/* $NetBSD: urio.c,v 1.26 2006/11/16 01:33:27 christos Exp $ */ +/* $NetBSD: urio.c,v 1.27 2007/03/04 06:02:50 christos Exp $ */ /* * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -43,7 +43,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: urio.c,v 1.26 2006/11/16 01:33:27 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: urio.c,v 1.27 2007/03/04 06:02:50 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -488,7 +488,7 @@ uriowrite(dev_t dev, struct uio *uio, int flag) int -urioioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct lwp *l) +urioioctl(dev_t dev, u_long cmd, void *addr, int flag, struct lwp *l) { struct urio_softc * sc; int unit = URIOUNIT(dev); @@ -543,7 +543,7 @@ urioioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct lwp *l) if (len < 0 || len > 32767) return (EINVAL); if (len != 0) { - iov.iov_base = (caddr_t)rcmd->buffer; + iov.iov_base = (void *)rcmd->buffer; iov.iov_len = len; uio.uio_iov = &iov; uio.uio_iovcnt = 1; diff --git a/sys/dev/usb/usb.c b/sys/dev/usb/usb.c index ac25282721d..2888d981222 100644 --- a/sys/dev/usb/usb.c +++ b/sys/dev/usb/usb.c @@ -1,4 +1,4 @@ -/* $NetBSD: usb.c,v 1.95 2007/02/26 13:38:09 drochner Exp $ */ +/* $NetBSD: usb.c,v 1.96 2007/03/04 06:02:50 christos Exp $ */ /* * Copyright (c) 1998, 2002 The NetBSD Foundation, Inc. @@ -44,7 +44,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: usb.c,v 1.95 2007/02/26 13:38:09 drochner Exp $"); +__KERNEL_RCSID(0, "$NetBSD: usb.c,v 1.96 2007/03/04 06:02:50 christos Exp $"); #include "opt_compat_netbsd.h" @@ -531,7 +531,7 @@ usbclose(dev_t dev, int flag, int mode, } int -usbioctl(dev_t devt, u_long cmd, caddr_t data, int flag, struct lwp *l) +usbioctl(dev_t devt, u_long cmd, void *data, int flag, struct lwp *l) { struct usb_softc *sc; int unit = minor(devt); @@ -594,7 +594,7 @@ usbioctl(dev_t devt, u_long cmd, caddr_t data, int flag, struct lwp *l) sc->sc_bus->devices[addr] == 0) return (EINVAL); if (len != 0) { - iov.iov_base = (caddr_t)ur->ucr_data; + iov.iov_base = (void *)ur->ucr_data; iov.iov_len = len; uio.uio_iov = &iov; uio.uio_iovcnt = 1; diff --git a/sys/dev/usb/usb_mem.c b/sys/dev/usb/usb_mem.c index 36b3176d098..5ed2fb469df 100644 --- a/sys/dev/usb/usb_mem.c +++ b/sys/dev/usb/usb_mem.c @@ -1,4 +1,4 @@ -/* $NetBSD: usb_mem.c,v 1.31 2006/11/16 01:33:27 christos Exp $ */ +/* $NetBSD: usb_mem.c,v 1.32 2007/03/04 06:02:50 christos Exp $ */ /* * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -45,7 +45,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: usb_mem.c,v 1.31 2006/11/16 01:33:27 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: usb_mem.c,v 1.32 2007/03/04 06:02:50 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -258,7 +258,7 @@ usb_allocmem(usbd_bus_handle bus, size_t size, size_t align, usb_dma_t *p) } b->flags = 0; for (i = 0; i < USB_MEM_BLOCK; i += USB_MEM_SMALL) { - f = (struct usb_frag_dma *)(b->kaddr + i); + f = (struct usb_frag_dma *)((char *)b->kaddr + i); f->block = b; f->offs = i; LIST_INSERT_HEAD(&usb_frag_freelist, f, next); diff --git a/sys/dev/usb/usb_mem.h b/sys/dev/usb/usb_mem.h index 7ccd18bc15e..db1f0ad2743 100644 --- a/sys/dev/usb/usb_mem.h +++ b/sys/dev/usb/usb_mem.h @@ -1,4 +1,4 @@ -/* $NetBSD: usb_mem.h,v 1.23 2005/12/11 12:24:01 christos Exp $ */ +/* $NetBSD: usb_mem.h,v 1.24 2007/03/04 06:02:50 christos Exp $ */ /* $FreeBSD: src/sys/dev/usb/usb_mem.h,v 1.9 1999/11/17 22:33:47 n_hibma Exp $ */ /* @@ -42,7 +42,7 @@ typedef struct usb_dma_block { bus_dma_tag_t tag; bus_dmamap_t map; - caddr_t kaddr; + void *kaddr; bus_dma_segment_t segs[1]; int nsegs; size_t size; @@ -55,7 +55,7 @@ typedef struct usb_dma_block { #define DMAADDR(dma, o) ((dma)->block->map->dm_segs[0].ds_addr + (dma)->offs + (o)) #define KERNADDR(dma, o) \ - ((void *)((char *)((dma)->block->kaddr + (dma)->offs) + (o))) + ((void *)((char *)(dma)->block->kaddr + (dma)->offs + (o))) usbd_status usb_allocmem(usbd_bus_handle,size_t,size_t, usb_dma_t *); void usb_freemem(usbd_bus_handle, usb_dma_t *); @@ -66,7 +66,7 @@ struct extent; struct usb_dma_reserve { bus_dma_tag_t dtag; bus_dmamap_t map; - caddr_t vaddr; + void *vaddr; bus_addr_t paddr; size_t size; struct extent *extent; diff --git a/sys/dev/usb/usb_port.h b/sys/dev/usb/usb_port.h index 8e6c47b6ece..387a6be417e 100644 --- a/sys/dev/usb/usb_port.h +++ b/sys/dev/usb/usb_port.h @@ -1,5 +1,5 @@ /* $OpenBSD: usb_port.h,v 1.18 2000/09/06 22:42:10 rahnds Exp $ */ -/* $NetBSD: usb_port.h,v 1.73 2006/11/16 01:33:27 christos Exp $ */ +/* $NetBSD: usb_port.h,v 1.74 2007/03/04 06:02:50 christos Exp $ */ /* $FreeBSD: src/sys/dev/usb/usb_port.h,v 1.21 1999/11/17 22:33:47 n_hibma Exp $ */ /* @@ -418,7 +418,7 @@ MALLOC_DECLARE(M_USBHC); #define USBDEVPTRNAME(bdev) device_get_nameunit(bdev) #define USBGETSOFTC(bdev) (device_get_softc(bdev)) -#define DECLARE_USB_DMA_T typedef void * usb_dma_t +#define DECLARE_USB_DMA_T typedef void *usb_dma_t typedef struct proc *usb_proc_ptr; diff --git a/sys/dev/usb/usbdi_util.c b/sys/dev/usb/usbdi_util.c index 0559d394362..317d96f0644 100644 --- a/sys/dev/usb/usbdi_util.c +++ b/sys/dev/usb/usbdi_util.c @@ -1,4 +1,4 @@ -/* $NetBSD: usbdi_util.c,v 1.48 2007/02/26 13:50:06 drochner Exp $ */ +/* $NetBSD: usbdi_util.c,v 1.49 2007/03/04 06:02:50 christos Exp $ */ /* * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -38,7 +38,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: usbdi_util.c,v 1.48 2007/02/26 13:50:06 drochner Exp $"); +__KERNEL_RCSID(0, "$NetBSD: usbdi_util.c,v 1.49 2007/03/04 06:02:50 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -450,7 +450,7 @@ usbd_bulk_transfer(usbd_xfer_handle xfer, usbd_pipe_handle pipe, splx(s); return (err); } - error = tsleep((caddr_t)xfer, PZERO | PCATCH, lbl, 0); + error = tsleep((void *)xfer, PZERO | PCATCH, lbl, 0); splx(s); if (error) { DPRINTF(("usbd_bulk_transfer: tsleep=%d\n", error)); diff --git a/sys/dev/usb/uscanner.c b/sys/dev/usb/uscanner.c index ec3fd79704b..9cc7e5f4912 100644 --- a/sys/dev/usb/uscanner.c +++ b/sys/dev/usb/uscanner.c @@ -1,4 +1,4 @@ -/* $NetBSD: uscanner.c,v 1.54 2006/11/16 01:33:27 christos Exp $ */ +/* $NetBSD: uscanner.c,v 1.55 2007/03/04 06:02:50 christos Exp $ */ /* * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -39,7 +39,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: uscanner.c,v 1.54 2006/11/16 01:33:27 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uscanner.c,v 1.55 2007/03/04 06:02:50 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -769,7 +769,7 @@ uscannerkqfilter(dev_t dev, struct knote *kn) } int -uscannerioctl(dev_t dev, u_long cmd, caddr_t addr, +uscannerioctl(dev_t dev, u_long cmd, void *addr, int flag, struct lwp *l) { return (EINVAL); diff --git a/sys/dev/usb/ustir.c b/sys/dev/usb/ustir.c index eedd8d38119..fe69920ec95 100644 --- a/sys/dev/usb/ustir.c +++ b/sys/dev/usb/ustir.c @@ -1,4 +1,4 @@ -/* $NetBSD: ustir.c,v 1.17 2006/11/16 01:33:27 christos Exp $ */ +/* $NetBSD: ustir.c,v 1.18 2007/03/04 06:02:50 christos Exp $ */ /* * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ustir.c,v 1.17 2006/11/16 01:33:27 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ustir.c,v 1.18 2007/03/04 06:02:50 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -220,7 +220,7 @@ Static int ustir_poll(void *h, int events, struct lwp *l); Static int ustir_kqfilter(void *h, struct knote *kn); #ifdef USTIR_DEBUG_IOCTLS -Static int ustir_ioctl(void *h, u_long cmd, caddr_t addr, int flag, struct lwp *l); +Static int ustir_ioctl(void *h, u_long cmd, void *addr, int flag, struct lwp *l); #endif Static struct irframe_methods const ustir_methods = { @@ -1296,7 +1296,7 @@ ustir_kqfilter(void *h, struct knote *kn) } #ifdef USTIR_DEBUG_IOCTLS -Static int ustir_ioctl(void *h, u_long cmd, caddr_t addr, int flag, struct lwp *l) +Static int ustir_ioctl(void *h, u_long cmd, void *addr, int flag, struct lwp *l) { struct ustir_softc *sc = h; int error; diff --git a/sys/dev/usb/utoppy.c b/sys/dev/usb/utoppy.c index e22e52dcf66..1ca14a123d0 100644 --- a/sys/dev/usb/utoppy.c +++ b/sys/dev/usb/utoppy.c @@ -1,4 +1,4 @@ -/* $NetBSD: utoppy.c,v 1.8 2006/11/16 01:33:27 christos Exp $ */ +/* $NetBSD: utoppy.c,v 1.9 2007/03/04 06:02:50 christos Exp $ */ /*- * Copyright (c) 2006 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: utoppy.c,v 1.8 2006/11/16 01:33:27 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: utoppy.c,v 1.9 2007/03/04 06:02:50 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -535,7 +535,7 @@ utoppy_bulk_transfer(usbd_xfer_handle xfer, usbd_pipe_handle pipe, splx(s); return (err); } - error = tsleep((caddr_t)xfer, PZERO, lbl, 0); + error = tsleep((void *)xfer, PZERO, lbl, 0); splx(s); if (error) { usbd_abort_pipe(pipe); @@ -1658,7 +1658,7 @@ utoppywrite(dev_t dev, struct uio *uio, int flags) } int -utoppyioctl(dev_t dev, u_long cmd, caddr_t data, int flag, +utoppyioctl(dev_t dev, u_long cmd, void *data, int flag, struct lwp *l) { struct utoppy_softc *sc; diff --git a/sys/dev/usb/xboxcontroller.c b/sys/dev/usb/xboxcontroller.c index 4bf83f2b2ce..ffce1127540 100644 --- a/sys/dev/usb/xboxcontroller.c +++ b/sys/dev/usb/xboxcontroller.c @@ -1,4 +1,4 @@ -/* $NetBSD: xboxcontroller.c,v 1.3 2007/01/07 19:08:05 jmcneill Exp $ */ +/* $NetBSD: xboxcontroller.c,v 1.4 2007/03/04 06:02:50 christos Exp $ */ /*- * Copyright (c) 2007 Jared D. McNeill <jmcneill@invisible.ca> @@ -33,7 +33,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: xboxcontroller.c,v 1.3 2007/01/07 19:08:05 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: xboxcontroller.c,v 1.4 2007/03/04 06:02:50 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -74,7 +74,7 @@ static void xboxcontroller_intr(usbd_xfer_handle, usbd_private_handle, usbd_status); static int xboxcontroller_wsmouse_enable(void *); -static int xboxcontroller_wsmouse_ioctl(void *, u_long, caddr_t, int, +static int xboxcontroller_wsmouse_ioctl(void *, u_long, void *, int, struct lwp *); static void xboxcontroller_wsmouse_disable(void *); @@ -319,7 +319,7 @@ xboxcontroller_wsmouse_disable(void *opaque) } static int -xboxcontroller_wsmouse_ioctl(void *opaque, u_long cmd, caddr_t data, int flag, +xboxcontroller_wsmouse_ioctl(void *opaque, u_long cmd, void *data, int flag, struct lwp *l) { diff --git a/sys/dev/verified_exec.c b/sys/dev/verified_exec.c index a62f3c17973..3a9a27196fe 100644 --- a/sys/dev/verified_exec.c +++ b/sys/dev/verified_exec.c @@ -1,4 +1,4 @@ -/* $NetBSD: verified_exec.c,v 1.58 2007/02/08 04:22:27 elad Exp $ */ +/* $NetBSD: verified_exec.c,v 1.59 2007/03/04 06:01:43 christos Exp $ */ /*- * Copyright (c) 2005, 2006 Elad Efrat <elad@NetBSD.org> @@ -30,9 +30,9 @@ #include <sys/cdefs.h> #if defined(__NetBSD__) -__KERNEL_RCSID(0, "$NetBSD: verified_exec.c,v 1.58 2007/02/08 04:22:27 elad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: verified_exec.c,v 1.59 2007/03/04 06:01:43 christos Exp $"); #else -__RCSID("$Id: verified_exec.c,v 1.58 2007/02/08 04:22:27 elad Exp $\n$NetBSD: verified_exec.c,v 1.58 2007/02/08 04:22:27 elad Exp $"); +__RCSID("$Id: verified_exec.c,v 1.59 2007/03/04 06:01:43 christos Exp $\n$NetBSD: verified_exec.c,v 1.59 2007/03/04 06:01:43 christos Exp $"); #endif #include <sys/param.h> @@ -137,7 +137,7 @@ veriexecclose(dev_t dev, int flags, int fmt, } int -veriexecioctl(dev_t dev, u_long cmd, caddr_t data, int flags, +veriexecioctl(dev_t dev, u_long cmd, void *data, int flags, struct lwp *l) { struct plistref *plistref; diff --git a/sys/dev/vme/si.c b/sys/dev/vme/si.c index daa0dd1fcab..f8fcc2a1f9f 100644 --- a/sys/dev/vme/si.c +++ b/sys/dev/vme/si.c @@ -1,4 +1,4 @@ -/* $NetBSD: si.c,v 1.17 2006/03/29 04:16:51 thorpej Exp $ */ +/* $NetBSD: si.c,v 1.18 2007/03/04 06:02:50 christos Exp $ */ /*- * Copyright (c) 1996,2000 The NetBSD Foundation, Inc. @@ -80,7 +80,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: si.c,v 1.17 2006/03/29 04:16:51 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: si.c,v 1.18 2007/03/04 06:02:50 christos Exp $"); #include "opt_ddb.h" @@ -519,7 +519,7 @@ found: * NOTE: it is not safe to sleep here! */ if (bus_dmamap_load(sc->sc_dmatag, dh->dh_dmamap, - (caddr_t)addr, xlen, NULL, BUS_DMA_NOWAIT) != 0) { + (void *)addr, xlen, NULL, BUS_DMA_NOWAIT) != 0) { /* Can't remap segment */ printf("si_dma_alloc: can't remap 0x%lx/0x%x, doing PIO\n", addr, dh->dh_maplen); diff --git a/sys/dev/vme/xd.c b/sys/dev/vme/xd.c index 49a73316475..a44ffb87895 100644 --- a/sys/dev/vme/xd.c +++ b/sys/dev/vme/xd.c @@ -1,4 +1,4 @@ -/* $NetBSD: xd.c,v 1.65 2007/01/04 18:44:46 elad Exp $ */ +/* $NetBSD: xd.c,v 1.66 2007/03/04 06:02:50 christos Exp $ */ /* * @@ -51,7 +51,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: xd.c,v 1.65 2007/01/04 18:44:46 elad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: xd.c,v 1.66 2007/03/04 06:02:50 christos Exp $"); #undef XDC_DEBUG /* full debug */ #define XDC_DIAG /* extra sanity checks */ @@ -224,7 +224,7 @@ int xdc_remove_iorq(struct xdc_softc *); int xdc_reset(struct xdc_softc *, int, int, int, struct xd_softc *); inline void xdc_rqinit(struct xd_iorq *, struct xdc_softc *, struct xd_softc *, int, u_long, int, - caddr_t, struct buf *); + void *, struct buf *); void xdc_rqtopb(struct xd_iorq *, struct xd_iopb *, int, int); void xdc_start(struct xdc_softc *, int); int xdc_startbuf(struct xdc_softc *, struct xd_softc *, struct buf *); @@ -232,9 +232,9 @@ int xdc_submit_iorq(struct xdc_softc *, int, int); void xdc_tick(void *); void xdc_xdreset(struct xdc_softc *, struct xd_softc *); int xd_dmamem_alloc(bus_dma_tag_t, bus_dmamap_t, bus_dma_segment_t *, - int *, bus_size_t, caddr_t *, bus_addr_t *); + int *, bus_size_t, void **, bus_addr_t *); void xd_dmamem_free(bus_dma_tag_t, bus_dmamap_t, bus_dma_segment_t *, - int, bus_size_t, caddr_t); + int, bus_size_t, void *); /* machine interrupt hook */ @@ -399,7 +399,7 @@ xd_dmamem_alloc(tag, map, seg, nsegp, len, kvap, dmap) bus_dma_segment_t *seg; int *nsegp; bus_size_t len; - caddr_t *kvap; + void * *kvap; bus_addr_t *dmap; { int nseg; @@ -437,7 +437,7 @@ xd_dmamem_free(tag, map, seg, nseg, len, kva) bus_dma_segment_t *seg; int nseg; bus_size_t len; - caddr_t kva; + void * kva; { bus_dmamap_unload(tag, map); @@ -584,7 +584,7 @@ xdcattach(parent, self, aux) /* Get DMA buffer for iorq descriptors */ if ((error = xd_dmamem_alloc(xdc->dmatag, xdc->iopmap, &seg, &rseg, XDC_MAXIOPB * sizeof(struct xd_iopb), - (caddr_t *)&xdc->iopbase, + (void **)&xdc->iopbase, &busaddr)) != 0) { printf("%s: DMA buffer alloc error %d\n", xdc->sc_dev.dv_xname, error); @@ -736,8 +736,8 @@ xdattach(parent, self, aux) int rseg, error; bus_dma_segment_t seg; bus_addr_t busaddr; - caddr_t dmaddr; - caddr_t buf; + void * dmaddr; + void * buf; /* * Always re-initialize the disk structure. We want statistics @@ -780,13 +780,13 @@ xdattach(parent, self, aux) buf = NULL; if ((error = xd_dmamem_alloc(xdc->dmatag, xdc->auxmap, &seg, &rseg, XDFM_BPS, - (caddr_t *)&buf, + (void **)&buf, &busaddr)) != 0) { printf("%s: DMA buffer alloc error %d\n", xdc->sc_dev.dv_xname, error); return; } - dmaddr = (caddr_t)(u_long)BUS_ADDR_PADDR(busaddr); + dmaddr = (void *)(u_long)BUS_ADDR_PADDR(busaddr); /* first try and reset the drive */ @@ -971,7 +971,7 @@ int xddump(dev, blkno, va, size) dev_t dev; daddr_t blkno; - caddr_t va; + void *va; size_t size; { int unit, part; @@ -1010,7 +1010,7 @@ int xdioctl(dev, command, addr, flag, l) dev_t dev; u_long command; - caddr_t addr; + void *addr; int flag; struct lwp *l; @@ -1392,7 +1392,7 @@ xdc_rqinit(rq, xdc, xd, md, blk, cnt, db, bp) int md; u_long blk; int cnt; - caddr_t db; + void *db; struct buf *bp; { rq->xdc = xdc; @@ -1594,7 +1594,7 @@ xdc_startbuf(xdcsc, xdsc, bp) struct xd_iorq *iorq; struct xd_iopb *iopb; u_long block; -/* caddr_t dbuf;*/ +/* void *dbuf;*/ int error; if (!xdcsc->nfree) @@ -1648,7 +1648,7 @@ xdc_startbuf(xdcsc, xdsc, bp) /* init iorq and load iopb from it */ xdc_rqinit(iorq, xdcsc, xdsc, XD_SUB_NORM | XD_MODE_VERBO, block, bp->b_bcount / XDFM_BPS, - (caddr_t)(u_long)iorq->dmamap->dm_segs[0].ds_addr, + (void *)(u_long)iorq->dmamap->dm_segs[0].ds_addr, bp); xdc_rqtopb(iorq, iopb, (bp->b_flags & B_READ) ? XDCMD_RD : XDCMD_WR, 0); @@ -2393,7 +2393,7 @@ xdc_ioctlcmd(xd, dev, xio) { int s, rqno, dummy; - caddr_t dvmabuf = NULL, buf = NULL; + void *dvmabuf = NULL, buf = NULL; struct xdc_softc *xdcsc; int rseg, error; bus_dma_segment_t seg; @@ -2488,7 +2488,7 @@ xdc_ioctlcmd(xd, dev, xio) &busbuf)) != 0) { return (error); } - dvmabuf = (caddr_t)(u_long)BUS_ADDR_PADDR(busbuf); + dvmabuf = (void *)(u_long)BUS_ADDR_PADDR(busbuf); if (xio->cmd == XDCMD_WR || xio->cmd == XDCMD_XWR) { if ((error = copyin(xio->dptr, buf, xio->dlen)) != 0) { diff --git a/sys/dev/vme/xio.h b/sys/dev/vme/xio.h index 9080ef9e250..de672319dea 100644 --- a/sys/dev/vme/xio.h +++ b/sys/dev/vme/xio.h @@ -1,4 +1,4 @@ -/* $NetBSD: xio.h,v 1.3 2006/08/27 19:18:08 christos Exp $ */ +/* $NetBSD: xio.h,v 1.4 2007/03/04 06:02:51 christos Exp $ */ /* * @@ -53,7 +53,7 @@ struct xd_iocmd { u_short sectcnt;/* in,out: sector count (hw_spt on read drive param) */ u_short dlen; /* in: length of data buffer (good sanity check) */ u_int block; /* in: block number */ - caddr_t dptr; /* in: data buffer to do I/O from */ + void *dptr; /* in: data buffer to do I/O from */ }; #ifndef DIOSXDCMD diff --git a/sys/dev/vme/xy.c b/sys/dev/vme/xy.c index e5c853eb97f..475c3ab91a0 100644 --- a/sys/dev/vme/xy.c +++ b/sys/dev/vme/xy.c @@ -1,4 +1,4 @@ -/* $NetBSD: xy.c,v 1.68 2007/01/04 18:44:46 elad Exp $ */ +/* $NetBSD: xy.c,v 1.69 2007/03/04 06:02:51 christos Exp $ */ /* * @@ -51,7 +51,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: xy.c,v 1.68 2007/01/04 18:44:46 elad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: xy.c,v 1.69 2007/03/04 06:02:51 christos Exp $"); #undef XYC_DEBUG /* full debug */ #undef XYC_DIAG /* extra sanity checks */ @@ -166,7 +166,7 @@ int xyc_reset(struct xyc_softc *, int, struct xy_iorq *, int, struct xy_softc *); inline void xyc_rqinit(struct xy_iorq *, struct xyc_softc *, struct xy_softc *, int, u_long, int, - caddr_t, struct buf *); + void *, struct buf *); void xyc_rqtopb(struct xy_iorq *, struct xy_iopb *, int, int); void xyc_start(struct xyc_softc *, struct xy_iorq *); int xyc_startbuf(struct xyc_softc *, struct xy_softc *, struct buf *); @@ -175,9 +175,9 @@ void xyc_tick(void *); int xyc_unbusy(struct xyc *, int); void xyc_xyreset(struct xyc_softc *, struct xy_softc *); int xy_dmamem_alloc(bus_dma_tag_t, bus_dmamap_t, bus_dma_segment_t *, - int *, bus_size_t, caddr_t *, bus_addr_t *); + int *, bus_size_t, void **, bus_addr_t *); void xy_dmamem_free(bus_dma_tag_t, bus_dmamap_t, bus_dma_segment_t *, - int, bus_size_t, caddr_t); + int, bus_size_t, void *); /* machine interrupt hook */ int xycintr(void *); @@ -315,7 +315,7 @@ xy_dmamem_alloc(tag, map, seg, nsegp, len, kvap, dmap) bus_dma_segment_t *seg; int *nsegp; bus_size_t len; - caddr_t *kvap; + void * *kvap; bus_addr_t *dmap; { int nseg; @@ -352,7 +352,7 @@ xy_dmamem_free(tag, map, seg, nseg, len, kva) bus_dma_segment_t *seg; int nseg; bus_size_t len; - caddr_t kva; + void * kva; { bus_dmamap_unload(tag, map); @@ -489,7 +489,7 @@ xycattach(parent, self, aux) /* Get DMA buffer for iorq descriptors */ if ((error = xy_dmamem_alloc(xyc->dmatag, xyc->iopmap, &seg, &rseg, XYC_MAXIOPB * sizeof(struct xy_iopb), - (caddr_t *)&xyc->iopbase, + (void **)&xyc->iopbase, &busaddr)) != 0) { printf("%s: DMA buffer alloc error %d\n", xyc->sc_dev.dv_xname, error); @@ -633,8 +633,8 @@ xyattach(parent, self, aux) int rseg, error; bus_dma_segment_t seg; bus_addr_t busaddr; - caddr_t dmaddr; - caddr_t buf; + void * dmaddr; + void * buf; /* * Always re-initialize the disk structure. We want statistics @@ -684,13 +684,13 @@ xyattach(parent, self, aux) buf = NULL; if ((error = xy_dmamem_alloc(xyc->dmatag, xyc->auxmap, &seg, &rseg, XYFM_BPS, - (caddr_t *)&buf, + (void **)&buf, &busaddr)) != 0) { printf("%s: DMA buffer alloc error %d\n", xyc->sc_dev.dv_xname, error); return; } - dmaddr = (caddr_t)(u_long)BUS_ADDR_PADDR(busaddr); + dmaddr = (void *)(u_long)BUS_ADDR_PADDR(busaddr); /* first try and reset the drive */ error = xyc_cmd(xyc, XYCMD_RST, 0, xy->xy_drive, 0, 0, 0, fmode); @@ -884,7 +884,7 @@ int xydump(dev, blkno, va, size) dev_t dev; daddr_t blkno; - caddr_t va; + void *va; size_t size; { int unit, part; @@ -923,7 +923,7 @@ int xyioctl(dev, command, addr, flag, l) dev_t dev; u_long command; - caddr_t addr; + void *addr; int flag; struct lwp *l; @@ -1295,7 +1295,7 @@ xyc_rqinit(rq, xyc, xy, md, blk, cnt, db, bp) int md; u_long blk; int cnt; - caddr_t db; + void *db; struct buf *bp; { rq->xyc = xyc; @@ -1487,7 +1487,7 @@ xyc_startbuf(xycsc, xysc, bp) /* init iorq and load iopb from it */ xyc_rqinit(iorq, xycsc, xysc, XY_SUB_NORM | XY_MODE_VERBO, block, bp->b_bcount / XYFM_BPS, - (caddr_t)(u_long)iorq->dmamap->dm_segs[0].ds_addr, + (void *)(u_long)iorq->dmamap->dm_segs[0].ds_addr, bp); xyc_rqtopb(iorq, iopb, (bp->b_flags & B_READ) ? XYCMD_RD : XYCMD_WR, 0); @@ -2210,7 +2210,7 @@ xyc_ioctlcmd(xy, dev, xio) { int s, rqno, dummy = 0; - caddr_t dvmabuf = NULL, buf = NULL; + void *dvmabuf = NULL, buf = NULL; struct xyc_softc *xycsc; int rseg, error; bus_dma_segment_t seg; @@ -2253,7 +2253,7 @@ xyc_ioctlcmd(xy, dev, xio) &busbuf)) != 0) { return (error); } - dvmabuf = (caddr_t)(u_long)BUS_ADDR_PADDR(busbuf); + dvmabuf = (void *)(u_long)BUS_ADDR_PADDR(busbuf); if (xio->cmd == XYCMD_WR) { if ((error = copyin(xio->dptr, buf, xio->dlen)) != 0) { diff --git a/sys/dev/vnd.c b/sys/dev/vnd.c index 7339f83c980..ac877d670fe 100644 --- a/sys/dev/vnd.c +++ b/sys/dev/vnd.c @@ -1,4 +1,4 @@ -/* $NetBSD: vnd.c,v 1.162 2007/02/21 22:59:58 thorpej Exp $ */ +/* $NetBSD: vnd.c,v 1.163 2007/03/04 06:01:43 christos Exp $ */ /*- * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc. @@ -137,7 +137,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: vnd.c,v 1.162 2007/02/21 22:59:58 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: vnd.c,v 1.163 2007/03/04 06:01:43 christos Exp $"); #if defined(_KERNEL_OPT) #include "fs_nfs.h" @@ -918,7 +918,7 @@ vnd_cget(struct lwp *l, int unit, int *un, struct vattr *va) /* ARGSUSED */ static int -vndioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct lwp *l) +vndioctl(dev_t dev, u_long cmd, void *data, int flag, struct lwp *l) { int unit = vndunit(dev); struct vnd_softc *vnd; @@ -1019,7 +1019,7 @@ vndioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct lwp *l) M_TEMP, M_WAITOK); /* read compressed file header */ - error = vn_rdwr(UIO_READ, nd.ni_vp, (caddr_t)ch, + error = vn_rdwr(UIO_READ, nd.ni_vp, (void *)ch, sizeof(struct vnd_comp_header), 0, UIO_SYSSPACE, IO_UNIT|IO_NODELOCKED, l->l_cred, NULL, NULL); if(error) { @@ -1059,7 +1059,7 @@ vndioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct lwp *l) /* read in the offsets */ error = vn_rdwr(UIO_READ, nd.ni_vp, - (caddr_t)vnd->sc_comp_offsets, + (void *)vnd->sc_comp_offsets, sizeof(u_int64_t) * vnd->sc_comp_numoffs, sizeof(struct vnd_comp_header), UIO_SYSSPACE, IO_UNIT|IO_NODELOCKED, l->l_cred, NULL, NULL); @@ -1595,7 +1595,7 @@ vndsize(dev_t dev) } static int -vnddump(dev_t dev, daddr_t blkno, caddr_t va, +vnddump(dev_t dev, daddr_t blkno, void *va, size_t size) { @@ -1736,7 +1736,7 @@ compstrategy(struct buf *bp, off_t bn) (struct vnd_softc *)device_lookup(&vnd_cd, unit); u_int32_t comp_block; struct uio auio; - caddr_t addr; + char *addr; int s; /* set up constants for data move */ diff --git a/sys/dev/wscons/tpcalib.c b/sys/dev/wscons/tpcalib.c index 3031bcc6a4d..cd349a17933 100644 --- a/sys/dev/wscons/tpcalib.c +++ b/sys/dev/wscons/tpcalib.c @@ -1,4 +1,4 @@ -/* $NetBSD: tpcalib.c,v 1.10 2006/11/16 01:33:31 christos Exp $ */ +/* $NetBSD: tpcalib.c,v 1.11 2007/03/04 06:02:51 christos Exp $ */ /* * Copyright (c) 1999-2003 TAKEMURA Shin All rights reserved. @@ -28,7 +28,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: tpcalib.c,v 1.10 2006/11/16 01:33:31 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: tpcalib.c,v 1.11 2007/03/04 06:02:51 christos Exp $"); #ifdef _KERNEL_OPT #include "opt_tpcalib.h" @@ -89,7 +89,7 @@ tpcalib_trans(struct tpcalib_softc *sc, int rawx, int rawy, int *x, int *y) } int -tpcalib_ioctl(struct tpcalib_softc *sc, u_long cmd, caddr_t data, +tpcalib_ioctl(struct tpcalib_softc *sc, u_long cmd, void *data, int flag, struct lwp *l) { const struct wsmouse_calibcoords *d; diff --git a/sys/dev/wscons/tpcalibvar.h b/sys/dev/wscons/tpcalibvar.h index 36729000151..a18d62e8bab 100644 --- a/sys/dev/wscons/tpcalibvar.h +++ b/sys/dev/wscons/tpcalibvar.h @@ -1,4 +1,4 @@ -/* $NetBSD: tpcalibvar.h,v 1.3 2006/10/09 10:37:23 peter Exp $ */ +/* $NetBSD: tpcalibvar.h,v 1.4 2007/03/04 06:02:51 christos Exp $ */ /* * Copyright (c) 1999 Shin Takemura All rights reserved. @@ -39,5 +39,5 @@ struct tpcalib_softc { int tpcalib_init(struct tpcalib_softc *); void tpcalib_reset(struct tpcalib_softc *); void tpcalib_trans(struct tpcalib_softc *, int, int, int *, int *); -int tpcalib_ioctl(struct tpcalib_softc *, u_long, caddr_t, int, +int tpcalib_ioctl(struct tpcalib_softc *, u_long, void *, int, struct lwp *); diff --git a/sys/dev/wscons/wsdisplay.c b/sys/dev/wscons/wsdisplay.c index fc06a21837d..2321e031934 100644 --- a/sys/dev/wscons/wsdisplay.c +++ b/sys/dev/wscons/wsdisplay.c @@ -1,4 +1,4 @@ -/* $NetBSD: wsdisplay.c,v 1.106 2006/11/16 01:33:31 christos Exp $ */ +/* $NetBSD: wsdisplay.c,v 1.107 2007/03/04 06:02:51 christos Exp $ */ /* * Copyright (c) 1996, 1997 Christopher G. Demetriou. All rights reserved. @@ -31,7 +31,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: wsdisplay.c,v 1.106 2006/11/16 01:33:31 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: wsdisplay.c,v 1.107 2007/03/04 06:02:51 christos Exp $"); #include "opt_wsdisplay_compat.h" #include "opt_wsmsgattrs.h" @@ -863,7 +863,7 @@ wsdisplayclose(dev_t dev, int flag, int mode, struct lwp *l) if (scr->scr_rawkbd) { int kbmode = WSKBD_TRANSLATED; (void)wsdisplay_internal_ioctl(sc, scr, WSKBDIO_SETMODE, - (caddr_t)&kbmode, 0, l); + (void *)&kbmode, 0, l); } #endif @@ -994,7 +994,7 @@ wsdisplaytty(dev_t dev) } int -wsdisplayioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct lwp *l) +wsdisplayioctl(dev_t dev, u_long cmd, void *data, int flag, struct lwp *l) { struct wsdisplay_softc *sc; struct tty *tp; @@ -1049,12 +1049,12 @@ wsdisplay_param(struct device *dev, u_long cmd, struct wsdisplay_param *dp) struct wsdisplay_softc *sc = (struct wsdisplay_softc *)dev; return ((*sc->sc_accessops->ioctl)(sc->sc_accesscookie, sc->sc_focus->scr_dconf->emulcookie, - cmd, (caddr_t)dp, 0, NULL)); + cmd, (void *)dp, 0, NULL)); } int wsdisplay_internal_ioctl(struct wsdisplay_softc *sc, struct wsscreen *scr, - u_long cmd, caddr_t data, int flag, struct lwp *l) + u_long cmd, void *data, int flag, struct lwp *l) { int error; char namebuf[16]; @@ -1201,7 +1201,7 @@ wsdisplay_internal_ioctl(struct wsdisplay_softc *sc, struct wsscreen *scr, } int -wsdisplay_stat_ioctl(struct wsdisplay_softc *sc, u_long cmd, caddr_t data, +wsdisplay_stat_ioctl(struct wsdisplay_softc *sc, u_long cmd, void *data, int flag, struct lwp *l) { switch (cmd) { @@ -1214,7 +1214,7 @@ wsdisplay_stat_ioctl(struct wsdisplay_softc *sc, u_long cmd, caddr_t data, } int -wsdisplay_cfg_ioctl(struct wsdisplay_softc *sc, u_long cmd, caddr_t data, +wsdisplay_cfg_ioctl(struct wsdisplay_softc *sc, u_long cmd, void *data, int flag, struct lwp *l) { int error; diff --git a/sys/dev/wscons/wsdisplay_compat_usl.c b/sys/dev/wscons/wsdisplay_compat_usl.c index 39b8457ad04..31aa44fe7af 100644 --- a/sys/dev/wscons/wsdisplay_compat_usl.c +++ b/sys/dev/wscons/wsdisplay_compat_usl.c @@ -1,4 +1,4 @@ -/* $NetBSD: wsdisplay_compat_usl.c,v 1.39 2007/02/09 21:55:30 ad Exp $ */ +/* $NetBSD: wsdisplay_compat_usl.c,v 1.40 2007/03/04 06:02:51 christos Exp $ */ /* * Copyright (c) 1998 @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: wsdisplay_compat_usl.c,v 1.39 2007/02/09 21:55:30 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: wsdisplay_compat_usl.c,v 1.40 2007/03/04 06:02:51 christos Exp $"); #include "opt_compat_freebsd.h" #include "opt_compat_netbsd.h" @@ -289,7 +289,7 @@ usl_attachtimeout(void *arg) } int -wsdisplay_usl_ioctl1(struct wsdisplay_softc *sc, u_long cmd, caddr_t data, +wsdisplay_usl_ioctl1(struct wsdisplay_softc *sc, u_long cmd, void *data, int flag, struct lwp *l) { int idx, maxidx; @@ -360,7 +360,7 @@ wsdisplay_usl_ioctl1(struct wsdisplay_softc *sc, u_long cmd, caddr_t data, int wsdisplay_usl_ioctl2(struct wsdisplay_softc *sc, struct wsscreen *scr, - u_long cmd, caddr_t data, int flag, struct lwp *l) + u_long cmd, void *data, int flag, struct lwp *l) { struct proc *p = l->l_proc; int intarg = 0, res; diff --git a/sys/dev/wscons/wsdisplay_vcons.c b/sys/dev/wscons/wsdisplay_vcons.c index 2faf23d95d1..1fbc584598f 100644 --- a/sys/dev/wscons/wsdisplay_vcons.c +++ b/sys/dev/wscons/wsdisplay_vcons.c @@ -1,4 +1,4 @@ -/* $NetBSD: wsdisplay_vcons.c,v 1.9 2006/11/16 01:33:31 christos Exp $ */ +/* $NetBSD: wsdisplay_vcons.c,v 1.10 2007/03/04 06:02:51 christos Exp $ */ /*- * Copyright (c) 2005, 2006 Michael Lorenz @@ -34,7 +34,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: wsdisplay_vcons.c,v 1.9 2006/11/16 01:33:31 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: wsdisplay_vcons.c,v 1.10 2007/03/04 06:02:51 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -60,7 +60,7 @@ __KERNEL_RCSID(0, "$NetBSD: wsdisplay_vcons.c,v 1.9 2006/11/16 01:33:31 christos static void vcons_dummy_init_screen(void *, struct vcons_screen *, int, long *); -static int vcons_ioctl(void *, void *, u_long, caddr_t, int, struct lwp *); +static int vcons_ioctl(void *, void *, u_long, void *, int, struct lwp *); static int vcons_alloc_screen(void *, const struct wsscreen_descr *, void **, int *, int *, long *); static void vcons_free_screen(void *, void *); @@ -367,7 +367,7 @@ vcons_redraw_screen(struct vcons_screen *scr) } static int -vcons_ioctl(void *v, void *vs, u_long cmd, caddr_t data, int flag, +vcons_ioctl(void *v, void *vs, u_long cmd, void *data, int flag, struct lwp *l) { struct vcons_data *vd = v; diff --git a/sys/dev/wscons/wsdisplay_vconsvar.h b/sys/dev/wscons/wsdisplay_vconsvar.h index d47b82ebad8..8832baa215e 100644 --- a/sys/dev/wscons/wsdisplay_vconsvar.h +++ b/sys/dev/wscons/wsdisplay_vconsvar.h @@ -1,4 +1,4 @@ -/* $NetBSD: wsdisplay_vconsvar.h,v 1.5 2006/09/22 15:16:03 elad Exp $ */ +/* $NetBSD: wsdisplay_vconsvar.h,v 1.6 2007/03/04 06:02:51 christos Exp $ */ /*- * Copyright (c) 2005, 2006 Michael Lorenz @@ -86,7 +86,7 @@ struct vcons_data { long *); /* accessops */ - int (*ioctl)(void *, void *, u_long, caddr_t, int, struct lwp *); + int (*ioctl)(void *, void *, u_long, void *, int, struct lwp *); /* rasops */ void (*copycols)(void *, int, int, int, int); diff --git a/sys/dev/wscons/wsdisplayvar.h b/sys/dev/wscons/wsdisplayvar.h index 94529507cfa..950fb2f361d 100644 --- a/sys/dev/wscons/wsdisplayvar.h +++ b/sys/dev/wscons/wsdisplayvar.h @@ -1,4 +1,4 @@ -/* $NetBSD: wsdisplayvar.h,v 1.41 2006/11/06 19:51:12 macallan Exp $ */ +/* $NetBSD: wsdisplayvar.h,v 1.42 2007/03/04 06:02:51 christos Exp $ */ /* * Copyright (c) 1996, 1997 Christopher G. Demetriou. All rights reserved. @@ -111,7 +111,7 @@ struct wsdisplay_char; * with these functions, which is passed to them when they are invoked. */ struct wsdisplay_accessops { - int (*ioctl)(void *, void *, u_long, caddr_t, int, struct lwp *); + int (*ioctl)(void *, void *, u_long, void *, int, struct lwp *); paddr_t (*mmap)(void *, void *, off_t, int); int (*alloc_screen)(void *, const struct wsscreen_descr *, void **, int *, int *, long *); @@ -196,18 +196,18 @@ int wsdisplay_getactivescreen(struct wsdisplay_softc *); int wsscreen_switchwait(struct wsdisplay_softc *, int); int wsdisplay_internal_ioctl(struct wsdisplay_softc *, struct wsscreen *, - u_long, caddr_t, int, struct lwp *); + u_long, void *, int, struct lwp *); int wsdisplay_usl_ioctl1(struct wsdisplay_softc *, - u_long, caddr_t, int, struct lwp *); + u_long, void *, int, struct lwp *); int wsdisplay_usl_ioctl2(struct wsdisplay_softc *, struct wsscreen *, - u_long, caddr_t, int, struct lwp *); + u_long, void *, int, struct lwp *); -int wsdisplay_stat_ioctl(struct wsdisplay_softc *, u_long, caddr_t, +int wsdisplay_stat_ioctl(struct wsdisplay_softc *, u_long, void *, int, struct lwp *); -int wsdisplay_cfg_ioctl(struct wsdisplay_softc *, u_long, caddr_t, +int wsdisplay_cfg_ioctl(struct wsdisplay_softc *, u_long, void *, int, struct lwp *); #ifdef WSDISPLAY_SCROLLSUPPORT diff --git a/sys/dev/wscons/wskbd.c b/sys/dev/wscons/wskbd.c index 4207babfb1d..3dc172803ae 100644 --- a/sys/dev/wscons/wskbd.c +++ b/sys/dev/wscons/wskbd.c @@ -1,4 +1,4 @@ -/* $NetBSD: wskbd.c,v 1.100 2007/02/09 21:55:30 ad Exp $ */ +/* $NetBSD: wskbd.c,v 1.101 2007/03/04 06:02:51 christos Exp $ */ /* * Copyright (c) 1996, 1997 Christopher G. Demetriou. All rights reserved. @@ -79,7 +79,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: wskbd.c,v 1.100 2007/02/09 21:55:30 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: wskbd.c,v 1.101 2007/03/04 06:02:51 christos Exp $"); #include "opt_ddb.h" #include "opt_kgdb.h" @@ -218,7 +218,7 @@ static void wskbd_attach(struct device *, struct device *, void *); static int wskbd_detach(struct device *, int); static int wskbd_activate(struct device *, enum devact); -static int wskbd_displayioctl(struct device *, u_long, caddr_t, int, +static int wskbd_displayioctl(struct device *, u_long, void *, int, struct lwp *); #if NWSDISPLAY > 0 static int wskbd_set_display(struct device *, struct wsevsrc *); @@ -236,7 +236,7 @@ static void change_displayparam(struct wskbd_softc *, int, int, int); static void wskbd_holdscreen(struct wskbd_softc *, int); #endif -static int wskbd_do_ioctl_sc(struct wskbd_softc *, u_long, caddr_t, int, +static int wskbd_do_ioctl_sc(struct wskbd_softc *, u_long, void *, int, struct lwp *); static void wskbd_deliver_event(struct wskbd_softc *sc, u_int type, int value); @@ -249,7 +249,7 @@ static int wskbd_mux_close(struct wsevsrc *); #endif static int wskbd_do_open(struct wskbd_softc *, struct wseventvar *); -static int wskbd_do_ioctl(struct device *, u_long, caddr_t, int, struct lwp *); +static int wskbd_do_ioctl(struct device *, u_long, void *, int, struct lwp *); CFATTACH_DECL(wskbd, sizeof (struct wskbd_softc), wskbd_match, wskbd_attach, wskbd_detach, wskbd_activate); @@ -898,14 +898,14 @@ wskbdread(dev_t dev, struct uio *uio, int flags) } int -wskbdioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct lwp *l) +wskbdioctl(dev_t dev, u_long cmd, void *data, int flag, struct lwp *l) { return (wskbd_do_ioctl(wskbd_cd.cd_devs[minor(dev)], cmd, data, flag,l)); } /* A wrapper around the ioctl() workhorse to make reference counting easy. */ int -wskbd_do_ioctl(struct device *dv, u_long cmd, caddr_t data, int flag, +wskbd_do_ioctl(struct device *dv, u_long cmd, void *data, int flag, struct lwp *l) { struct wskbd_softc *sc = (struct wskbd_softc *)dv; @@ -919,7 +919,7 @@ wskbd_do_ioctl(struct device *dv, u_long cmd, caddr_t data, int flag, } int -wskbd_do_ioctl_sc(struct wskbd_softc *sc, u_long cmd, caddr_t data, int flag, +wskbd_do_ioctl_sc(struct wskbd_softc *sc, u_long cmd, void *data, int flag, struct lwp *l) { @@ -964,7 +964,7 @@ wskbd_do_ioctl_sc(struct wskbd_softc *sc, u_long cmd, caddr_t data, int flag, * Some of these have no real effect in raw mode, however. */ static int -wskbd_displayioctl(struct device *dev, u_long cmd, caddr_t data, int flag, +wskbd_displayioctl(struct device *dev, u_long cmd, void *data, int flag, struct lwp *l) { #ifdef WSDISPLAY_SCROLLSUPPORT @@ -996,7 +996,7 @@ wskbd_displayioctl(struct device *dev, u_long cmd, caddr_t data, int flag, if ((flag & FWRITE) == 0) return (EACCES); return ((*sc->sc_accessops->ioctl)(sc->sc_accesscookie, - WSKBDIO_COMPLEXBELL, (caddr_t)&sc->sc_bell_data, flag, l)); + WSKBDIO_COMPLEXBELL, (void *)&sc->sc_bell_data, flag, l)); case WSKBDIO_COMPLEXBELL: if ((flag & FWRITE) == 0) @@ -1004,7 +1004,7 @@ wskbd_displayioctl(struct device *dev, u_long cmd, caddr_t data, int flag, ubdp = (struct wskbd_bell_data *)data; SETBELL(ubdp, ubdp, &sc->sc_bell_data); return ((*sc->sc_accessops->ioctl)(sc->sc_accesscookie, - WSKBDIO_COMPLEXBELL, (caddr_t)ubdp, flag, l)); + WSKBDIO_COMPLEXBELL, (void *)ubdp, flag, l)); case WSKBDIO_SETBELL: if ((flag & FWRITE) == 0) diff --git a/sys/dev/wscons/wskbdvar.h b/sys/dev/wscons/wskbdvar.h index bd26ba2fc5b..165f539db92 100644 --- a/sys/dev/wscons/wskbdvar.h +++ b/sys/dev/wscons/wskbdvar.h @@ -1,4 +1,4 @@ -/* $NetBSD: wskbdvar.h,v 1.13 2006/10/09 11:03:43 peter Exp $ */ +/* $NetBSD: wskbdvar.h,v 1.14 2007/03/04 06:02:51 christos Exp $ */ /* * Copyright (c) 1996, 1997 Christopher G. Demetriou. All rights reserved. @@ -43,7 +43,7 @@ struct wskbd_accessops { int (*enable)(void *, int); void (*set_leds)(void *, int); - int (*ioctl)(void *, u_long, caddr_t, int, struct lwp *); + int (*ioctl)(void *, u_long, void *, int, struct lwp *); }; /* diff --git a/sys/dev/wscons/wsmouse.c b/sys/dev/wscons/wsmouse.c index 1bfef6462be..51991a834f4 100644 --- a/sys/dev/wscons/wsmouse.c +++ b/sys/dev/wscons/wsmouse.c @@ -1,4 +1,4 @@ -/* $NetBSD: wsmouse.c,v 1.50 2006/11/16 01:33:31 christos Exp $ */ +/* $NetBSD: wsmouse.c,v 1.51 2007/03/04 06:02:52 christos Exp $ */ /*- * Copyright (c) 2006 The NetBSD Foundation, Inc. @@ -111,7 +111,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: wsmouse.c,v 1.50 2006/11/16 01:33:31 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: wsmouse.c,v 1.51 2007/03/04 06:02:52 christos Exp $"); #include "wsmouse.h" #include "wsdisplay.h" @@ -182,7 +182,7 @@ static void wsmouse_attach(struct device *, struct device *, void *); static int wsmouse_detach(struct device *, int); static int wsmouse_activate(struct device *, enum devact); -static int wsmouse_do_ioctl(struct wsmouse_softc *, u_long, caddr_t, +static int wsmouse_do_ioctl(struct wsmouse_softc *, u_long, void *, int, struct lwp *); #if NWSMUX > 0 @@ -190,7 +190,7 @@ static int wsmouse_mux_open(struct wsevsrc *, struct wseventvar *); static int wsmouse_mux_close(struct wsevsrc *); #endif -static int wsmousedoioctl(struct device *, u_long, caddr_t, int, struct lwp *); +static int wsmousedoioctl(struct device *, u_long, void *, int, struct lwp *); static int wsmousedoopen(struct wsmouse_softc *, struct wseventvar *); @@ -662,7 +662,7 @@ wsmouseread(dev_t dev, struct uio *uio, int flags) } int -wsmouseioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct lwp *l) +wsmouseioctl(dev_t dev, u_long cmd, void *data, int flag, struct lwp *l) { return (wsmousedoioctl(wsmouse_cd.cd_devs[minor(dev)], cmd, data, flag, l)); @@ -670,7 +670,7 @@ wsmouseioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct lwp *l) /* A wrapper around the ioctl() workhorse to make reference counting easy. */ int -wsmousedoioctl(struct device *dv, u_long cmd, caddr_t data, int flag, +wsmousedoioctl(struct device *dv, u_long cmd, void *data, int flag, struct lwp *l) { struct wsmouse_softc *sc = (struct wsmouse_softc *)dv; @@ -684,7 +684,7 @@ wsmousedoioctl(struct device *dv, u_long cmd, caddr_t data, int flag, } int -wsmouse_do_ioctl(struct wsmouse_softc *sc, u_long cmd, caddr_t data, +wsmouse_do_ioctl(struct wsmouse_softc *sc, u_long cmd, void *data, int flag, struct lwp *l) { int error; diff --git a/sys/dev/wscons/wsmousevar.h b/sys/dev/wscons/wsmousevar.h index bf576d4b448..4cb3a9a24cc 100644 --- a/sys/dev/wscons/wsmousevar.h +++ b/sys/dev/wscons/wsmousevar.h @@ -1,4 +1,4 @@ -/* $NetBSD: wsmousevar.h,v 1.9 2006/11/12 19:00:43 plunky Exp $ */ +/* $NetBSD: wsmousevar.h,v 1.10 2007/03/04 06:02:52 christos Exp $ */ /* * Copyright (c) 1996, 1997 Christopher G. Demetriou. All rights reserved. @@ -42,7 +42,7 @@ */ struct wsmouse_accessops { int (*enable)(void *); - int (*ioctl)(void *, u_long, caddr_t, int, struct lwp *); + int (*ioctl)(void *, u_long, void *, int, struct lwp *); void (*disable)(void *); }; diff --git a/sys/dev/wscons/wsmux.c b/sys/dev/wscons/wsmux.c index a242be2172f..524ca751102 100644 --- a/sys/dev/wscons/wsmux.c +++ b/sys/dev/wscons/wsmux.c @@ -1,4 +1,4 @@ -/* $NetBSD: wsmux.c,v 1.47 2007/02/09 21:55:30 ad Exp $ */ +/* $NetBSD: wsmux.c,v 1.48 2007/03/04 06:02:52 christos Exp $ */ /* * Copyright (c) 1998, 2005 The NetBSD Foundation, Inc. @@ -44,7 +44,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: wsmux.c,v 1.47 2007/02/09 21:55:30 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: wsmux.c,v 1.48 2007/03/04 06:02:52 christos Exp $"); #include "wsdisplay.h" #include "wsmux.h" @@ -110,8 +110,8 @@ static int wsmux_evsrc_set_display(struct device *, struct wsevsrc *); #endif static int wsmux_do_displayioctl(struct device *dev, u_long cmd, - caddr_t data, int flag, struct lwp *l); -static int wsmux_do_ioctl(struct device *, u_long, caddr_t,int,struct lwp *); + void *data, int flag, struct lwp *l); +static int wsmux_do_ioctl(struct device *, u_long, void *,int,struct lwp *); static int wsmux_add_mux(int, struct wsmux_softc *); @@ -390,7 +390,7 @@ wsmuxread(dev_t dev, struct uio *uio, int flags) * ioctl of the pseudo device from device table. */ int -wsmuxioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct lwp *l) +wsmuxioctl(dev_t dev, u_long cmd, void *data, int flag, struct lwp *l) { int u = WSMUXDEV(minor(dev)); @@ -401,7 +401,7 @@ wsmuxioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct lwp *l) * ioctl of a mux via the parent mux, continuation of wsmuxioctl(). */ int -wsmux_do_ioctl(struct device *dv, u_long cmd, caddr_t data, int flag, +wsmux_do_ioctl(struct device *dv, u_long cmd, void *data, int flag, struct lwp *lwp) { struct wsmux_softc *sc = (struct wsmux_softc *)dv; @@ -758,7 +758,7 @@ wsmux_detach_sc(struct wsevsrc *me) * Display ioctl() of a mux via the parent mux. */ int -wsmux_do_displayioctl(struct device *dv, u_long cmd, caddr_t data, int flag, +wsmux_do_displayioctl(struct device *dv, u_long cmd, void *data, int flag, struct lwp *l) { struct wsmux_softc *sc = (struct wsmux_softc *)dv; diff --git a/sys/dev/wscons/wsmuxvar.h b/sys/dev/wscons/wsmuxvar.h index 2859286ee20..898c4280de9 100644 --- a/sys/dev/wscons/wsmuxvar.h +++ b/sys/dev/wscons/wsmuxvar.h @@ -1,4 +1,4 @@ -/* $NetBSD: wsmuxvar.h,v 1.11 2005/12/11 12:24:12 christos Exp $ */ +/* $NetBSD: wsmuxvar.h,v 1.12 2007/03/04 06:02:52 christos Exp $ */ /* * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -61,8 +61,8 @@ struct wssrcops { int type; /* device type: WSMUX_{MOUSE,KBD,MUX} */ int (*dopen)(struct wsevsrc *, struct wseventvar *); int (*dclose)(struct wsevsrc *); - int (*dioctl)(struct device *, u_long, caddr_t, int, struct lwp *); - int (*ddispioctl)(struct device *, u_long, caddr_t, int, struct lwp *); + int (*dioctl)(struct device *, u_long, void *, int, struct lwp *); + int (*ddispioctl)(struct device *, u_long, void *, int, struct lwp *); int (*dsetdisplay)(struct device *, struct wsevsrc *); }; @@ -71,9 +71,9 @@ struct wssrcops { #define wsevsrc_close(me) \ ((me)->me_ops->dclose((me))) #define wsevsrc_ioctl(me, cmd, data, flag, l) \ - ((me)->me_ops->dioctl(&(me)->me_dv, cmd, (caddr_t)data, flag, l)) + ((me)->me_ops->dioctl(&(me)->me_dv, cmd, (void *)data, flag, l)) #define wsevsrc_display_ioctl(me, cmd, data, flag, l) \ - ((me)->me_ops->ddispioctl(&(me)->me_dv, cmd, (caddr_t)data, flag, l)) + ((me)->me_ops->ddispioctl(&(me)->me_dv, cmd, (void *)data, flag, l)) #define wsevsrc_set_display(me, arg) \ ((me)->me_ops->dsetdisplay(&(me)->me_dv, arg)) diff --git a/sys/dev/wsfont/wsfontdev.c b/sys/dev/wsfont/wsfontdev.c index a7eaa376a3d..789559b321c 100644 --- a/sys/dev/wsfont/wsfontdev.c +++ b/sys/dev/wsfont/wsfontdev.c @@ -1,4 +1,4 @@ -/* $NetBSD: wsfontdev.c,v 1.13 2006/11/16 01:33:31 christos Exp $ */ +/* $NetBSD: wsfontdev.c,v 1.14 2007/03/04 06:02:52 christos Exp $ */ /* * Copyright (c) 2001 @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: wsfontdev.c,v 1.13 2006/11/16 01:33:31 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: wsfontdev.c,v 1.14 2007/03/04 06:02:52 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -71,7 +71,7 @@ wsfontclose(dev_t dev, int flag, int mode, } static int -wsfontioctl(dev_t dev, u_long cmd, caddr_t data, int flag, +wsfontioctl(dev_t dev, u_long cmd, void *data, int flag, struct lwp *l) { char nbuf[16]; diff --git a/sys/dev/xmi/xmi.c b/sys/dev/xmi/xmi.c index b9af12ac0b0..520fa91a8bf 100644 --- a/sys/dev/xmi/xmi.c +++ b/sys/dev/xmi/xmi.c @@ -1,4 +1,4 @@ -/* $NetBSD: xmi.c,v 1.7 2005/12/11 12:24:20 christos Exp $ */ +/* $NetBSD: xmi.c,v 1.8 2007/03/04 06:02:52 christos Exp $ */ /* * Copyright (c) 2000 Ludd, University of Lule}, Sweden. All rights reserved. @@ -35,7 +35,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: xmi.c,v 1.7 2005/12/11 12:24:20 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: xmi.c,v 1.8 2007/03/04 06:02:52 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -112,7 +112,7 @@ xmi_attach(struct xmi_softc *sc) nodenr); return; } - if (badaddr((caddr_t)xa.xa_ioh, 4)) { + if (badaddr((void *)xa.xa_ioh, 4)) { bus_space_unmap(sc->sc_iot, xa.xa_ioh, PAGE_SIZE); continue; } |
