Subject: some fixes for caddr_t removal errors
To: None <port-vax@netbsd.org>
From: Hans Rosenfeld <rosenfeld@grumpf.hope-2000.org>
List: port-vax
Date: 03/08/2007 23:16:33
--nFreZHaLTZJo0R7j
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

compiling -current GENERIC fails because of some errors introduced by
the caddr_t removal. the attached patch fixes these.


-- 
%SYSTEM-F-ANARCHISM, The operating system has been overthrown

--nFreZHaLTZJo0R7j
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="caddr_t.diff"

Index: sys/dev/bi/if_ni.c
===================================================================
RCS file: /cvsroot/src/sys/dev/bi/if_ni.c,v
retrieving revision 1.29
diff -u -r1.29 if_ni.c
--- sys/dev/bi/if_ni.c	4 Mar 2007 06:01:45 -0000	1.29
+++ sys/dev/bi/if_ni.c	8 Mar 2007 22:04:38 -0000
@@ -242,7 +242,7 @@
 	struct ifnet *ifp = (struct ifnet *)&sc->sc_if;
 	struct ni_msg *msg;
 	struct ni_ptdb *ptdb;
-	void *va;
+	uintptr_t va;
 	int i, j, s, res;
 	u_short type;
 
@@ -351,7 +351,7 @@
 #endif
 	s = splvm();
 	/* Set up message free queue */
-	ni_getpgs(sc, NMSGBUF * 512, &va, 0);
+	ni_getpgs(sc, NMSGBUF * 512, (void **) &va, 0);
 	for (i = 0; i < NMSGBUF; i++) {
 		msg = (void *)(va + i * 512);
 		res = INSQTI(msg, &fqb->nf_mforw);
@@ -361,7 +361,7 @@
 	WAITREG(NI_PCR, PCR_OWN);
 
 	/* Set up xmit queue */
-	ni_getpgs(sc, NTXBUF * 512, &va, 0);
+	ni_getpgs(sc, NTXBUF * 512, (void **) &va, 0);
 	for (i = 0; i < NTXBUF; i++) {
 		struct ni_dg *data;
 
@@ -384,7 +384,7 @@
 	WAITREG(NI_PCR, PCR_OWN);
 
 	/* recv buffers */
-	ni_getpgs(sc, NRXBUF * 512, &va, 0);
+	ni_getpgs(sc, NRXBUF * 512, (void **) &va, 0);
 	for (i = 0; i < NRXBUF; i++) {
 		struct ni_dg *data;
 		int idx;
Index: sys/dev/qbus/if_uba.c
===================================================================
RCS file: /cvsroot/src/sys/dev/qbus/if_uba.c,v
retrieving revision 1.27
diff -u -r1.27 if_uba.c
--- sys/dev/qbus/if_uba.c	4 Mar 2007 06:02:29 -0000	1.27
+++ sys/dev/qbus/if_uba.c	8 Mar 2007 22:04:41 -0000
@@ -142,7 +142,7 @@
 	 * Load the tx maps with DMA memory (common case).
 	 */
 	for (i = 0; i < nw; i++) {
-		ifw[i].ifw_vaddr = vaddr + size * i;
+		ifw[i].ifw_vaddr = (char *) vaddr + size * i;
 		ifw[i].ifw_size = size;
 		bus_dmamap_load(uh->uh_dmat, ifw[i].ifw_map,
 		    ifw[i].ifw_vaddr, ifw[i].ifw_size, NULL, BUS_DMA_NOWAIT);
Index: sys/dev/qbus/rf.c
===================================================================
RCS file: /cvsroot/src/sys/dev/qbus/rf.c,v
retrieving revision 1.13
diff -u -r1.13 rf.c
--- sys/dev/qbus/rf.c	4 Mar 2007 06:02:30 -0000	1.13
+++ sys/dev/qbus/rf.c	8 Mar 2007 22:04:42 -0000
@@ -151,7 +151,7 @@
 	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 */
-	void *sc_bufidx;		/* current position in buffer data */
+	char *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 */
Index: sys/dev/qbus/rlvar.h
===================================================================
RCS file: /cvsroot/src/sys/dev/qbus/rlvar.h,v
retrieving revision 1.7
diff -u -r1.7 rlvar.h
--- sys/dev/qbus/rlvar.h	4 Mar 2007 06:02:30 -0000	1.7
+++ sys/dev/qbus/rlvar.h	8 Mar 2007 22:04:42 -0000
@@ -47,7 +47,7 @@
 	bus_dmamap_t sc_dmam;
 	struct bufq_state *sc_q;	/* Queue of waiting bufs */
 	struct buf *sc_active;		/* Currently active buf */
-	void *sc_bufaddr;		/* Current in-core address */
+	char *sc_bufaddr;		/* Current in-core address */
 	int sc_diskblk;			/* Current block on disk */
 	int sc_bytecnt;			/* How much left to transfer */
 };

--nFreZHaLTZJo0R7j--