Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/sparc64/dev convert some open-coded SPDB_PROBE prin...
details: https://anonhg.NetBSD.org/src/rev/3ef38e313674
branches: trunk
changeset: 768221:3ef38e313674
user: mrg <mrg%NetBSD.org@localhost>
date: Fri Aug 12 06:04:41 2011 +0000
description:
convert some open-coded SPDB_PROBE printf calls to use DPRINTF() macro.
diffstat:
sys/arch/sparc64/dev/pci_machdep.c | 40 +++++++++++--------------------------
1 files changed, 12 insertions(+), 28 deletions(-)
diffs (81 lines):
diff -r 2a0db501e4d7 -r 3ef38e313674 sys/arch/sparc64/dev/pci_machdep.c
--- a/sys/arch/sparc64/dev/pci_machdep.c Fri Aug 12 05:21:50 2011 +0000
+++ b/sys/arch/sparc64/dev/pci_machdep.c Fri Aug 12 06:04:41 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pci_machdep.c,v 1.73 2011/07/01 18:48:36 dyoung Exp $ */
+/* $NetBSD: pci_machdep.c,v 1.74 2011/08/12 06:04:41 mrg Exp $ */
/*
* Copyright (c) 1999, 2000 Matthew R. Green
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pci_machdep.c,v 1.73 2011/07/01 18:48:36 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pci_machdep.c,v 1.74 2011/08/12 06:04:41 mrg Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -153,24 +153,17 @@
* then we're obviously on the wrong bus. So go up one
* level.
*/
-#ifdef DEBUG
- if (sparc_pci_debug & SPDB_PROBE) {
- printf("curnode %x %s\n", node,
- prom_getpropstringA(node, "name", name, sizeof(name)));
- }
-#endif
+ DPRINTF(SPDB_PROBE, ("curnode %x %s\n", node,
+ prom_getpropstringA(node, "name", name, sizeof(name))));
#if 0
while ((OF_getprop(OF_parent(node), "bus-range", (void *)&busrange,
sizeof(busrange)) == sizeof(busrange)) &&
(b < busrange[0] || b > busrange[1])) {
/* Out of range, go up one */
node = OF_parent(node);
-#ifdef DEBUG
- if (sparc_pci_debug & SPDB_PROBE) {
- printf("going up to node %x %s\n", node,
- prom_getpropstringA(node, "name", name, sizeof(name)));
- }
-#endif
+ DPRINTF(SPDB_PROBE, printf("going up to node %x %s\n",
+ node,
+ prom_getpropstringA(node, "name", name, sizeof(name))));
}
#endif
node = prom_firstchild(node);
@@ -183,13 +176,8 @@
*/
for (node = ((node)); node; node = prom_nextsibling(node)) {
-#ifdef DEBUG
- if (sparc_pci_debug & SPDB_PROBE) {
- printf("checking node %x %s\n", node,
- prom_getpropstringA(node, "name", name, sizeof(name)));
-
- }
-#endif
+ DPRINTF(SPDB_PROBE, ("checking node %x %s\n", node,
+ prom_getpropstringA(node, "name", name, sizeof(name))));
#if 1
/*
@@ -207,13 +195,9 @@
break;
/* Go down 1 level */
node = prom_firstchild(node);
-#ifdef DEBUG
- if (sparc_pci_debug & SPDB_PROBE) {
- printf("going down to node %x %s\n", node,
- prom_getpropstringA(node, "name",
- name, sizeof(name)));
- }
-#endif
+ DPRINTF(SPDB_PROBE, ("going down to node %x %s\n", node,
+ prom_getpropstringA(node, "name", name,
+ sizeof(name))));
}
#endif /*1*/
/*
Home |
Main Index |
Thread Index |
Old Index