- remove unnecessary cast
- use (char *) on pointer arith
This commit is contained in:
parent
8c7e65a3e1
commit
e5d3d8c8fd
|
@ -1,4 +1,4 @@
|
||||||
/* $NetBSD: mem.c,v 1.18 2007/03/04 06:00:25 christos Exp $ */
|
/* $NetBSD: mem.c,v 1.19 2007/03/04 11:00:01 tsutsui Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1982, 1986, 1990, 1993
|
* Copyright (c) 1982, 1986, 1990, 1993
|
||||||
|
@ -77,7 +77,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
__KERNEL_RCSID(0, "$NetBSD: mem.c,v 1.18 2007/03/04 06:00:25 christos Exp $");
|
__KERNEL_RCSID(0, "$NetBSD: mem.c,v 1.19 2007/03/04 11:00:01 tsutsui Exp $");
|
||||||
|
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
#include <sys/systm.h>
|
#include <sys/systm.h>
|
||||||
|
@ -153,7 +153,7 @@ mmrw(dev_t dev, struct uio *uio, int flags)
|
||||||
pmap_update(pmap_kernel());
|
pmap_update(pmap_kernel());
|
||||||
o = m68k_page_offset(uio->uio_offset);
|
o = m68k_page_offset(uio->uio_offset);
|
||||||
c = min(uio->uio_resid, (int)(PAGE_SIZE - o));
|
c = min(uio->uio_resid, (int)(PAGE_SIZE - o));
|
||||||
error = uiomove((void *)vmmap + o, c, uio);
|
error = uiomove(vmmap + o, c, uio);
|
||||||
pmap_remove(pmap_kernel(), (vaddr_t)vmmap,
|
pmap_remove(pmap_kernel(), (vaddr_t)vmmap,
|
||||||
(vaddr_t)vmmap + PAGE_SIZE);
|
(vaddr_t)vmmap + PAGE_SIZE);
|
||||||
pmap_update(pmap_kernel());
|
pmap_update(pmap_kernel());
|
||||||
|
@ -203,7 +203,7 @@ mmrw(dev_t dev, struct uio *uio, int flags)
|
||||||
}
|
}
|
||||||
if (error)
|
if (error)
|
||||||
break;
|
break;
|
||||||
iov->iov_base = (void *)iov->iov_base + c;
|
iov->iov_base = (char *)iov->iov_base + c;
|
||||||
iov->iov_len -= c;
|
iov->iov_len -= c;
|
||||||
uio->uio_offset += c;
|
uio->uio_offset += c;
|
||||||
uio->uio_resid -= c;
|
uio->uio_resid -= c;
|
||||||
|
|
Loading…
Reference in New Issue