Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/isa isadma.c: #if 0 some diagnostic code that compar...



details:   https://anonhg.NetBSD.org/src/rev/c150b3980da0
branches:  trunk
changeset: 753321:c150b3980da0
user:      dyoung <dyoung%NetBSD.org@localhost>
date:      Mon Mar 22 22:30:58 2010 +0000

description:
isadma.c: #if 0 some diagnostic code that compares two bus_space_tag_t's.

pcdisplay.c: #if 0 some code that compares two bus_space_tag_t's
    in order to see if pcdisplay0 is console.  It does not seem to
    be helpful to compare the tags; maybe the author intended to
    compare some other bus property?

MI code should not compare an opaque type such as bus_space_tag_t!

diffstat:

 sys/dev/isa/isadma.c    |   6 ++++--
 sys/dev/isa/pcdisplay.c |  11 +++++++----
 2 files changed, 11 insertions(+), 6 deletions(-)

diffs (61 lines):

diff -r b7542477aaf6 -r c150b3980da0 sys/dev/isa/isadma.c
--- a/sys/dev/isa/isadma.c      Mon Mar 22 22:25:26 2010 +0000
+++ b/sys/dev/isa/isadma.c      Mon Mar 22 22:30:58 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: isadma.c,v 1.62 2009/08/18 16:52:42 dyoung Exp $       */
+/*     $NetBSD: isadma.c,v 1.63 2010/03/22 22:30:58 dyoung Exp $       */
 
 /*-
  * Copyright (c) 1997, 1998, 2000 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: isadma.c,v 1.62 2009/08/18 16:52:42 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: isadma.c,v 1.63 2010/03/22 22:30:58 dyoung Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -155,8 +155,10 @@
                 * configuration mechanisms, the space and dma tags
                 * must be the same!
                 */
+#if 0  /* XXX Comparing bus_space_tag_t is a no-no! */
                if (ids->ids_bst != bst || ids->ids_dmat != dmat)
                        panic("_isa_dmainit: inconsistent ISA tags");
+#endif
        } else {
                ids->ids_bst = bst;
                ids->ids_dmat = dmat;
diff -r b7542477aaf6 -r c150b3980da0 sys/dev/isa/pcdisplay.c
--- a/sys/dev/isa/pcdisplay.c   Mon Mar 22 22:25:26 2010 +0000
+++ b/sys/dev/isa/pcdisplay.c   Mon Mar 22 22:30:58 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pcdisplay.c,v 1.38 2009/05/12 09:10:15 cegger Exp $ */
+/* $NetBSD: pcdisplay.c,v 1.39 2010/03/22 22:30:58 dyoung Exp $ */
 
 /*
  * Copyright (c) 1998
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pcdisplay.c,v 1.38 2009/05/12 09:10:15 cegger Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pcdisplay.c,v 1.39 2010/03/22 22:30:58 dyoung Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -360,8 +360,11 @@
 pcdisplay_is_console(bus_space_tag_t iot)
 {
        if (pcdisplayconsole &&
-           !pcdisplay_console_attached &&
-           iot == pcdisplay_console_dc.dc_ph.ph_iot)
+           !pcdisplay_console_attached
+#if 0  /* XXX Comparing bus_space_tag_t is a no-no! */
+           && iot == pcdisplay_console_dc.dc_ph.ph_iot
+#endif
+           )
                return (1);
        return (0);
 }



Home | Main Index | Thread Index | Old Index