summaryrefslogtreecommitdiff
path: root/sys/dev/pci
diff options
context:
space:
mode:
authorPedro Martelletto <pedro@cvs.openbsd.org>2006-12-29 13:04:38 +0000
committerPedro Martelletto <pedro@cvs.openbsd.org>2006-12-29 13:04:38 +0000
commitba02f4c341ab798b8da15c745fc34262ae5a5453 (patch)
tree9473fe40366c845b982fc8384589829f15cd5fe0 /sys/dev/pci
parentb7675ae17e9bbe19e88fdbe069031a9a676974c3 (diff)
Avoid void * arithmetic, okay deraadt@, suggestions from millert@
Diffstat (limited to 'sys/dev/pci')
-rw-r--r--sys/dev/pci/auich.c6
-rw-r--r--sys/dev/pci/bktr/bktr_core.c4
-rw-r--r--sys/dev/pci/maestro.c4
-rw-r--r--sys/dev/pci/ubsec.c4
4 files changed, 9 insertions, 9 deletions
diff --git a/sys/dev/pci/auich.c b/sys/dev/pci/auich.c
index 3be479ca428..c2a434eaffc 100644
--- a/sys/dev/pci/auich.c
+++ b/sys/dev/pci/auich.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: auich.c,v 1.62 2006/08/19 19:06:51 brad Exp $ */
+/* $OpenBSD: auich.c,v 1.63 2006/12/29 13:04:37 pedro Exp $ */
/*
* Copyright (c) 2000,2001 Michael Shalayeff
@@ -1312,7 +1312,7 @@ auich_trigger_output(v, start, end, blksize, intr, arg, param)
*/
sc->pcmo_start = p->segs->ds_addr;
sc->pcmo_p = sc->pcmo_start + blksize;
- sc->pcmo_end = sc->pcmo_start + (end - start);
+ sc->pcmo_end = sc->pcmo_start + ((char *)end - (char *)start);
sc->pcmo_blksize = blksize;
q = sc->dmap_pcmo = sc->dmalist_pcmo;
@@ -1363,7 +1363,7 @@ auich_trigger_input(v, start, end, blksize, intr, arg, param)
*/
sc->pcmi_start = p->segs->ds_addr;
sc->pcmi_p = sc->pcmi_start + blksize;
- sc->pcmi_end = sc->pcmi_start + (end - start);
+ sc->pcmi_end = sc->pcmi_start + ((char *)end - (char *)start);
sc->pcmi_blksize = blksize;
q = sc->dmap_pcmi = sc->dmalist_pcmi;
diff --git a/sys/dev/pci/bktr/bktr_core.c b/sys/dev/pci/bktr/bktr_core.c
index df3668a329e..ac9eb62ce7e 100644
--- a/sys/dev/pci/bktr/bktr_core.c
+++ b/sys/dev/pci/bktr/bktr_core.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bktr_core.c,v 1.19 2006/01/20 18:14:17 millert Exp $ */
+/* $OpenBSD: bktr_core.c,v 1.20 2006/12/29 13:04:37 pedro Exp $ */
/* $FreeBSD: src/sys/dev/bktr/bktr_core.c,v 1.114 2000/10/31 13:09:56 roger Exp $ */
/*
@@ -2878,7 +2878,7 @@ rgb_vbi_prog(bktr_ptr_t bktr, char i_flag, int cols, int rows, int interlace )
*dma_prog++ = (u_int )vtophys(loop_point) ;
#else
*dma_prog++ = htole32(bktr->dm_prog->dm_segs->ds_addr +
- ((void *)loop_point - (void *)bktr->dma_prog));
+ ((char *)loop_point - (char *)bktr->dma_prog));
#endif
*dma_prog++ = htole32(0); /* NULL WORD */
diff --git a/sys/dev/pci/maestro.c b/sys/dev/pci/maestro.c
index 1a6174fa28a..d8e1863a137 100644
--- a/sys/dev/pci/maestro.c
+++ b/sys/dev/pci/maestro.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: maestro.c,v 1.20 2006/10/01 21:46:33 espie Exp $ */
+/* $OpenBSD: maestro.c,v 1.21 2006/12/29 13:04:37 pedro Exp $ */
/* $FreeBSD: /c/ncvs/src/sys/dev/sound/pci/maestro.c,v 1.3 2000/11/21 12:22:11 julian Exp $ */
/*
* FreeBSD's ESS Agogo/Maestro driver
@@ -1300,7 +1300,7 @@ maestro_trigger_output(hdl, start, end, blksize, intr, arg, param)
struct maestro_softc *sc = (struct maestro_softc *)hdl;
u_int offset = ((caddr_t)start - sc->dmabase) >> 1;
- u_int size = (end - start) >> 1;
+ u_int size = ((char *)end - (char *)start) >> 1;
sc->play.mode |= MAESTRO_RUNNING;
sc->play.wpwa = APU_USE_SYSMEM | (offset >> 8);
DPRINTF(("maestro_trigger_output: start=%x, end=%x, blksize=%x ",
diff --git a/sys/dev/pci/ubsec.c b/sys/dev/pci/ubsec.c
index 3749c19a85e..404a1cdff7e 100644
--- a/sys/dev/pci/ubsec.c
+++ b/sys/dev/pci/ubsec.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ubsec.c,v 1.137 2006/06/29 21:34:51 deraadt Exp $ */
+/* $OpenBSD: ubsec.c,v 1.138 2006/12/29 13:04:37 pedro Exp $ */
/*
* Copyright (c) 2000 Jason L. Wright (jason@thought.net)
@@ -493,7 +493,7 @@ ubsec_feed(struct ubsec_softc *sc)
SIMPLEQ_REMOVE_HEAD(&sc->sc_queue, q_next);
--sc->sc_nqueue;
- v = ((void *)&q2->q_dma->d_dma->d_mcr) + sizeof(struct ubsec_mcr) -
+ v = ((char *)&q2->q_dma->d_dma->d_mcr) + sizeof(struct ubsec_mcr) -
sizeof(struct ubsec_mcr_add);
bcopy(v, &q->q_dma->d_dma->d_mcradd[i], sizeof(struct ubsec_mcr_add));
q->q_stacked_mcr[i] = q2;