summaryrefslogtreecommitdiff
path: root/sys/arch/alpha
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2015-02-10 22:44:36 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2015-02-10 22:44:36 +0000
commit3bf91c62c3df54ef58426bd4c994316237fffba7 (patch)
treebb08e4f164322012ebeb120c3016c537be8d2fe9 /sys/arch/alpha
parentcedcb61c4089e42a856b6469ce521e060becebc7 (diff)
Convert to uiomove().
ok guenther@
Diffstat (limited to 'sys/arch/alpha')
-rw-r--r--sys/arch/alpha/alpha/mem.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/sys/arch/alpha/alpha/mem.c b/sys/arch/alpha/alpha/mem.c
index fee7d80a976..37c5323bd9b 100644
--- a/sys/arch/alpha/alpha/mem.c
+++ b/sys/arch/alpha/alpha/mem.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mem.c,v 1.26 2015/02/10 21:56:08 miod Exp $ */
+/* $OpenBSD: mem.c,v 1.27 2015/02/10 22:44:35 miod Exp $ */
/* $NetBSD: mem.c,v 1.26 2000/03/29 03:48:20 simonb Exp $ */
/*
@@ -124,9 +124,9 @@ mmrw(dev, uio, flags)
struct uio *uio;
int flags;
{
- register vaddr_t o, v;
- register int c;
- register struct iovec *iov;
+ vaddr_t o, v;
+ size_t c;
+ struct iovec *iov;
int error = 0, rw;
extern int msgbufmapped;
@@ -161,9 +161,9 @@ kmemphys:
}
o = uio->uio_offset & PGOFSET;
- c = min(uio->uio_resid, (int)(PAGE_SIZE - o));
+ c = ulmin(uio->uio_resid, PAGE_SIZE - o);
error =
- uiomovei((caddr_t)ALPHA_PHYS_TO_K0SEG(v), c, uio);
+ uiomove((caddr_t)ALPHA_PHYS_TO_K0SEG(v), c, uio);
break;
/* minor device 1 is kernel memory */
@@ -175,11 +175,11 @@ kmemphys:
goto kmemphys;
}
- c = min(iov->iov_len, MAXPHYS);
+ c = ulmin(iov->iov_len, MAXPHYS);
if (!uvm_kernacc((caddr_t)v, c,
uio->uio_rw == UIO_READ ? B_READ : B_WRITE))
return (EFAULT);
- error = uiomovei((caddr_t)v, c, uio);
+ error = uiomove((caddr_t)v, c, uio);
break;
/* minor device 2 is EOF/rathole */
@@ -201,8 +201,8 @@ kmemphys:
if (zeropage == NULL)
zeropage = malloc(PAGE_SIZE, M_TEMP,
M_WAITOK | M_ZERO);
- c = min(iov->iov_len, PAGE_SIZE);
- error = uiomovei(zeropage, c, uio);
+ c = ulmin(iov->iov_len, PAGE_SIZE);
+ error = uiomove(zeropage, c, uio);
break;
default: