Use mtod(m, char*) when you want to do pointer arithmetic on the result.
This commit is contained in:
parent
3b9acdf0e9
commit
13e2842780
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: isadma_machdep.c,v 1.24 2007/03/04 05:59:41 christos Exp $ */
|
||||
/* $NetBSD: isadma_machdep.c,v 1.25 2007/03/05 21:40:30 he Exp $ */
|
||||
|
||||
#define ISA_DMA_STATS
|
||||
|
||||
|
@ -40,7 +40,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: isadma_machdep.c,v 1.24 2007/03/04 05:59:41 christos Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: isadma_machdep.c,v 1.25 2007/03/05 21:40:30 he Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -584,7 +584,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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue