Remove an unnecessary cast and use (char *) on pointer arith.

This commit is contained in:
tsutsui 2007-03-05 12:30:37 +00:00
parent cdfa69a5f8
commit 980acc7d7b
5 changed files with 20 additions and 20 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: mem.c,v 1.10 2007/03/04 05:59:42 christos Exp $ */
/* $NetBSD: mem.c,v 1.11 2007/03/05 12:30:37 tsutsui Exp $ */
/*
* Copyright (c) 1982, 1986, 1990, 1993
@ -77,7 +77,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: mem.c,v 1.10 2007/03/04 05:59:42 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD: mem.c,v 1.11 2007/03/05 12:30:37 tsutsui Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -157,7 +157,7 @@ mmrw(dev, uio, flags)
trunc_page(v), prot, prot|PMAP_WIRED);
o = uio->uio_offset & PGOFSET;
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(), (vm_offset_t)vmmap,
(vm_offset_t)vmmap + PAGE_SIZE);
continue;
@ -212,7 +212,7 @@ mmrw(dev, uio, flags)
}
if (error)
break;
iov->iov_base = (void *)iov->iov_base + c;
iov->iov_base = (char *)iov->iov_base + c;
iov->iov_len -= c;
uio->uio_offset += c;
uio->uio_resid -= c;

View File

@ -1,4 +1,4 @@
/* $NetBSD: mem.c,v 1.38 2007/03/04 06:00:08 christos Exp $ */
/* $NetBSD: mem.c,v 1.39 2007/03/05 12:30:38 tsutsui Exp $ */
/*
* Copyright (c) 1982, 1986, 1990, 1993
@ -77,7 +77,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: mem.c,v 1.38 2007/03/04 06:00:08 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD: mem.c,v 1.39 2007/03/05 12:30:38 tsutsui Exp $");
#include <sys/param.h>
#include <sys/conf.h>
@ -154,7 +154,7 @@ mmrw(dev_t dev, struct uio *uio, int flags)
pmap_update(pmap_kernel());
o = m68k_page_offset(uio->uio_offset);
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,
(vaddr_t)vmmap + PAGE_SIZE);
pmap_update(pmap_kernel());
@ -197,7 +197,7 @@ mmrw(dev_t dev, struct uio *uio, int flags)
}
if (error)
break;
iov->iov_base = (void *)iov->iov_base + c;
iov->iov_base = (char *)iov->iov_base + c;
iov->iov_len -= c;
uio->uio_offset += c;
uio->uio_resid -= c;

View File

@ -1,4 +1,4 @@
/* $NetBSD: mem.c,v 1.25 2007/03/04 06:00:14 christos Exp $ */
/* $NetBSD: mem.c,v 1.26 2007/03/05 12:30:38 tsutsui Exp $ */
/*
* Copyright (c) 1982, 1986, 1990, 1993
@ -77,7 +77,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: mem.c,v 1.25 2007/03/04 06:00:14 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD: mem.c,v 1.26 2007/03/05 12:30:38 tsutsui Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -155,7 +155,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 *)vmmap + o, c, uio);
error = uiomove(vmmap + o, c, uio);
pmap_remove(pmap_kernel(), (vaddr_t)vmmap,
(vaddr_t)vmmap + PAGE_SIZE);
pmap_update(pmap_kernel());
@ -200,7 +200,7 @@ mmrw(dev, uio, flags)
}
if (error)
break;
iov->iov_base = (void *)iov->iov_base + c;
iov->iov_base = (char *)iov->iov_base + c;
iov->iov_len -= c;
uio->uio_offset += c;
uio->uio_resid -= c;

View File

@ -1,4 +1,4 @@
/* $NetBSD: mem.c,v 1.24 2007/03/04 06:00:27 christos Exp $ */
/* $NetBSD: mem.c,v 1.25 2007/03/05 12:30:38 tsutsui Exp $ */
/*
* This file was taken from mvme68k/mvme68k/mem.c
@ -84,7 +84,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: mem.c,v 1.24 2007/03/04 06:00:27 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD: mem.c,v 1.25 2007/03/05 12:30:38 tsutsui Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -158,7 +158,7 @@ mmrw(dev_t dev, struct uio *uio, int flags)
pmap_update(pmap_kernel());
o = uio->uio_offset & PGOFSET;
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,
(vaddr_t)vmmap + PAGE_SIZE);
pmap_update(pmap_kernel());
@ -203,7 +203,7 @@ mmrw(dev_t dev, struct uio *uio, int flags)
}
if (error)
break;
iov->iov_base = (void *)iov->iov_base + c;
iov->iov_base = (char *)iov->iov_base + c;
iov->iov_len -= c;
uio->uio_offset += c;
uio->uio_resid -= c;

View File

@ -1,4 +1,4 @@
/* $NetBSD: mem.c,v 1.35 2007/03/04 06:01:08 christos Exp $ */
/* $NetBSD: mem.c,v 1.36 2007/03/05 12:30:38 tsutsui Exp $ */
/*
* Copyright (c) 1982, 1986, 1990, 1993
@ -77,7 +77,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: mem.c,v 1.35 2007/03/04 06:01:08 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD: mem.c,v 1.36 2007/03/05 12:30:38 tsutsui Exp $");
#include <sys/param.h>
#include <sys/conf.h>
@ -154,7 +154,7 @@ mmrw(dev_t dev, struct uio *uio, int flags)
pmap_update(pmap_kernel());
o = m68k_page_offset(uio->uio_offset);
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,
(vaddr_t)vmmap + PAGE_SIZE);
pmap_update(pmap_kernel());
@ -198,7 +198,7 @@ mmrw(dev_t dev, struct uio *uio, int flags)
}
if (error)
break;
iov->iov_base = (void *)iov->iov_base + c;
iov->iov_base = (char *)iov->iov_base + c;
iov->iov_len -= c;
uio->uio_offset += c;
uio->uio_resid -= c;