summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorchristos <christos@NetBSD.org>2005-05-31 00:46:05 +0000
committerchristos <christos@NetBSD.org>2005-05-31 00:46:05 +0000
commit6b23a1011844b07e1ea5d7ec8218bdf667ffccd5 (patch)
tree5d08bea29ac5f9ff3a3104048a908ad00bad7f65 /sys/dev
parent1475e6ed5cb490eba2b6e3eb32d368b3875e0ffe (diff)
avoid variable shadow.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/ic/advlib.c12
-rw-r--r--sys/dev/ic/lsi64854.c24
-rw-r--r--sys/dev/ic/lsi64854var.h16
3 files changed, 26 insertions, 26 deletions
diff --git a/sys/dev/ic/advlib.c b/sys/dev/ic/advlib.c
index d08c38a3a83..d0af03ddf79 100644
--- a/sys/dev/ic/advlib.c
+++ b/sys/dev/ic/advlib.c
@@ -1,4 +1,4 @@
-/* $NetBSD: advlib.c,v 1.21 2005/05/30 04:43:46 christos Exp $ */
+/* $NetBSD: advlib.c,v 1.22 2005/05/31 00:46:05 christos Exp $ */
/*
* Low level routines for the Advanced Systems Inc. SCSI controllers chips
@@ -53,7 +53,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: advlib.c,v 1.21 2005/05/30 04:43:46 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: advlib.c,v 1.22 2005/05/31 00:46:05 christos Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -867,7 +867,7 @@ AscSetChipSynRegAtID(bus_space_tag_t iot, bus_space_handle_t ioh,
{
ASC_SCSI_BIT_ID_TYPE org_id;
int i;
- int sta = TRUE;
+ int stax = TRUE;
AscSetBank(iot, ioh, 1);
org_id = ASC_READ_CHIP_DVC_ID(iot, ioh);
@@ -881,14 +881,14 @@ AscSetChipSynRegAtID(bus_space_tag_t iot, bus_space_handle_t ioh,
AscSetBank(iot, ioh, 0);
ASC_SET_CHIP_SYN(iot, ioh, sdtr_data);
if (ASC_GET_CHIP_SYN(iot, ioh) != sdtr_data)
- sta = FALSE;
+ stax = FALSE;
} else
- sta = FALSE;
+ stax = FALSE;
AscSetBank(iot, ioh, 1);
ASC_WRITE_CHIP_DVC_ID(iot, ioh, org_id);
AscSetBank(iot, ioh, 0);
- return (sta);
+ return (stax);
}
diff --git a/sys/dev/ic/lsi64854.c b/sys/dev/ic/lsi64854.c
index 0c3ea918dc0..2dc1c429bd6 100644
--- a/sys/dev/ic/lsi64854.c
+++ b/sys/dev/ic/lsi64854.c
@@ -1,4 +1,4 @@
-/* $NetBSD: lsi64854.c,v 1.25 2005/02/27 00:27:02 perry Exp $ */
+/* $NetBSD: lsi64854.c,v 1.26 2005/05/31 00:46:05 christos Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: lsi64854.c,v 1.25 2005/02/27 00:27:02 perry Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lsi64854.c,v 1.26 2005/05/31 00:46:05 christos Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -168,7 +168,7 @@ lsi64854_attach(sc)
} while (0)
#define DMA_DRAIN(sc, dontpanic) do { \
- u_int32_t csr; \
+ u_int32_t _csr; \
/* \
* DMA rev0 & rev1: we are not allowed to touch the DMA "flush" \
* and "drain" bits while it is still thinking about a \
@@ -181,13 +181,13 @@ lsi64854_attach(sc)
* Select drain bit based on revision \
* also clears errors and D_TC flag \
*/ \
- csr = L64854_GCSR(sc); \
+ _csr = L64854_GCSR(sc); \
if (sc->sc_rev == DMAREV_1 || sc->sc_rev == DMAREV_0) \
- csr |= D_ESC_DRAIN; \
+ _csr |= D_ESC_DRAIN; \
else \
- csr |= L64854_INVALIDATE; \
+ _csr |= L64854_INVALIDATE; \
\
- L64854_SCSR(sc,csr); \
+ L64854_SCSR(sc,_csr); \
} \
/* \
* Wait for draining to finish \
@@ -197,7 +197,7 @@ lsi64854_attach(sc)
} while(0)
#define DMA_FLUSH(sc, dontpanic) do { \
- u_int32_t csr; \
+ u_int32_t _csr; \
/* \
* DMA rev0 & rev1: we are not allowed to touch the DMA "flush" \
* and "drain" bits while it is still thinking about a \
@@ -205,10 +205,10 @@ lsi64854_attach(sc)
* other revs: D_ESC_R_PEND bit reads as 0 \
*/ \
DMAWAIT(sc, L64854_GCSR(sc) & D_ESC_R_PEND, "R_PEND", dontpanic);\
- csr = L64854_GCSR(sc); \
- csr &= ~(L64854_WRITE|L64854_EN_DMA); /* no-ops on ENET */ \
- csr |= L64854_INVALIDATE; /* XXX FAS ? */ \
- L64854_SCSR(sc,csr); \
+ _csr = L64854_GCSR(sc); \
+ _csr &= ~(L64854_WRITE|L64854_EN_DMA); /* no-ops on ENET */ \
+ _csr |= L64854_INVALIDATE; /* XXX FAS ? */ \
+ L64854_SCSR(sc,_csr); \
} while(0)
void
diff --git a/sys/dev/ic/lsi64854var.h b/sys/dev/ic/lsi64854var.h
index 03ede3dc89f..18cc4f0d4ac 100644
--- a/sys/dev/ic/lsi64854var.h
+++ b/sys/dev/ic/lsi64854var.h
@@ -1,4 +1,4 @@
-/* $NetBSD: lsi64854var.h,v 1.6 2005/02/04 02:10:36 perry Exp $ */
+/* $NetBSD: lsi64854var.h,v 1.7 2005/05/31 00:46:05 christos Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -86,17 +86,17 @@ struct lsi64854_softc {
#define DMA_ISACTIVE(sc) ((sc)->sc_active)
#define DMA_ENINTR(sc) do { \
- u_int32_t csr = L64854_GCSR(sc); \
- csr |= L64854_INT_EN; \
- L64854_SCSR(sc, csr); \
-} while (0)
+ u_int32_t _csr = L64854_GCSR(sc); \
+ _csr |= L64854_INT_EN; \
+ L64854_SCSR(sc, _csr); \
+} while (/*CONSTCOND*/0)
#define DMA_ISINTR(sc) (L64854_GCSR(sc) & (D_INT_PEND|D_ERR_PEND))
#define DMA_GO(sc) do { \
- u_int32_t csr = L64854_GCSR(sc); \
- csr |= D_EN_DMA; \
- L64854_SCSR(sc, csr); \
+ u_int32_t _csr = L64854_GCSR(sc); \
+ _csr |= D_EN_DMA; \
+ L64854_SCSR(sc, _csr); \
sc->sc_active = 1; \
} while (0)