Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/pci move EVCNT only variable inside #ifdef



details:   https://anonhg.NetBSD.org/src/rev/b26a6fbdffaf
branches:  trunk
changeset: 791204:b26a6fbdffaf
user:      nisimura <nisimura%NetBSD.org@localhost>
date:      Fri Nov 08 06:20:48 2013 +0000

description:
move EVCNT only variable inside #ifdef

diffstat:

 sys/dev/pci/if_kse.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (37 lines):

diff -r 064cb994704f -r b26a6fbdffaf sys/dev/pci/if_kse.c
--- a/sys/dev/pci/if_kse.c      Fri Nov 08 04:32:58 2013 +0000
+++ b/sys/dev/pci/if_kse.c      Fri Nov 08 06:20:48 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_kse.c,v 1.24 2013/03/30 03:21:06 christos Exp $     */
+/*     $NetBSD: if_kse.c,v 1.25 2013/11/08 06:20:48 nisimura Exp $     */
 
 /*-
  * Copyright (c) 2006 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_kse.c,v 1.24 2013/03/30 03:21:06 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_kse.c,v 1.25 2013/11/08 06:20:48 nisimura Exp $");
 
 
 #include <sys/param.h>
@@ -350,7 +350,7 @@
        struct ifmedia *ifm;
        uint8_t enaddr[ETHER_ADDR_LEN];
        bus_dma_segment_t seg;
-       int i, p, error, nseg;
+       int i, error, nseg;
        pcireg_t pmode;
        int pmreg;
 
@@ -526,8 +526,8 @@
        if_attach(ifp);
        ether_ifattach(ifp, enaddr);
 
-       p = (sc->sc_chip == 0x8842) ? 3 : 1;
 #ifdef KSE_EVENT_COUNTERS
+       int p = (sc->sc_chip == 0x8842) ? 3 : 1;
        for (i = 0; i < p; i++) {
                struct ksext *ee = &sc->sc_ext;
                sprintf(ee->evcntname[i], "%s.%d", device_xname(sc->sc_dev), i+1);



Home | Main Index | Thread Index | Old Index