Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/sun2/dev Fix shadowing variable warning.



details:   https://anonhg.NetBSD.org/src/rev/89855d7fe057
branches:  trunk
changeset: 581700:89855d7fe057
user:      tsutsui <tsutsui%NetBSD.org@localhost>
date:      Fri Jun 03 22:05:25 2005 +0000

description:
Fix shadowing variable warning.

diffstat:

 sys/arch/sun2/dev/if_ie_obio.c |  24 ++++++++++++------------
 1 files changed, 12 insertions(+), 12 deletions(-)

diffs (100 lines):

diff -r b5f163f3a8de -r 89855d7fe057 sys/arch/sun2/dev/if_ie_obio.c
--- a/sys/arch/sun2/dev/if_ie_obio.c    Fri Jun 03 22:04:27 2005 +0000
+++ b/sys/arch/sun2/dev/if_ie_obio.c    Fri Jun 03 22:05:25 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_ie_obio.c,v 1.8 2005/01/22 15:36:09 chs Exp $       */
+/*     $NetBSD: if_ie_obio.c,v 1.9 2005/06/03 22:05:25 tsutsui Exp $   */
 
 /*-
  * Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -85,7 +85,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_ie_obio.c,v 1.8 2005/01/22 15:36:09 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ie_obio.c,v 1.9 2005/06/03 22:05:25 tsutsui Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -273,7 +273,7 @@
        int error;
        paddr_t pa;
        struct intrhand *ih;
-       bus_size_t msize;
+       bus_size_t memsize;
        u_long iebase;
        uint8_t myaddr[ETHER_ADDR_LEN];
 
@@ -289,7 +289,7 @@
        sc->ie_bus_read16 = ie_obio_read16;
        sc->ie_bus_write16 = ie_obio_write16;
        sc->ie_bus_write24 = ie_obio_write24;
-       sc->sc_msize = msize = 65536; /* XXX */
+       sc->sc_msize = memsize = 65536; /* XXX */
 
        if (bus_space_map(oba->oba_bustag, oba->oba_paddr, sizeof(struct ieob),
                        0, &bh))
@@ -299,14 +299,14 @@
        /*
         * Allocate control & buffer memory.
         */
-       if ((error = bus_dmamap_create(dmatag, msize, 1, msize, 0,
+       if ((error = bus_dmamap_create(dmatag, memsize, 1, memsize, 0,
                                        BUS_DMA_NOWAIT|BUS_DMA_24BIT,
                                        &sc->sc_dmamap)) != 0) {
                printf("%s: DMA map create error %d\n",
                        sc->sc_dev.dv_xname, error);
                return;
        }
-       if ((error = bus_dmamem_alloc(dmatag, msize, 64*1024, 0,
+       if ((error = bus_dmamem_alloc(dmatag, memsize, 64*1024, 0,
                             &seg, 1, &rseg,
                             BUS_DMA_NOWAIT | BUS_DMA_24BIT)) != 0) {
                printf("%s: DMA memory allocation error %d\n",
@@ -315,7 +315,7 @@
        }
 
        /* Map DMA buffer in CPU addressable space */
-       if ((error = bus_dmamem_map(dmatag, &seg, rseg, msize,
+       if ((error = bus_dmamem_map(dmatag, &seg, rseg, memsize,
                                    (caddr_t *)&sc->sc_maddr,
                                    BUS_DMA_NOWAIT|BUS_DMA_COHERENT)) != 0) {
                printf("%s: DMA buffer map error %d\n",
@@ -326,16 +326,16 @@
 
        /* Load the segment */
        if ((error = bus_dmamap_load(dmatag, sc->sc_dmamap,
-                                    sc->sc_maddr, msize, NULL,
+                                    sc->sc_maddr, memsize, NULL,
                                     BUS_DMA_NOWAIT)) != 0) {
                printf("%s: DMA buffer map load error %d\n",
                        sc->sc_dev.dv_xname, error);
-               bus_dmamem_unmap(dmatag, sc->sc_maddr, msize);
+               bus_dmamem_unmap(dmatag, sc->sc_maddr, memsize);
                bus_dmamem_free(dmatag, &seg, rseg);
                return;
        }
 
-       w16zero(sc->sc_maddr, msize);
+       w16zero(sc->sc_maddr, memsize);
        sc->bh = (bus_space_handle_t)(sc->sc_maddr);
 
        /*
@@ -355,7 +355,7 @@
        |---//--- ISCP-SCB-----scp-|--//- buffers -//-|... |iscp-scb-----SCP-|
        |         |                |                  |    |             |   |
        |         |<---PAGE_SIZE-->|                  |    |<--PAGE_SIZE-+-->|
-       |         |<------------- msize ------------->|    |       ^     |
+       |         |<------------ memsize ------------>|    |       ^     |
        |         |                                                |     |
        |         \@maddr                                 (last page dbl mapped)
        |                                                                |
@@ -393,7 +393,7 @@
         * are used for buffers.
         */
        sc->buf_area = PAGE_SIZE;
-       sc->buf_area_sz = msize - PAGE_SIZE;
+       sc->buf_area_sz = memsize - PAGE_SIZE;
 
        if (i82586_proberam(sc) == 0) {
                printf(": memory probe failed\n");



Home | Main Index | Thread Index | Old Index