Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/marvell move some variables inside their #ifdef use.
details: https://anonhg.NetBSD.org/src/rev/a2f22a787801
branches: trunk
changeset: 791129:a2f22a787801
user: mrg <mrg%NetBSD.org@localhost>
date: Wed Nov 06 06:20:12 2013 +0000
description:
move some variables inside their #ifdef use.
diffstat:
sys/dev/marvell/gtpci.c | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
diffs (43 lines):
diff -r a856e7a0f1b8 -r a2f22a787801 sys/dev/marvell/gtpci.c
--- a/sys/dev/marvell/gtpci.c Wed Nov 06 02:41:12 2013 +0000
+++ b/sys/dev/marvell/gtpci.c Wed Nov 06 06:20:12 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: gtpci.c,v 1.30 2012/09/07 04:25:37 matt Exp $ */
+/* $NetBSD: gtpci.c,v 1.31 2013/11/06 06:20:12 mrg Exp $ */
/*
* Copyright (c) 2008, 2009 KIYOHARA Takashi
* All rights reserved.
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: gtpci.c,v 1.30 2012/09/07 04:25:37 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: gtpci.c,v 1.31 2013/11/06 06:20:12 mrg Exp $");
#include "opt_pci.h"
#include "pci.h"
@@ -314,12 +314,9 @@
};
device_t pdev = device_parent(sc->sc_dev);
uint64_t base;
- uint32_t p2pc, size, bare;
- int map, bus, dev, rv;
+ uint32_t size, bare;
+ int map, rv;
- p2pc = GTPCI_READ(sc, GTPCI_P2PC);
- bus = GTPCI_P2PC_BUSNUMBER(p2pc);
- dev = GTPCI_P2PC_DEVNUM(p2pc);
bare = GTPCI_BARE_ALLDISABLE;
for (map = 0; maps[map].tag != MARVELL_TAG_UNDEFINED; map++) {
@@ -337,6 +334,9 @@
if (maps[map].func != -1) {
pcitag_t tag;
pcireg_t reg;
+ int dev = GTPCI_P2PC_DEVNUM(p2pc);
+ int bus = GTPCI_P2PC_BUSNUMBER(p2pc);
+ uint32_t p2pc = GTPCI_READ(sc, GTPCI_P2PC);
tag = gtpci_make_tag(NULL, bus, dev, maps[map].func);
reg = gtpci_conf_read(sc, tag, maps[map].balow);
Home |
Main Index |
Thread Index |
Old Index