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 Cosmetic: join some if-statements, remove s...



details:   https://anonhg.NetBSD.org/src/rev/135b80f794dd
branches:  trunk
changeset: 769962:135b80f794dd
user:      dyoung <dyoung%NetBSD.org@localhost>
date:      Wed Sep 28 01:45:49 2011 +0000

description:
Cosmetic: join some if-statements, remove superfluous parentheses.  No
change in the generated assembly.

diffstat:

 sys/arch/x86/x86/bus_dma.c |  14 ++++++--------
 1 files changed, 6 insertions(+), 8 deletions(-)

diffs (50 lines):

diff -r 8fc500137cdb -r 135b80f794dd sys/arch/x86/x86/bus_dma.c
--- a/sys/arch/x86/x86/bus_dma.c        Wed Sep 28 01:38:19 2011 +0000
+++ b/sys/arch/x86/x86/bus_dma.c        Wed Sep 28 01:45:49 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: bus_dma.c,v 1.66 2011/09/28 01:38:19 dyoung Exp $      */
+/*     $NetBSD: bus_dma.c,v 1.67 2011/09/28 01:45:49 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.66 2011/09/28 01:38:19 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.67 2011/09/28 01:45:49 dyoung Exp $");
 
 /*
  * The following is included because _bus_dma_uiomove is derived from
@@ -395,11 +395,9 @@
                return 0;
        }
 
-       if (cookie == NULL)
+       if (cookie == NULL ||
+           (cookie->id_flags & X86_DMA_MIGHT_NEED_BOUNCE) == 0)
                return error;
-       if ((cookie->id_flags & X86_DMA_MIGHT_NEED_BOUNCE) == 0)
-               return error;
-
 
        /*
         * First attempt failed; bounce it.
@@ -594,7 +592,7 @@
        map->dm_nsegs = 0;
 
        if (cookie == NULL ||
-           ((cookie->id_flags & X86_DMA_MIGHT_NEED_BOUNCE) == 0))
+           (cookie->id_flags & X86_DMA_MIGHT_NEED_BOUNCE) == 0)
                return error;
 
        /*
@@ -678,7 +676,7 @@
        map->dm_nsegs = 0;
 
        if (cookie == NULL ||
-           ((cookie->id_flags & X86_DMA_MIGHT_NEED_BOUNCE) == 0))
+           (cookie->id_flags & X86_DMA_MIGHT_NEED_BOUNCE) == 0)
                return error;
 
        STAT_INCR(bounces);



Home | Main Index | Thread Index | Old Index