Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/alpha/pci move ifdef'ed out code inside if 0



details:   https://anonhg.NetBSD.org/src/rev/1c37f77d45ba
branches:  trunk
changeset: 791097:1c37f77d45ba
user:      christos <christos%NetBSD.org@localhost>
date:      Mon Nov 04 16:58:33 2013 +0000

description:
move ifdef'ed out code inside if 0

diffstat:

 sys/arch/alpha/pci/pci_swiz_bus_io_chipdep.c  |  11 ++++++-----
 sys/arch/alpha/pci/pci_swiz_bus_mem_chipdep.c |  12 +++++++-----
 2 files changed, 13 insertions(+), 10 deletions(-)

diffs (109 lines):

diff -r 1a75fe33a8f5 -r 1c37f77d45ba sys/arch/alpha/pci/pci_swiz_bus_io_chipdep.c
--- a/sys/arch/alpha/pci/pci_swiz_bus_io_chipdep.c      Mon Nov 04 16:58:14 2013 +0000
+++ b/sys/arch/alpha/pci/pci_swiz_bus_io_chipdep.c      Mon Nov 04 16:58:33 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pci_swiz_bus_io_chipdep.c,v 1.41 2012/02/06 02:14:15 matt Exp $ */
+/* $NetBSD: pci_swiz_bus_io_chipdep.c,v 1.42 2013/11/04 16:58:33 christos Exp $ */
 
 /*-
  * Copyright (c) 1998, 2000 The NetBSD Foundation, Inc.
@@ -76,7 +76,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(1, "$NetBSD: pci_swiz_bus_io_chipdep.c,v 1.41 2012/02/06 02:14:15 matt Exp $");
+__KERNEL_RCSID(1, "$NetBSD: pci_swiz_bus_io_chipdep.c,v 1.42 2013/11/04 16:58:33 christos Exp $");
 
 #include <sys/extent.h>
 
@@ -656,16 +656,15 @@
        register bus_space_handle_t tmpioh;
        register uint32_t *port, val;
        register uint32_t rval;
-       register int offset;
 
        alpha_mb();
 
        tmpioh = ioh + off;
-       offset = tmpioh & 3;
        port = (uint32_t *)((tmpioh << CHIP_ADDR_SHIFT) |
            (3 << CHIP_SIZE_SHIFT));
        val = *port;
 #if 0
+       int offset = tmpioh & 3;
        rval = ((val) >> (8 * offset)) & 0xffffffff;
 #else
        rval = val;
@@ -753,10 +752,12 @@
 {
        register bus_space_handle_t tmpioh;
        register uint32_t *port, nval;
-       register int offset;
 
        tmpioh = ioh + off;
+#if 0
+       register int offset;
        offset = tmpioh & 3;
+#endif
        nval = val /*<< (8 * offset)*/;
        port = (uint32_t *)((tmpioh << CHIP_ADDR_SHIFT) |
            (3 << CHIP_SIZE_SHIFT));
diff -r 1a75fe33a8f5 -r 1c37f77d45ba sys/arch/alpha/pci/pci_swiz_bus_mem_chipdep.c
--- a/sys/arch/alpha/pci/pci_swiz_bus_mem_chipdep.c     Mon Nov 04 16:58:14 2013 +0000
+++ b/sys/arch/alpha/pci/pci_swiz_bus_mem_chipdep.c     Mon Nov 04 16:58:33 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pci_swiz_bus_mem_chipdep.c,v 1.46 2012/02/06 02:14:15 matt Exp $ */
+/* $NetBSD: pci_swiz_bus_mem_chipdep.c,v 1.47 2013/11/04 16:58:33 christos Exp $ */
 
 /*-
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -85,7 +85,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(1, "$NetBSD: pci_swiz_bus_mem_chipdep.c,v 1.46 2012/02/06 02:14:15 matt Exp $");
+__KERNEL_RCSID(1, "$NetBSD: pci_swiz_bus_mem_chipdep.c,v 1.47 2013/11/04 16:58:33 christos Exp $");
 
 #include <sys/extent.h>
 
@@ -982,7 +982,6 @@
        register bus_space_handle_t tmpmemh;
        register uint32_t *port, val;
        register uint32_t rval;
-       register int offset;
 
        alpha_mb();
 
@@ -992,11 +991,12 @@
 #endif
 
        tmpmemh = memh + off;
-       offset = tmpmemh & 3;
        port = (uint32_t *)((tmpmemh << CHIP_ADDR_SHIFT) |
            (3 << CHIP_SIZE_SHIFT));
        val = *port;
 #if 0
+       int offset;
+       offset = tmpmemh & 3;
        rval = ((val) >> (8 * offset)) & 0xffffffff;
 #else
        rval = val;
@@ -1102,7 +1102,6 @@
 {
        register bus_space_handle_t tmpmemh;
        register uint32_t *port, nval;
-       register int offset;
 
 #ifdef CHIP_D_MEM_W1_SYS_START
        if ((memh >> 63) != 0)
@@ -1111,7 +1110,10 @@
 #endif
        {
                tmpmemh = memh + off;
+#if 0
+               int offset;
                offset = tmpmemh & 3;
+#endif
                nval = val /*<< (8 * offset)*/;
                port = (uint32_t *)((tmpmemh << CHIP_ADDR_SHIFT) |
                    (3 << CHIP_SIZE_SHIFT));



Home | Main Index | Thread Index | Old Index