Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/sparc - remove unused but set variables.
details: https://anonhg.NetBSD.org/src/rev/232f65ab2148
branches: trunk
changeset: 790719:232f65ab2148
user: mrg <mrg%NetBSD.org@localhost>
date: Sat Oct 19 19:40:23 2013 +0000
description:
- remove unused but set variables.
- use __USE() where necessary.
- remove useless 'volatile' markers
kd.c:consinit() might be wrong for old proms, but i've not
changed it really.
diffstat:
sys/arch/sparc/dev/if_ie_obio.c | 11 +++++------
sys/arch/sparc/dev/kd.c | 11 +++++++----
sys/arch/sparc/dev/tctrl.c | 7 +++----
sys/arch/sparc/dev/ts102.c | 4 +++-
sys/arch/sparc/include/pmap.h | 4 ++--
sys/arch/sparc/sparc/cpuvar.h | 6 +++---
sys/arch/sparc/sparc/memecc.c | 6 ++----
sys/arch/sparc/sparc/timer.c | 7 ++++---
8 files changed, 29 insertions(+), 27 deletions(-)
diffs (251 lines):
diff -r 9eedd2c9dc39 -r 232f65ab2148 sys/arch/sparc/dev/if_ie_obio.c
--- a/sys/arch/sparc/dev/if_ie_obio.c Sat Oct 19 19:29:59 2013 +0000
+++ b/sys/arch/sparc/dev/if_ie_obio.c Sat Oct 19 19:40:23 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_ie_obio.c,v 1.40 2011/07/01 18:50:41 dyoung Exp $ */
+/* $NetBSD: if_ie_obio.c,v 1.41 2013/10/19 19:40:23 mrg Exp $ */
/*-
* Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -73,7 +73,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_ie_obio.c,v 1.40 2011/07/01 18:50:41 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ie_obio.c,v 1.41 2013/10/19 19:40:23 mrg Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -254,7 +254,6 @@
int rseg;
int error;
paddr_t pa;
- struct intrhand *ih;
bus_size_t memsize;
u_long iebase;
uint8_t myaddr[ETHER_ADDR_LEN];
@@ -392,7 +391,7 @@
i82586_attach(sc, "onboard", myaddr, media, NMEDIA, media[0]);
/* Establish interrupt channel */
- ih = bus_intr_establish(oba->oba_bustag,
- oba->oba_pri, IPL_NET,
- i82586_intr, sc);
+ (void)bus_intr_establish(oba->oba_bustag,
+ oba->oba_pri, IPL_NET,
+ i82586_intr, sc);
}
diff -r 9eedd2c9dc39 -r 232f65ab2148 sys/arch/sparc/dev/kd.c
--- a/sys/arch/sparc/dev/kd.c Sat Oct 19 19:29:59 2013 +0000
+++ b/sys/arch/sparc/dev/kd.c Sat Oct 19 19:40:23 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kd.c,v 1.51 2012/10/27 17:18:11 chs Exp $ */
+/* $NetBSD: kd.c,v 1.52 2013/10/19 19:40:23 mrg Exp $ */
/*-
* Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -39,7 +39,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kd.c,v 1.51 2012/10/27 17:18:11 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kd.c,v 1.52 2013/10/19 19:40:23 mrg Exp $");
#include "opt_kgdb.h"
#include "fb.h"
@@ -334,7 +334,6 @@
static void
kdstart(struct tty *tp)
{
- struct clist *cl;
int s1, s2;
s1 = splsoftclock();
@@ -342,7 +341,6 @@
if (tp->t_state & (TS_BUSY|TS_TTSTOP|TS_TIMEOUT))
goto out;
- cl = &tp->t_outq;
if (ttypull(tp)) {
tp->t_state |= TS_BUSY;
if ((s1 & PSR_PIL) == 0) {
@@ -619,15 +617,20 @@
void
consinit(void)
{
+#if 0
int inSource, outSink;
+#endif
switch (prom_version()) {
+#if 0
case PROM_OLDMON:
case PROM_OBP_V0:
/* The stdio handles identify the device type */
inSource = prom_stdin();
outSink = prom_stdout();
break;
+ // XXXMRG should these just set prom_stdin_node / prom_stdout_node?
+#endif
case PROM_OBP_V2:
case PROM_OBP_V3:
diff -r 9eedd2c9dc39 -r 232f65ab2148 sys/arch/sparc/dev/tctrl.c
--- a/sys/arch/sparc/dev/tctrl.c Sat Oct 19 19:29:59 2013 +0000
+++ b/sys/arch/sparc/dev/tctrl.c Sat Oct 19 19:40:23 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tctrl.c,v 1.56 2012/10/27 17:18:11 chs Exp $ */
+/* $NetBSD: tctrl.c,v 1.57 2013/10/19 19:40:23 mrg Exp $ */
/*-
* Copyright (c) 1998, 2005, 2006 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tctrl.c,v 1.56 2012/10/27 17:18:11 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tctrl.c,v 1.57 2013/10/19 19:40:23 mrg Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -747,7 +747,7 @@
tctrl_read_event_status(struct tctrl_softc *sc)
{
struct tctrl_req req;
- int s, lid;
+ int s;
uint32_t v;
req.cmdbuf[0] = TS102_OP_RD_EVENT_STATUS;
@@ -800,7 +800,6 @@
(sc->sc_ext_status & TS102_EXT_STATUS_LID_DOWN)
? "closed" : "opened");
#endif
- lid = (sc->sc_ext_status & TS102_EXT_STATUS_LID_DOWN) == 0;
}
if (v & TS102_EVENT_STATUS_EXTERNAL_VGA_STATUS_CHANGE) {
int vga;
diff -r 9eedd2c9dc39 -r 232f65ab2148 sys/arch/sparc/dev/ts102.c
--- a/sys/arch/sparc/dev/ts102.c Sat Oct 19 19:29:59 2013 +0000
+++ b/sys/arch/sparc/dev/ts102.c Sat Oct 19 19:40:23 2013 +0000
@@ -1,5 +1,5 @@
/* $OpenBSD: ts102.c,v 1.14 2005/01/27 17:03:23 millert Exp $ */
-/* $NetBSD: ts102.c,v 1.17 2012/10/27 17:18:11 chs Exp $ */
+/* $NetBSD: ts102.c,v 1.18 2013/10/19 19:40:23 mrg Exp $ */
/*
* Copyright (c) 2003, 2004, Miodrag Vallat.
* Copyright (c) 2005, Michael Lorenz.
@@ -866,6 +866,8 @@
#ifdef TSLOT_DEBUG
printf("%s: interrupt on socket %d ir %x sts %x\n",
device_xname(sc->sc_dev), td->td_slot, intreg, status);
+#else
+ __USE(status);
#endif
sockstat = td->td_status;
diff -r 9eedd2c9dc39 -r 232f65ab2148 sys/arch/sparc/include/pmap.h
--- a/sys/arch/sparc/include/pmap.h Sat Oct 19 19:29:59 2013 +0000
+++ b/sys/arch/sparc/include/pmap.h Sat Oct 19 19:40:23 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.h,v 1.91 2013/01/07 16:59:18 chs Exp $ */
+/* $NetBSD: pmap.h,v 1.92 2013/10/19 19:40:23 mrg Exp $ */
/*
* Copyright (c) 1996
@@ -260,7 +260,7 @@
#define pmap_phys_address(x) (x)
void pmap_reference(pmap_t);
void pmap_remove(pmap_t, vaddr_t, vaddr_t);
-#define pmap_update(pmap) /* nothing (yet) */
+#define pmap_update(pmap) __USE(pmap)
void pmap_virtual_space(vaddr_t *, vaddr_t *);
#ifdef PMAP_GROWKERNEL
vaddr_t pmap_growkernel(vaddr_t);
diff -r 9eedd2c9dc39 -r 232f65ab2148 sys/arch/sparc/sparc/cpuvar.h
--- a/sys/arch/sparc/sparc/cpuvar.h Sat Oct 19 19:29:59 2013 +0000
+++ b/sys/arch/sparc/sparc/cpuvar.h Sat Oct 19 19:40:23 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cpuvar.h,v 1.90 2011/08/15 02:19:44 mrg Exp $ */
+/* $NetBSD: cpuvar.h,v 1.91 2013/10/19 19:40:23 mrg Exp $ */
/*
* Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -171,9 +171,9 @@
* the pending register to avoid a hardware bug.
*/
#define raise_ipi(cpi,lvl) do { \
- volatile int x; \
+ int x; \
(cpi)->intreg_4m->pi_set = PINTR_SINTRLEV(lvl); \
- x = (cpi)->intreg_4m->pi_pend; \
+ x = (cpi)->intreg_4m->pi_pend; __USE(x); \
} while (0)
int sun4_mmu3l; /* [4]: 3-level MMU present */
diff -r 9eedd2c9dc39 -r 232f65ab2148 sys/arch/sparc/sparc/memecc.c
--- a/sys/arch/sparc/sparc/memecc.c Sat Oct 19 19:29:59 2013 +0000
+++ b/sys/arch/sparc/sparc/memecc.c Sat Oct 19 19:40:23 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: memecc.c,v 1.15 2012/10/10 16:51:51 tsutsui Exp $ */
+/* $NetBSD: memecc.c,v 1.16 2013/10/19 19:40:23 mrg Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: memecc.c,v 1.15 2012/10/10 16:51:51 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: memecc.c,v 1.16 2013/10/19 19:40:23 mrg Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -77,7 +77,6 @@
{
struct memecc_softc *sc = device_private(self);
struct mainbus_attach_args *ma = aux;
- int node;
uint32_t reg;
if (memerr_handler) {
@@ -86,7 +85,6 @@
}
sc->sc_bt = ma->ma_bustag;
- node = ma->ma_node;
/*
* Map registers
diff -r 9eedd2c9dc39 -r 232f65ab2148 sys/arch/sparc/sparc/timer.c
--- a/sys/arch/sparc/sparc/timer.c Sat Oct 19 19:29:59 2013 +0000
+++ b/sys/arch/sparc/sparc/timer.c Sat Oct 19 19:40:23 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: timer.c,v 1.30 2012/07/29 00:04:05 matt Exp $ */
+/* $NetBSD: timer.c,v 1.31 2013/10/19 19:40:23 mrg Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -60,7 +60,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: timer.c,v 1.30 2012/07/29 00:04:05 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: timer.c,v 1.31 2013/10/19 19:40:23 mrg Exp $");
#include <sys/param.h>
#include <sys/kernel.h>
@@ -163,11 +163,12 @@
* Note: sun4m clocks tick with 500ns periods.
*/
for (timerblurb = 1; ; timerblurb++) {
- volatile int discard;
+ int discard;
u_int t1;
/* Reset counter register by writing some large limit value */
discard = *limreg;
+ __USE(discard);
*limreg = tmr_ustolim(TMR_MASK-1);
t0 = *cntreg;
Home |
Main Index |
Thread Index |
Old Index