Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/mac68k Simplify
details: https://anonhg.NetBSD.org/src/rev/a41c4eefac28
branches: trunk
changeset: 790895:a41c4eefac28
user: martin <martin%NetBSD.org@localhost>
date: Fri Oct 25 21:42:30 2013 +0000
description:
Simplify
diffstat:
sys/arch/mac68k/dev/mac68k5380.c | 12 +++++-------
sys/arch/mac68k/dev/ncr5380.c | 9 +++------
sys/arch/mac68k/nubus/grf_nubus.c | 31 ++++++++++++-------------------
sys/arch/mac68k/obio/wdc_obio.c | 7 ++-----
4 files changed, 22 insertions(+), 37 deletions(-)
diffs (235 lines):
diff -r 8810af997794 -r a41c4eefac28 sys/arch/mac68k/dev/mac68k5380.c
--- a/sys/arch/mac68k/dev/mac68k5380.c Fri Oct 25 21:32:45 2013 +0000
+++ b/sys/arch/mac68k/dev/mac68k5380.c Fri Oct 25 21:42:30 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mac68k5380.c,v 1.48 2012/12/06 13:28:17 hauke Exp $ */
+/* $NetBSD: mac68k5380.c,v 1.49 2013/10/25 21:48:48 martin Exp $ */
/*
* Copyright (c) 1995 Allen Briggs
@@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mac68k5380.c,v 1.48 2012/12/06 13:28:17 hauke Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mac68k5380.c,v 1.49 2013/10/25 21:48:48 martin Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -147,9 +147,8 @@
static void
scsi_clr_ipend(void)
{
- int tmp;
- tmp = GET_5380_REG(NCR5380_IRCV);
+ GET_5380_REG(NCR5380_IRCV);
scsi_clear_irq();
}
@@ -357,7 +356,7 @@
register int count;
volatile u_int32_t *long_drq;
u_int32_t *long_data;
- volatile u_int8_t *drq, tmp_data;
+ volatile u_int8_t *drq;
u_int8_t *data;
#if DBG_PID
@@ -499,8 +498,7 @@
PID("write complete");
- drq = (volatile u_int8_t *) ncr_5380_with_drq;
- tmp_data = *drq;
+ (void)*((volatile u_int8_t *) ncr_5380_with_drq);
PID("read a byte to force a phase change");
}
diff -r 8810af997794 -r a41c4eefac28 sys/arch/mac68k/dev/ncr5380.c
--- a/sys/arch/mac68k/dev/ncr5380.c Fri Oct 25 21:32:45 2013 +0000
+++ b/sys/arch/mac68k/dev/ncr5380.c Fri Oct 25 21:42:30 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ncr5380.c,v 1.65 2012/10/27 17:17:59 chs Exp $ */
+/* $NetBSD: ncr5380.c,v 1.66 2013/10/25 21:48:48 martin Exp $ */
/*
* Copyright (c) 1995 Leo Weppelman.
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ncr5380.c,v 1.65 2012/10/27 17:17:59 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ncr5380.c,v 1.66 2013/10/25 21:48:48 martin Exp $");
/*
* Bit mask of targets you want debugging to be shown
@@ -262,7 +262,6 @@
void *arg)
{
struct scsipi_xfer *xs;
- struct scsipi_periph *periph;
struct ncr_softc *sc = device_private(chan->chan_adapter->adapt_dev);
int sps, flags;
SC_REQ *reqp, *link, *tmp;
@@ -271,7 +270,6 @@
case ADAPTER_REQ_RUN_XFER:
xs = arg;
flags = xs->xs_control;
- periph = xs->xs_periph;
/*
* We do not queue RESET commands
@@ -1629,7 +1627,6 @@
reach_msg_out(struct ncr_softc *sc, u_long len)
{
u_char phase;
- u_char data;
u_long n = len;
ncr_aprint(sc, "Trying to reach Message-out phase\n");
@@ -1648,7 +1645,7 @@
if (((GET_5380_REG(NCR5380_IDSTAT) >> 2) & 7) != phase)
break;
if (PH_IN(phase)) {
- data = GET_5380_REG(NCR5380_DATA);
+ GET_5380_REG(NCR5380_DATA);
SET_5380_REG(NCR5380_ICOM, SC_A_ACK | SC_A_ATN);
}
else {
diff -r 8810af997794 -r a41c4eefac28 sys/arch/mac68k/nubus/grf_nubus.c
--- a/sys/arch/mac68k/nubus/grf_nubus.c Fri Oct 25 21:32:45 2013 +0000
+++ b/sys/arch/mac68k/nubus/grf_nubus.c Fri Oct 25 21:42:30 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: grf_nubus.c,v 1.76 2012/10/27 17:17:59 chs Exp $ */
+/* $NetBSD: grf_nubus.c,v 1.77 2013/10/25 21:42:30 martin Exp $ */
/*
* Copyright (c) 1995 Allen Briggs. All rights reserved.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: grf_nubus.c,v 1.76 2012/10/27 17:17:59 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: grf_nubus.c,v 1.77 2013/10/25 21:42:30 martin Exp $");
#include <sys/param.h>
@@ -628,9 +628,8 @@
grfmv_intr_supermacgfx(void *vsc)
{
struct grfbus_softc *sc = (struct grfbus_softc *)vsc;
- u_int8_t dummy;
- dummy = bus_space_read_1(sc->sc_tag, sc->sc_handle, 0xE70D3);
+ bus_space_read_1(sc->sc_tag, sc->sc_handle, 0xE70D3);
}
/*
@@ -641,10 +640,9 @@
grfmv_intr_cmax(void *vsc)
{
struct grfbus_softc *sc = (struct grfbus_softc *)vsc;
- u_int32_t dummy;
- dummy = bus_space_read_4(sc->sc_tag, sc->sc_handle, 0xf501c);
- dummy = bus_space_read_4(sc->sc_tag, sc->sc_handle, 0xf5018);
+ bus_space_read_4(sc->sc_tag, sc->sc_handle, 0xf501c);
+ bus_space_read_4(sc->sc_tag, sc->sc_handle, 0xf5018);
}
/*
@@ -670,10 +668,9 @@
grfmv_intr_formac(void *vsc)
{
struct grfbus_softc *sc = (struct grfbus_softc *)vsc;
- u_int8_t dummy;
- dummy = bus_space_read_1(sc->sc_tag, sc->sc_handle, 0xde80db);
- dummy = bus_space_read_1(sc->sc_tag, sc->sc_handle, 0xde80d3);
+ bus_space_read_1(sc->sc_tag, sc->sc_handle, 0xde80db);
+ bus_space_read_1(sc->sc_tag, sc->sc_handle, 0xde80d3);
}
/*
@@ -697,9 +694,8 @@
grfmv_intr_gvimage(void *vsc)
{
struct grfbus_softc *sc = (struct grfbus_softc *)vsc;
- u_int8_t dummy;
- dummy = bus_space_read_1(sc->sc_tag, sc->sc_handle, 0xf00000);
+ bus_space_read_1(sc->sc_tag, sc->sc_handle, 0xf00000);
}
/*
@@ -710,9 +706,8 @@
grfmv_intr_radius_gsc(void *vsc)
{
struct grfbus_softc *sc = (struct grfbus_softc *)vsc;
- u_int8_t dummy;
- dummy = bus_space_read_1(sc->sc_tag, sc->sc_handle, 0xfb802);
+ bus_space_read_1(sc->sc_tag, sc->sc_handle, 0xfb802);
bus_space_write_1(sc->sc_tag, sc->sc_handle, 0xfb802, 0xff);
}
@@ -737,10 +732,9 @@
grfmv_intr_relax_200(void *vsc)
{
struct grfbus_softc *sc = (struct grfbus_softc *)vsc;
- unsigned long scratch;
/* The board ROM driver code has a tst.l here. */
- scratch = bus_space_read_4(sc->sc_tag, sc->sc_handle, 0x000D0040);
+ bus_space_read_4(sc->sc_tag, sc->sc_handle, 0x000D0040);
}
/*
@@ -764,9 +758,8 @@
grfmv_intr_viltro_340(void *vsc)
{
struct grfbus_softc *sc = (struct grfbus_softc *)vsc;
- u_int8_t scratch;
/* Yes, two read accesses to the same spot. */
- scratch = bus_space_read_1(sc->sc_tag, sc->sc_handle, 0x0500);
- scratch = bus_space_read_1(sc->sc_tag, sc->sc_handle, 0x0500);
+ bus_space_read_1(sc->sc_tag, sc->sc_handle, 0x0500);
+ bus_space_read_1(sc->sc_tag, sc->sc_handle, 0x0500);
}
diff -r 8810af997794 -r a41c4eefac28 sys/arch/mac68k/obio/wdc_obio.c
--- a/sys/arch/mac68k/obio/wdc_obio.c Fri Oct 25 21:32:45 2013 +0000
+++ b/sys/arch/mac68k/obio/wdc_obio.c Fri Oct 25 21:42:30 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: wdc_obio.c,v 1.26 2012/07/31 15:50:32 bouyer Exp $ */
+/* $NetBSD: wdc_obio.c,v 1.27 2013/10/25 21:50:28 martin Exp $ */
/*
* Copyright (c) 2002 Takeshi Shibagaki All rights reserved.
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: wdc_obio.c,v 1.26 2012/07/31 15:50:32 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wdc_obio.c,v 1.27 2013/10/25 21:50:28 martin Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -91,7 +91,6 @@
struct ata_channel ch;
struct wdc_softc wdc;
struct wdc_regs wdr;
- static int wdc_matched = 0;
int i, result = 0;
memset(&wdc, 0, sizeof(wdc));
@@ -132,8 +131,6 @@
bus_space_unmap(wdr.cmd_iot, wdr.cmd_baseioh, WDC_OBIO_REG_NPORTS);
- if (result)
- wdc_matched = 1;
return (result);
}
return 0;
Home |
Main Index |
Thread Index |
Old Index