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_dmamap_load_busaddr(), just return ...



details:   https://anonhg.NetBSD.org/src/rev/648c73464ceb
branches:  trunk
changeset: 767643:648c73464ceb
user:      dyoung <dyoung%NetBSD.org@localhost>
date:      Mon Jul 25 20:33:20 2011 +0000

description:
In _bus_dmamap_load_busaddr(), just return 0 instead of assigning an
intermediate variable (int error = 0;) and returning that (return
error;).

diffstat:

 sys/arch/x86/x86/bus_dma.c |  7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diffs (35 lines):

diff -r b432138a8b75 -r 648c73464ceb sys/arch/x86/x86/bus_dma.c
--- a/sys/arch/x86/x86/bus_dma.c        Mon Jul 25 19:42:50 2011 +0000
+++ b/sys/arch/x86/x86/bus_dma.c        Mon Jul 25 20:33:20 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: bus_dma.c,v 1.57 2011/07/01 18:21:31 dyoung Exp $      */
+/*     $NetBSD: bus_dma.c,v 1.58 2011/07/25 20:33:20 dyoung Exp $      */
 
 /*-
  * Copyright (c) 1996, 1997, 1998, 2007 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.57 2011/07/01 18:21:31 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.58 2011/07/25 20:33:20 dyoung Exp $");
 
 /*
  * The following is included because _bus_dma_uiomove is derived from
@@ -407,7 +407,6 @@
        bus_addr_t bmask = ~(map->_dm_boundary - 1);
        bus_addr_t lastaddr = 0xdead; /* XXX gcc */
        int sgsize;
-       int error = 0;
 
        if (nseg > 0)
                lastaddr = segs[nseg-1].ds_addr + segs[nseg-1].ds_len;
@@ -453,7 +452,7 @@
                goto again;
 
        map->dm_nsegs = nseg;
-       return error;
+       return 0;
 }
 
 /*



Home | Main Index | Thread Index | Old Index