Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/pci Simplify. Same code before and after.



details:   https://anonhg.NetBSD.org/src/rev/6c7e8d76b915
branches:  trunk
changeset: 1027189:6c7e8d76b915
user:      skrll <skrll%NetBSD.org@localhost>
date:      Fri Dec 10 05:55:06 2021 +0000

description:
Simplify.  Same code before and after.

diffstat:

 sys/dev/pci/if_wm.c |  11 ++++-------
 1 files changed, 4 insertions(+), 7 deletions(-)

diffs (32 lines):

diff -r e95103e1e91d -r 6c7e8d76b915 sys/dev/pci/if_wm.c
--- a/sys/dev/pci/if_wm.c       Fri Dec 10 05:39:22 2021 +0000
+++ b/sys/dev/pci/if_wm.c       Fri Dec 10 05:55:06 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_wm.c,v 1.720 2021/12/10 05:39:22 skrll Exp $        */
+/*     $NetBSD: if_wm.c,v 1.721 2021/12/10 05:55:06 skrll Exp $        */
 
 /*
  * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc.
@@ -82,7 +82,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.720 2021/12/10 05:39:22 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.721 2021/12/10 05:55:06 skrll Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_net_mpsafe.h"
@@ -1762,11 +1762,8 @@
 static inline void
 wm_set_dma_addr(volatile wiseman_addr_t *wa, bus_addr_t v)
 {
-       wa->wa_low = htole32(v & 0xffffffffU);
-       if (sizeof(bus_addr_t) == 8)
-               wa->wa_high = htole32((uint64_t) v >> 32);
-       else
-               wa->wa_high = 0;
+       wa->wa_low = htole32(BUS_ADDR_LO32(v));
+       wa->wa_high = htole32(BUS_ADDR_HI32(v));
 }
 
 /*



Home | Main Index | Thread Index | Old Index