Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/x86/x86 In _bus_dma_uiomove():
details: https://anonhg.NetBSD.org/src/rev/1c80ea310ff8
branches: trunk
changeset: 554488:1c80ea310ff8
user: mycroft <mycroft%NetBSD.org@localhost>
date: Tue Oct 28 22:49:51 2003 +0000
description:
In _bus_dma_uiomove():
* Don't punt after the first iov in the UIO_SYSSPACE case. Not that this ever
happens in practice right now.
* If we get through the loop, error==0 by definition, so just return 0.
* Eliminate bogus initializer.
diffstat:
sys/arch/x86/x86/bus_dma.c | 9 ++++-----
1 files changed, 4 insertions(+), 5 deletions(-)
diffs (41 lines):
diff -r 0f432dbf3d28 -r 1c80ea310ff8 sys/arch/x86/x86/bus_dma.c
--- a/sys/arch/x86/x86/bus_dma.c Tue Oct 28 22:31:12 2003 +0000
+++ b/sys/arch/x86/x86/bus_dma.c Tue Oct 28 22:49:51 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bus_dma.c,v 1.8 2003/10/25 18:39:40 christos Exp $ */
+/* $NetBSD: bus_dma.c,v 1.9 2003/10/28 22:49:51 mycroft Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.8 2003/10/25 18:39:40 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.9 2003/10/28 22:49:51 mycroft Exp $");
/*
* The following is included because _bus_dma_uiomove is derived from
@@ -812,7 +812,7 @@
int direction;
{
struct iovec *iov;
- int error = 0;
+ int error;
struct proc *p;
char *cp;
size_t resid, cnt;
@@ -856,12 +856,11 @@
error = kcopy(iov->iov_base, cp, cnt);
if (error)
return (error);
- break;
}
cp += cnt;
resid -= cnt;
}
- return (error);
+ return (0);
}
/*
Home |
Main Index |
Thread Index |
Old Index