Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/mips/adm5120/dev #ifdef a variable like its usage.



details:   https://anonhg.NetBSD.org/src/rev/562367fa6a77
branches:  trunk
changeset: 330188:562367fa6a77
user:      skrll <skrll%NetBSD.org@localhost>
date:      Sat Jun 28 10:25:16 2014 +0000

description:
#ifdef a variable like its usage.

diffstat:

 sys/arch/mips/adm5120/dev/admpci.c |  9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diffs (39 lines):

diff -r 9fba37cc1451 -r 562367fa6a77 sys/arch/mips/adm5120/dev/admpci.c
--- a/sys/arch/mips/adm5120/dev/admpci.c        Sat Jun 28 09:16:18 2014 +0000
+++ b/sys/arch/mips/adm5120/dev/admpci.c        Sat Jun 28 10:25:16 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: admpci.c,v 1.10 2014/03/29 19:28:29 christos Exp $ */
+/* $NetBSD: admpci.c,v 1.11 2014/06/28 10:25:16 skrll Exp $ */
 
 /*-
  * Copyright (c) 2007 David Young.  All rights reserved.
@@ -61,7 +61,7 @@
 #include "pci.h"
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: admpci.c,v 1.10 2014/03/29 19:28:29 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: admpci.c,v 1.11 2014/06/28 10:25:16 skrll Exp $");
 
 #include <sys/types.h>
 #include <sys/bus.h>
@@ -182,7 +182,6 @@
        struct mainbus_attach_args      *ma = (struct mainbus_attach_args *)aux;
 #if NPCI > 0
        u_long                          result;
-       pcitag_t                        tag;
        struct pcibus_attach_args       pba;
 #endif
        
@@ -226,9 +225,11 @@
        sc->sc_pc.pc_intr_disestablish = admpci_intr_disestablish;
        sc->sc_pc.pc_conf_interrupt = admpci_conf_interrupt;
 
-       tag = pci_make_tag(&sc->sc_pc, 0, 0, 0);
+#ifdef ADMPCI_DEBUG
+       pcitag_t tag = pci_make_tag(&sc->sc_pc, 0, 0, 0);
        ADMPCI_DPRINTF("%s: BAR 0x10 0x%08x\n", __func__,
            pci_conf_read(&sc->sc_pc, tag, PCI_MAPREG_START));
+#endif
 
 #ifdef PCI_NETBSD_CONFIGURE
        mem_ex = extent_create("pcimem",



Home | Main Index | Thread Index | Old Index