Module Name:    src
Committed By:   tsutsui
Date:           Wed Feb 24 15:18:15 UTC 2010

Modified Files:
        src/sys/dev/ic: ne2000.c

Log Message:
Use roundup2() in <sys/param.h> rather than a conditional.


To generate a diff of this commit:
cvs rdiff -u -r1.65 -r1.66 src/sys/dev/ic/ne2000.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/dev/ic/ne2000.c
diff -u src/sys/dev/ic/ne2000.c:1.65 src/sys/dev/ic/ne2000.c:1.66
--- src/sys/dev/ic/ne2000.c:1.65	Wed Feb 24 15:13:34 2010
+++ src/sys/dev/ic/ne2000.c	Wed Feb 24 15:18:15 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: ne2000.c,v 1.65 2010/02/24 15:13:34 tsutsui Exp $	*/
+/*	$NetBSD: ne2000.c,v 1.66 2010/02/24 15:18:15 tsutsui Exp $	*/
 
 /*-
  * Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
@@ -48,7 +48,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ne2000.c,v 1.65 2010/02/24 15:13:34 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ne2000.c,v 1.66 2010/02/24 15:18:15 tsutsui Exp $");
 
 #include "opt_ipkdb.h"
 
@@ -716,8 +716,7 @@
 	NIC_BARRIER(nict, nich);
 
 	/* Round up to a word. */
-	if (amount & 1)
-		++amount;
+	amount = roundup2(amount, sizeof(uint16_t));
 
 	/* Set up DMA byte count. */
 	bus_space_write_1(nict, nich, ED_P0_RBCR0, amount);

Reply via email to