diff --git a/sys/arch/dreamcast/dev/maple/mmemcard.c b/sys/arch/dreamcast/dev/maple/mmemcard.c index 08e8a4f1f2b2..617dbf96f5e9 100644 --- a/sys/arch/dreamcast/dev/maple/mmemcard.c +++ b/sys/arch/dreamcast/dev/maple/mmemcard.c @@ -1,4 +1,4 @@ -/* $NetBSD: mmemcard.c,v 1.9 2007/03/04 05:59:44 christos Exp $ */ +/* $NetBSD: mmemcard.c,v 1.10 2007/03/06 23:50:20 he Exp $ */ /*- * Copyright (c) 2002 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: mmemcard.c,v 1.9 2007/03/04 05:59:44 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mmemcard.c,v 1.10 2007/03/06 23:50:20 he Exp $"); #include #include @@ -869,7 +869,7 @@ mmemdone(struct mmem_softc *sc, struct mmem_pt *pt, int err) KASSERT(bp); if (err) { - bcnt = sc->sc_iobuf - bp->b_data; + bcnt = (char *)sc->sc_iobuf - (char *)bp->b_data; bp->b_resid = bp->b_bcount - bcnt; /* raise error if no block is read */ @@ -886,7 +886,8 @@ mmemdone(struct mmem_softc *sc, struct mmem_pt *pt, int err) /* terminate current transfer */ sc->sc_bp = NULL; s = splbio(); - disk_unbusy(&pt->pt_dk, sc->sc_iobuf - bp->b_data, + disk_unbusy(&pt->pt_dk, + (char *)sc->sc_iobuf - (char *)bp->b_data, sc->sc_stat == MMEM_READ); biodone(bp); splx(s); diff --git a/sys/arch/evbppc/evbppc/disksubr.c b/sys/arch/evbppc/evbppc/disksubr.c index 27e12dc73f26..a23378b609df 100644 --- a/sys/arch/evbppc/evbppc/disksubr.c +++ b/sys/arch/evbppc/evbppc/disksubr.c @@ -1,4 +1,4 @@ -/* $NetBSD: disksubr.c,v 1.11 2006/11/25 13:09:14 scw Exp $ */ +/* $NetBSD: disksubr.c,v 1.12 2007/03/07 00:20:57 he Exp $ */ /* * Copyright (c) 1982, 1986, 1988 Regents of the University of California. @@ -32,7 +32,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: disksubr.c,v 1.11 2006/11/25 13:09:14 scw Exp $"); +__KERNEL_RCSID(0, "$NetBSD: disksubr.c,v 1.12 2007/03/07 00:20:57 he Exp $"); #include #include @@ -94,7 +94,8 @@ readdisklabel(dev_t dev, void (*strat)(struct buf *), struct disklabel *lp, } 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) { if (msg == NULL) @@ -240,7 +241,8 @@ writedisklabel(dev_t dev, void (*strat)(struct buf *), struct disklabel *lp, if ((error = biowait(bp)) != 0) 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) {