Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/ic #if 0 some diagnostic code that compares two bus_...



details:   https://anonhg.NetBSD.org/src/rev/54435731860b
branches:  trunk
changeset: 753319:54435731860b
user:      dyoung <dyoung%NetBSD.org@localhost>
date:      Mon Mar 22 22:22:57 2010 +0000

description:
#if 0 some diagnostic code that compares two bus_space_tag_t's.  MI code
should not compare an opaque type such as bus_space_tag_t!

diffstat:

 sys/dev/ic/i82365.c |  12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)

diffs (51 lines):

diff -r 5ace5da74d1f -r 54435731860b sys/dev/ic/i82365.c
--- a/sys/dev/ic/i82365.c       Mon Mar 22 22:10:10 2010 +0000
+++ b/sys/dev/ic/i82365.c       Mon Mar 22 22:22:57 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: i82365.c,v 1.111 2009/09/17 18:14:41 tsutsui Exp $     */
+/*     $NetBSD: i82365.c,v 1.112 2010/03/22 22:22:57 dyoung Exp $      */
 
 /*
  * Copyright (c) 2004 Charles M. Hannum.  All rights reserved.
@@ -49,7 +49,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: i82365.c,v 1.111 2009/09/17 18:14:41 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: i82365.c,v 1.112 2010/03/22 22:22:57 dyoung Exp $");
 
 #define        PCICDEBUG
 
@@ -974,7 +974,6 @@
        bus_addr_t busaddr;
        long card_offset;
        int i, win;
-       struct pcic_softc *sc = device_private(h->ph_parent);
 
        win = -1;
        for (i = 0; i < (sizeof(mem_map_index) / sizeof(mem_map_index[0]));
@@ -993,8 +992,13 @@
 
        /* XXX this is pretty gross */
 
+#if 0  /* XXX Comparing bus_space_tag_t is a no-no! */
+{
+       struct pcic_softc *sc = device_private(h->ph_parent);
        if (sc->memt != pcmhp->memt)
                panic("pcic_chip_mem_map memt is bogus");
+}
+#endif
 
        busaddr = pcmhp->addr;
 
@@ -1203,8 +1207,10 @@
 
        /* XXX this is pretty gross */
 
+#if 0  /* XXX Comparing bus_space_tag_t is a no-no! */
        if (sc->iot != pcihp->iot)
                panic("pcic_chip_io_map iot is bogus");
+#endif
 
        DPRINTF(("pcic_chip_io_map window %d %s port %lx+%lx\n",
            win, width_names[width], (u_long) ioaddr, (u_long) size));



Home | Main Index | Thread Index | Old Index