From 5ebcdbe8b53578ad72782dbcb38a02d1e71b75b3 Mon Sep 17 00:00:00 2001 From: christos Date: Sun, 4 Mar 2007 10:21:25 +0000 Subject: [PATCH] fix caddr_t fallout. --- sys/arch/arm/arm/disksubr.c | 8 ++++---- sys/arch/arm/arm/disksubr_mbr.c | 12 ++++++------ sys/arch/arm/arm32/mem.c | 6 +++--- sys/arch/shark/isa/isadma_machdep.c | 6 +++--- sys/arch/shark/ofw/ofrom.c | 6 +++--- sys/compat/linux/arch/arm/linux_machdep.c | 6 +++--- 6 files changed, 22 insertions(+), 22 deletions(-) diff --git a/sys/arch/arm/arm/disksubr.c b/sys/arch/arm/arm/disksubr.c index 250451bd2d4f..8a99e7755ad6 100644 --- a/sys/arch/arm/arm/disksubr.c +++ b/sys/arch/arm/arm/disksubr.c @@ -1,4 +1,4 @@ -/* $NetBSD: disksubr.c,v 1.15 2006/11/25 11:59:56 scw Exp $ */ +/* $NetBSD: disksubr.c,v 1.16 2007/03/04 10:21:25 christos Exp $ */ /* * Copyright (c) 1998 Christopher G. Demetriou. All rights reserved. @@ -97,7 +97,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: disksubr.c,v 1.15 2006/11/25 11:59:56 scw Exp $"); +__KERNEL_RCSID(0, "$NetBSD: disksubr.c,v 1.16 2007/03/04 10:21:25 christos Exp $"); #include #include @@ -198,7 +198,7 @@ readdisklabel(dev, strat, lp, osdep) goto done; } for (dlp = (struct disklabel *)bp->b_data; - dlp <= (struct disklabel *)(bp->b_data + lp->d_secsize - sizeof(*dlp)); + dlp <= (struct disklabel *)((char *)bp->b_data + lp->d_secsize - sizeof(*dlp)); dlp = (struct disklabel *)((char *)dlp + sizeof(long))) { if (dlp->d_magic != DISKMAGIC || dlp->d_magic2 != DISKMAGIC) { continue; @@ -385,7 +385,7 @@ writedisklabel(dev, strat, lp, osdep) if ((error = biowait(bp))) goto done; for (dlp = (struct disklabel *)bp->b_data; - dlp <= (struct disklabel *)(bp->b_data + lp->d_secsize - sizeof(*dlp)); + dlp <= (struct disklabel *)((char *)bp->b_data + lp->d_secsize - sizeof(*dlp)); dlp = (struct disklabel *)((char *)dlp + sizeof(long))) { if (dlp->d_magic == DISKMAGIC && dlp->d_magic2 == DISKMAGIC && dkcksum(dlp) == 0) { diff --git a/sys/arch/arm/arm/disksubr_mbr.c b/sys/arch/arm/arm/disksubr_mbr.c index e69333163fb7..4d6ab5c3c5c2 100644 --- a/sys/arch/arm/arm/disksubr_mbr.c +++ b/sys/arch/arm/arm/disksubr_mbr.c @@ -1,4 +1,4 @@ -/* $NetBSD: disksubr_mbr.c,v 1.7 2005/12/11 12:16:41 christos Exp $ */ +/* $NetBSD: disksubr_mbr.c,v 1.8 2007/03/04 10:21:25 christos Exp $ */ /* * Copyright (c) 1998 Christopher G. Demetriou. All rights reserved. @@ -68,7 +68,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: disksubr_mbr.c,v 1.7 2005/12/11 12:16:41 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: disksubr_mbr.c,v 1.8 2007/03/04 10:21:25 christos Exp $"); #include #include @@ -127,13 +127,13 @@ mbr_label_read(dev, strat, lp, osdep, msgp, cylp, netbsd_label_offp) struct mbr_partition *ourmbrp = NULL; /* XXX "there has to be a better check than this." */ - if (bcmp(bp->b_data + MBRSIGOFS, mbrsig, sizeof(mbrsig))) { + if (memcmp((char *)bp->b_data + MBRSIGOFS, mbrsig, sizeof(mbrsig))) { rv = 0; goto out; } /* XXX how do we check veracity/bounds of this? */ - bcopy(bp->b_data + MBR_PART_OFFSET, mbrp, + memcpy(mbrp, (char *)bp->b_data + MBR_PART_OFFSET, MBR_PART_COUNT * sizeof(*mbrp)); /* look for NetBSD partition */ @@ -235,13 +235,13 @@ mbr_label_locate(dev, strat, lp, osdep, cylp, netbsd_label_offp) goto out; } - if (bcmp(bp->b_data + MBRSIGOFS, mbrsig, sizeof(mbrsig))) { + if (memcmp((char *)bp->b_data + MBRSIGOFS, mbrsig, sizeof(mbrsig))) { rv = 0; goto out; } /* XXX how do we check veracity/bounds of this? */ - bcopy(bp->b_data + MBR_PART_OFFSET, mbrp, MBR_PART_COUNT * sizeof(*mbrp)); + memcpy(mbrp, (char *)bp->b_data + MBR_PART_OFFSET, MBR_PART_COUNT * sizeof(*mbrp)); /* look for NetBSD partition */ ourmbrp = NULL; diff --git a/sys/arch/arm/arm32/mem.c b/sys/arch/arm/arm32/mem.c index 67520e6bc2c6..970b8f3f253f 100644 --- a/sys/arch/arm/arm32/mem.c +++ b/sys/arch/arm/arm32/mem.c @@ -1,4 +1,4 @@ -/* $NetBSD: mem.c,v 1.18 2007/03/04 05:59:37 christos Exp $ */ +/* $NetBSD: mem.c,v 1.19 2007/03/04 10:21:26 christos Exp $ */ /* * Copyright (c) 1982, 1986, 1990, 1993 @@ -75,7 +75,7 @@ #include "opt_compat_netbsd.h" #include -__KERNEL_RCSID(0, "$NetBSD: mem.c,v 1.18 2007/03/04 05:59:37 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mem.c,v 1.19 2007/03/04 10:21:26 christos Exp $"); #include #include @@ -148,7 +148,7 @@ mmrw(dev, uio, flags) pmap_update(pmap_kernel()); o = uio->uio_offset & PGOFSET; c = min(uio->uio_resid, (int)(PAGE_SIZE - o)); - error = uiomove((void *)memhook + o, c, uio); + error = uiomove((char *)memhook + o, c, uio); pmap_remove(pmap_kernel(), (vaddr_t)memhook, (vaddr_t)memhook + PAGE_SIZE); pmap_update(pmap_kernel()); diff --git a/sys/arch/shark/isa/isadma_machdep.c b/sys/arch/shark/isa/isadma_machdep.c index 12dbe1a73f41..eee1327113f0 100644 --- a/sys/arch/shark/isa/isadma_machdep.c +++ b/sys/arch/shark/isa/isadma_machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: isadma_machdep.c,v 1.9 2007/03/04 06:00:42 christos Exp $ */ +/* $NetBSD: isadma_machdep.c,v 1.10 2007/03/04 10:21:26 christos Exp $ */ /*- * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc. @@ -38,7 +38,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: isadma_machdep.c,v 1.9 2007/03/04 06:00:42 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: isadma_machdep.c,v 1.10 2007/03/04 10:21:26 christos Exp $"); #define ISA_DMA_STATS @@ -564,7 +564,7 @@ _isa_bus_dmamap_sync(t, map, offset, len, ops) minlen = len < m->m_len - moff ? len : m->m_len - moff; - memcpy(mtod(m, void *) + moff, + memcpy(mtod(m, char *) + moff, (char *)cookie->id_bouncebuf + offset, minlen); diff --git a/sys/arch/shark/ofw/ofrom.c b/sys/arch/shark/ofw/ofrom.c index a42554885ba4..e35b8a796fbf 100644 --- a/sys/arch/shark/ofw/ofrom.c +++ b/sys/arch/shark/ofw/ofrom.c @@ -1,4 +1,4 @@ -/* $NetBSD: ofrom.c,v 1.14 2007/03/04 06:00:42 christos Exp $ */ +/* $NetBSD: ofrom.c,v 1.15 2007/03/04 10:21:26 christos Exp $ */ /* * Copyright 1998 @@ -38,7 +38,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ofrom.c,v 1.14 2007/03/04 06:00:42 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ofrom.c,v 1.15 2007/03/04 10:21:26 christos Exp $"); #include #include @@ -189,7 +189,7 @@ ofromrw(dev, uio, flags) pmap_update(pmap_kernel()); o = uio->uio_offset & PGOFSET; c = min(uio->uio_resid, (int)(PAGE_SIZE - o)); - error = uiomove((void *)memhook + o, c, uio); + error = uiomove((char *)memhook + o, c, uio); pmap_remove(pmap_kernel(), (vaddr_t)memhook, (vaddr_t)memhook + PAGE_SIZE); pmap_update(pmap_kernel()); diff --git a/sys/compat/linux/arch/arm/linux_machdep.c b/sys/compat/linux/arch/arm/linux_machdep.c index 333eaf5f8a49..a9907d76eaa7 100644 --- a/sys/compat/linux/arch/arm/linux_machdep.c +++ b/sys/compat/linux/arch/arm/linux_machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: linux_machdep.c,v 1.20 2007/03/04 06:01:19 christos Exp $ */ +/* $NetBSD: linux_machdep.c,v 1.21 2007/03/04 10:21:26 christos Exp $ */ /*- * Copyright (c) 1995, 2000 The NetBSD Foundation, Inc. @@ -38,7 +38,7 @@ #include -__KERNEL_RCSID(0, "$NetBSD: linux_machdep.c,v 1.20 2007/03/04 06:01:19 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux_machdep.c,v 1.21 2007/03/04 10:21:26 christos Exp $"); #include #include @@ -109,7 +109,7 @@ linux_sendsig(const ksiginfo_t *ksi, const sigset_t *mask) /* Allocate space for the signal handler context. */ if (onstack) - fp = (struct linux_sigframe *)((void *)l->l_sigstk.ss_sp + + fp = (struct linux_sigframe *)((char *)l->l_sigstk.ss_sp + l->l_sigstk.ss_size); else fp = (struct linux_sigframe *)tf->tf_usr_sp;