Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/hp300 - remove unused
details: https://anonhg.NetBSD.org/src/rev/85e39c63d8b1
branches: trunk
changeset: 328042:85e39c63d8b1
user: christos <christos%NetBSD.org@localhost>
date: Mon Mar 24 19:42:58 2014 +0000
description:
- remove unused
- use cpu_{g,s}etmodel
diffstat:
sys/arch/hp300/dev/ct.c | 7 ++--
sys/arch/hp300/dev/dcm.c | 10 ++++--
sys/arch/hp300/dev/diofb.c | 4 +-
sys/arch/hp300/dev/dmareg.h | 5 ++-
sys/arch/hp300/dev/fhpib.c | 6 ++-
sys/arch/hp300/dev/mt.c | 7 ++--
sys/arch/hp300/dev/nhpib.c | 9 ++----
sys/arch/hp300/dev/rd.c | 10 ++----
sys/arch/hp300/hp300/autoconf.c | 6 +--
sys/arch/hp300/hp300/bus_space.c | 6 ++--
sys/arch/hp300/hp300/machdep.c | 58 +++++++++++++++++----------------------
11 files changed, 59 insertions(+), 69 deletions(-)
diffs (truncated from 515 to 300 lines):
diff -r 1399dd658b1c -r 85e39c63d8b1 sys/arch/hp300/dev/ct.c
--- a/sys/arch/hp300/dev/ct.c Mon Mar 24 19:29:59 2014 +0000
+++ b/sys/arch/hp300/dev/ct.c Mon Mar 24 19:42:58 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ct.c,v 1.58 2014/03/16 05:20:24 dholland Exp $ */
+/* $NetBSD: ct.c,v 1.59 2014/03/24 19:42:58 christos Exp $ */
/*-
* Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
@@ -75,7 +75,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ct.c,v 1.58 2014/03/16 05:20:24 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ct.c,v 1.59 2014/03/24 19:42:58 christos Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -732,11 +732,10 @@
struct ct_softc *sc = arg;
struct buf *bp;
uint8_t stat;
- int ctlr, slave, unit;
+ int ctlr, slave;
ctlr = device_unit(device_parent(sc->sc_dev));
slave = sc->sc_slave;
- unit = device_unit(sc->sc_dev);
bp = bufq_peek(sc->sc_tab);
if (bp == NULL) {
diff -r 1399dd658b1c -r 85e39c63d8b1 sys/arch/hp300/dev/dcm.c
--- a/sys/arch/hp300/dev/dcm.c Mon Mar 24 19:29:59 2014 +0000
+++ b/sys/arch/hp300/dev/dcm.c Mon Mar 24 19:42:58 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dcm.c,v 1.84 2014/03/16 05:20:24 dholland Exp $ */
+/* $NetBSD: dcm.c,v 1.85 2014/03/24 19:42:58 christos Exp $ */
/*-
* Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
@@ -78,7 +78,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: dcm.c,v 1.84 2014/03/16 05:20:24 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dcm.c,v 1.85 2014/03/24 19:42:58 christos Exp $");
#include "opt_kgdb.h"
@@ -1594,6 +1594,7 @@
c = fifo->data_char;
stat = fifo->data_stat;
pp->r_head = (head + 2) & RX_MASK;
+ __USE(stat);
splx(s);
return c;
}
@@ -1621,7 +1622,7 @@
}
tail = pp->t_tail & TX_MASK;
while (tail != (pp->t_head & TX_MASK))
- ;
+ continue;
dcm_cn->dcm_tfifos[3-DCMCONSPORT][tail].data_char = c;
pp->t_tail = tail = (tail + 1) & TX_MASK;
SEM_LOCK(dcm_cn);
@@ -1629,7 +1630,7 @@
dcm_cn->dcm_cr |= (1 << DCMCONSPORT);
SEM_UNLOCK(dcm_cn);
while (tail != (pp->t_head & TX_MASK))
- ;
+ continue;
/*
* If board interrupts are enabled, just let our completion
* interrupt through in case some other port on the board
@@ -1640,5 +1641,6 @@
stat = dcm_cn->dcm_iir;
SEM_UNLOCK(dcm_cn);
}
+ __USE(stat);
splx(s);
}
diff -r 1399dd658b1c -r 85e39c63d8b1 sys/arch/hp300/dev/diofb.c
--- a/sys/arch/hp300/dev/diofb.c Mon Mar 24 19:29:59 2014 +0000
+++ b/sys/arch/hp300/dev/diofb.c Mon Mar 24 19:42:58 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: diofb.c,v 1.3 2011/02/18 19:15:43 tsutsui Exp $ */
+/* $NetBSD: diofb.c,v 1.4 2014/03/24 19:42:58 christos Exp $ */
/* $OpenBSD: diofb.c,v 1.18 2010/12/26 15:40:59 miod Exp $ */
/*
@@ -318,7 +318,7 @@
fb->scrlist[0] = &fb->wsd;
fb->wsl.nscreens = 1;
- fb->wsl.screens = (const struct wsscreen_descr **)fb->scrlist;
+ fb->wsl.screens = (void *)fb->scrlist;
waa.console = console;
waa.scrdata = &fb->wsl;
diff -r 1399dd658b1c -r 85e39c63d8b1 sys/arch/hp300/dev/dmareg.h
--- a/sys/arch/hp300/dev/dmareg.h Mon Mar 24 19:29:59 2014 +0000
+++ b/sys/arch/hp300/dev/dmareg.h Mon Mar 24 19:42:58 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dmareg.h,v 1.16 2006/07/19 17:21:23 tsutsui Exp $ */
+/* $NetBSD: dmareg.h,v 1.17 2014/03/24 19:42:58 christos Exp $ */
/*
* Copyright (c) 1982, 1990, 1993
@@ -108,7 +108,8 @@
#define DMA_CLEAR(dc) do { \
v_int dmaclr; \
dmaclr = (int)dc->dm_Bhwaddr->dmaB_addr; \
- } while (0);
+ __USE(dmaclr); \
+ } while (/*CONSTCOND*/0);
#define DMA_STAT(dc) dc->dm_Bhwaddr->dmaB_stat
#if defined(HP320)
diff -r 1399dd658b1c -r 85e39c63d8b1 sys/arch/hp300/dev/fhpib.c
--- a/sys/arch/hp300/dev/fhpib.c Mon Mar 24 19:29:59 2014 +0000
+++ b/sys/arch/hp300/dev/fhpib.c Mon Mar 24 19:42:58 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: fhpib.c,v 1.39 2008/04/28 20:23:19 martin Exp $ */
+/* $NetBSD: fhpib.c,v 1.40 2014/03/24 19:42:58 christos Exp $ */
/*-
* Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
@@ -65,7 +65,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: fhpib.c,v 1.39 2008/04/28 20:23:19 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fhpib.c,v 1.40 2014/03/24 19:42:58 christos Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -409,6 +409,7 @@
hd->hpib_cmd = sc->sc_cmd;
hd->hpib_ie = IDS_DMA(hs->sc_dq->dq_chan) |
((flags & DMAGO_WORD) ? IDS_WDMA : 0);
+ __USE(i);
return;
}
sc->sc_cmd = CT_REN | CT_8BIT | CT_FIFOSEL;
@@ -436,6 +437,7 @@
hd->hpib_cmd = sc->sc_cmd;
hd->hpib_ie = IDS_DMA(hs->sc_dq->dq_chan) | IDS_WRITE |
((flags & DMAGO_WORD) ? IDS_WDMA : 0);
+ __USE(i);
}
/*
diff -r 1399dd658b1c -r 85e39c63d8b1 sys/arch/hp300/dev/mt.c
--- a/sys/arch/hp300/dev/mt.c Mon Mar 24 19:29:59 2014 +0000
+++ b/sys/arch/hp300/dev/mt.c Mon Mar 24 19:42:58 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mt.c,v 1.51 2014/03/16 05:20:24 dholland Exp $ */
+/* $NetBSD: mt.c,v 1.52 2014/03/24 19:42:58 christos Exp $ */
/*-
* Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
@@ -60,7 +60,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mt.c,v 1.51 2014/03/16 05:20:24 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mt.c,v 1.52 2014/03/24 19:42:58 christos Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -189,7 +189,7 @@
{
struct mt_softc *sc = device_private(self);
struct hpibbus_attach_args *ha = aux;
- int unit, hpibno, slave;
+ int hpibno, slave;
sc->sc_dev = self;
if (mtident(sc, ha) == 0) {
@@ -197,7 +197,6 @@
return;
}
- unit = device_unit(self);
hpibno = device_unit(parent);
slave = ha->ha_slave;
diff -r 1399dd658b1c -r 85e39c63d8b1 sys/arch/hp300/dev/nhpib.c
--- a/sys/arch/hp300/dev/nhpib.c Mon Mar 24 19:29:59 2014 +0000
+++ b/sys/arch/hp300/dev/nhpib.c Mon Mar 24 19:42:58 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: nhpib.c,v 1.40 2008/04/28 20:23:19 martin Exp $ */
+/* $NetBSD: nhpib.c,v 1.41 2014/03/24 19:42:58 christos Exp $ */
/*-
* Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
@@ -65,7 +65,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nhpib.c,v 1.40 2008/04/28 20:23:19 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nhpib.c,v 1.41 2014/03/24 19:42:58 christos Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -508,14 +508,11 @@
int stat0;
int stat1;
-#ifdef lint
- if (stat1 = unit)
- return 1;
-#endif
if ((hd->hpib_ids & IDS_IR) == 0)
return 0;
stat0 = hd->hpib_mis;
stat1 = hd->hpib_lis;
+ __USE(stat1);
hq = TAILQ_FIRST(&hs->sc_queue);
diff -r 1399dd658b1c -r 85e39c63d8b1 sys/arch/hp300/dev/rd.c
--- a/sys/arch/hp300/dev/rd.c Mon Mar 24 19:29:59 2014 +0000
+++ b/sys/arch/hp300/dev/rd.c Mon Mar 24 19:42:58 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rd.c,v 1.94 2014/03/16 05:20:24 dholland Exp $ */
+/* $NetBSD: rd.c,v 1.95 2014/03/24 19:42:58 christos Exp $ */
/*-
* Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
@@ -72,7 +72,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rd.c,v 1.94 2014/03/16 05:20:24 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rd.c,v 1.95 2014/03/24 19:42:58 christos Exp $");
#include "opt_useleds.h"
@@ -768,7 +768,7 @@
{
struct rd_softc *sc = arg;
struct buf *bp = bufq_peek(sc->sc_tab);
- int part, ctlr, slave;
+ int ctlr, slave;
ctlr = device_unit(device_parent(sc->sc_dev));
slave = sc->sc_slave;
@@ -779,7 +779,6 @@
printf("rdstart(%s): bp %p, %c\n", device_xname(sc->sc_dev), bp,
(bp->b_flags & B_READ) ? 'R' : 'W');
#endif
- part = rdpart(bp->b_dev);
sc->sc_flags |= RDF_SEEK;
sc->sc_ioc.c_unit = C_SUNIT(sc->sc_punit);
sc->sc_ioc.c_volume = C_SVOL(0);
@@ -1257,7 +1256,7 @@
int sectoff; /* sector offset of partition */
int totwrt; /* total number of sectors left to write */
int nwrt; /* current number of sectors to write */
- int unit, part;
+ int part;
int ctlr, slave;
struct rd_softc *sc;
struct disklabel *lp;
@@ -1269,7 +1268,6 @@
rddoingadump = 1;
/* Decompose unit and partition. */
- unit = rdunit(dev);
part = rdpart(dev);
/* Make sure dump device is ok. */
diff -r 1399dd658b1c -r 85e39c63d8b1 sys/arch/hp300/hp300/autoconf.c
--- a/sys/arch/hp300/hp300/autoconf.c Mon Mar 24 19:29:59 2014 +0000
+++ b/sys/arch/hp300/hp300/autoconf.c Mon Mar 24 19:42:58 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: autoconf.c,v 1.103 2014/03/23 06:03:38 dholland Exp $ */
+/* $NetBSD: autoconf.c,v 1.104 2014/03/24 19:42:58 christos Exp $ */
/*-
* Copyright (c) 1996, 1997, 2002 The NetBSD Foundation, Inc.
@@ -88,7 +88,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.103 2014/03/23 06:03:38 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.104 2014/03/24 19:42:58 christos Exp $");
#include "dvbox.h"
#include "gbox.h"
@@ -300,7 +300,6 @@
cpu_rootconf(void)
{
struct dev_data *dd;
- device_t dv;
struct vfsops *vops;
/*
Home |
Main Index |
Thread Index |
Old Index