Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/ic Use roundup2() in <sys/param.h> rather than a con...
details: https://anonhg.NetBSD.org/src/rev/ee6b165b9c63
branches: trunk
changeset: 752367:ee6b165b9c63
user: tsutsui <tsutsui%NetBSD.org@localhost>
date: Wed Feb 24 15:18:15 2010 +0000
description:
Use roundup2() in <sys/param.h> rather than a conditional.
diffstat:
sys/dev/ic/ne2000.c | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
diffs (28 lines):
diff -r 1db069fabe55 -r ee6b165b9c63 sys/dev/ic/ne2000.c
--- a/sys/dev/ic/ne2000.c Wed Feb 24 15:13:34 2010 +0000
+++ b/sys/dev/ic/ne2000.c Wed Feb 24 15:18:15 2010 +0000
@@ -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);
Home |
Main Index |
Thread Index |
Old Index