Use uint8_t * instead of void */char * for ptr arithmetic.

This commit is contained in:
matt 2007-03-05 08:37:38 +00:00
parent a4c52808c6
commit 1f1847fbab
1 changed files with 9 additions and 9 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: int_bus_dma.c,v 1.15 2007/03/04 05:59:45 christos Exp $ */ /* $NetBSD: int_bus_dma.c,v 1.16 2007/03/05 08:37:38 matt Exp $ */
/* /*
* Copyright (c) 2002 Wasabi Systems, Inc. * Copyright (c) 2002 Wasabi Systems, Inc.
@ -42,7 +42,7 @@
#define _ARM32_BUS_DMA_PRIVATE #define _ARM32_BUS_DMA_PRIVATE
#include <sys/cdefs.h> #include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: int_bus_dma.c,v 1.15 2007/03/04 05:59:45 christos Exp $"); __KERNEL_RCSID(0, "$NetBSD: int_bus_dma.c,v 1.16 2007/03/05 08:37:38 matt Exp $");
#include <sys/param.h> #include <sys/param.h>
#include <sys/systm.h> #include <sys/systm.h>
@ -458,8 +458,8 @@ integrator_bus_dmamap_sync(bus_dma_tag_t t, bus_dmamap_t map,
/* /*
* Copy the caller's buffer to the bounce buffer. * Copy the caller's buffer to the bounce buffer.
*/ */
memcpy((char *)cookie->id_bouncebuf + offset, memcpy((uint8_t *)cookie->id_bouncebuf + offset,
(char *)cookie->id_origbuf + offset, len); (uint8_t *)cookie->id_origbuf + offset, len);
cpu_dcache_wbinv_range((vaddr_t)cookie->id_bouncebuf + cpu_dcache_wbinv_range((vaddr_t)cookie->id_bouncebuf +
offset, len); offset, len);
} }
@ -471,8 +471,8 @@ integrator_bus_dmamap_sync(bus_dma_tag_t t, bus_dmamap_t map,
/* /*
* Copy the bounce buffer to the caller's buffer. * Copy the bounce buffer to the caller's buffer.
*/ */
memcpy((char *)cookie->id_origbuf + offset, memcpy((uint8_t *)cookie->id_origbuf + offset,
(char *)cookie->id_bouncebuf + offset, len); (uint8_t *)cookie->id_bouncebuf + offset, len);
} }
/* /*
@ -490,7 +490,7 @@ integrator_bus_dmamap_sync(bus_dma_tag_t t, bus_dmamap_t map,
* Copy the caller's buffer to the bounce buffer. * Copy the caller's buffer to the bounce buffer.
*/ */
m_copydata(m0, offset, len, m_copydata(m0, offset, len,
(char *)cookie->id_bouncebuf + offset); (uint8_t *)cookie->id_bouncebuf + offset);
cpu_dcache_wb_range((vaddr_t)cookie->id_bouncebuf + cpu_dcache_wb_range((vaddr_t)cookie->id_bouncebuf +
offset, len); offset, len);
} }
@ -518,8 +518,8 @@ integrator_bus_dmamap_sync(bus_dma_tag_t t, bus_dmamap_t map,
minlen = len < m->m_len - moff ? minlen = len < m->m_len - moff ?
len : m->m_len - moff; len : m->m_len - moff;
memcpy(mtod(m, void *) + moff, memcpy(mtod(m, uint8_t *) + moff,
(char *)cookie->id_bouncebuf + offset, (uint8_t *)cookie->id_bouncebuf + offset,
minlen); minlen);
moff = 0; moff = 0;