Module Name:    src
Committed By:   dyoung
Date:           Wed Sep 28 01:45:49 UTC 2011

Modified Files:
        src/sys/arch/x86/x86: bus_dma.c

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


To generate a diff of this commit:
cvs rdiff -u -r1.66 -r1.67 src/sys/arch/x86/x86/bus_dma.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/x86/x86/bus_dma.c
diff -u src/sys/arch/x86/x86/bus_dma.c:1.66 src/sys/arch/x86/x86/bus_dma.c:1.67
--- src/sys/arch/x86/x86/bus_dma.c:1.66	Wed Sep 28 01:38:19 2011
+++ src/sys/arch/x86/x86/bus_dma.c	Wed Sep 28 01:45:49 2011
@@ -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,12 +395,10 @@ _bus_dmamap_load(bus_dma_tag_t t, bus_dm
 		return 0;
 	}
 
-	if (cookie == NULL)
-		return error;
-	if ((cookie->id_flags & X86_DMA_MIGHT_NEED_BOUNCE) == 0)
+	if (cookie == NULL ||
+	    (cookie->id_flags & X86_DMA_MIGHT_NEED_BOUNCE) == 0)
 		return error;
 
-
 	/*
 	 * First attempt failed; bounce it.
 	 */
@@ -594,7 +592,7 @@ _bus_dmamap_load_mbuf(bus_dma_tag_t t, b
 	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 @@ _bus_dmamap_load_uio(bus_dma_tag_t t, bu
 	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);

Reply via email to