summaryrefslogtreecommitdiff
path: root/sys/dev/sbus/bpp.c
diff options
context:
space:
mode:
authorStefan Kempf <stefan@cvs.openbsd.org>2016-03-14 18:01:19 +0000
committerStefan Kempf <stefan@cvs.openbsd.org>2016-03-14 18:01:19 +0000
commit3176c2567eb1c770f0c6c493ff8833b7a05b5695 (patch)
tree45ac50e8b87423f3545f5ebf0b0788279647fc8a /sys/dev/sbus/bpp.c
parent4e938475ab0036021afd3865e42fa687ae5f596b (diff)
Convert sparc drivers bpp and magma to uiomove
Compile test and ok tobiasu@
Diffstat (limited to 'sys/dev/sbus/bpp.c')
-rw-r--r--sys/dev/sbus/bpp.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/sbus/bpp.c b/sys/dev/sbus/bpp.c
index f03f25ca8ba..c9f22e2cf12 100644
--- a/sys/dev/sbus/bpp.c
+++ b/sys/dev/sbus/bpp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bpp.c,v 1.4 2015/02/10 21:56:09 miod Exp $ */
+/* $OpenBSD: bpp.c,v 1.5 2016/03/14 18:01:18 stefan Exp $ */
/* $NetBSD: bpp.c,v 1.25 2005/12/11 12:23:44 christos Exp $ */
/*-
@@ -303,9 +303,9 @@ bppwrite(dev_t dev, struct uio *uio, int flags)
*/
while (uio->uio_resid > 0) {
caddr_t bp = sc->sc_buf;
- size_t len = min(sc->sc_bufsz, uio->uio_resid);
+ size_t len = ulmin(sc->sc_bufsz, uio->uio_resid);
- if ((error = uiomovei(bp, len, uio)) != 0)
+ if ((error = uiomove(bp, len, uio)) != 0)
break;
while (len > 0) {
@@ -315,7 +315,7 @@ bppwrite(dev_t dev, struct uio *uio, int flags)
#ifdef DEBUG
if (bppdebug) {
- int i;
+ size_t i;
printf("bpp: writing %ld : ", len);
for (i=0; i<len; i++) printf("%c(0x%x)", bp[i], bp[i]);
printf("\n");