Appease gcc 4.8.

XXX should really use bus_space(9)
This commit is contained in:
skrll 2013-10-19 13:49:11 +00:00
parent 0148f33f56
commit 1e2bd251c8
5 changed files with 23 additions and 28 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: asp.c,v 1.22 2012/10/10 15:46:33 skrll Exp $ */
/* $NetBSD: asp.c,v 1.23 2013/10/19 13:49:11 skrll Exp $ */
/* $OpenBSD: asp.c,v 1.5 2000/02/09 05:04:22 mickey Exp $ */
@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: asp.c,v 1.22 2012/10/10 15:46:33 skrll Exp $");
__KERNEL_RCSID(0, "$NetBSD: asp.c,v 1.23 2013/10/19 13:49:11 skrll Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -189,7 +189,6 @@ aspattach(device_t parent, device_t self, void *aux)
struct gsc_attach_args ga;
struct cpu_info *ci = &cpus[0];
bus_space_handle_t ioh;
uint32_t irr;
int s;
sc->sc_dev = self;
@ -245,7 +244,7 @@ aspattach(device_t parent, device_t self, void *aux)
viper_setintrwnd(1 << ca->ca_irq);
sc->sc_trs->asp_imr = ~0;
irr = sc->sc_trs->asp_irr;
(void)sc->sc_trs->asp_irr;
sc->sc_trs->asp_imr = 0;
/* Establish the interrupt register. */

View File

@ -1,4 +1,4 @@
/* $NetBSD: dino.c,v 1.36 2012/05/23 16:11:37 skrll Exp $ */
/* $NetBSD: dino.c,v 1.37 2013/10/19 13:49:11 skrll Exp $ */
/* $OpenBSD: dino.c,v 1.5 2004/02/13 20:39:31 mickey Exp $ */
@ -29,7 +29,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: dino.c,v 1.36 2012/05/23 16:11:37 skrll Exp $");
__KERNEL_RCSID(0, "$NetBSD: dino.c,v 1.37 2013/10/19 13:49:11 skrll Exp $");
/* #include "cardbus.h" */
@ -356,7 +356,6 @@ dino_conf_write(void *v, pcitag_t tag, int reg, pcireg_t data)
{
struct dino_softc *sc = v;
volatile struct dino_regs *r = sc->sc_regs;
pcireg_t data1;
uint32_t pamr;
/* fix arbitration errata by disabling all pci devs on config read */
@ -368,7 +367,7 @@ dino_conf_write(void *v, pcitag_t tag, int reg, pcireg_t data)
/* fix coalescing config and io writes by interleaving w/ a read */
r->pci_addr = tag | PCI_ID_REG;
data1 = r->pci_conf_data;
(void)r->pci_conf_data;
/* restore arbitration */
r->pamr = pamr;
@ -1605,7 +1604,6 @@ dinoattach(device_t parent, device_t self, void *aux)
volatile struct dino_regs *r;
struct cpu_info *ci = &cpus[0];
const char *p = NULL;
u_int data;
int s, ver;
sc->sc_dv = self;
@ -1650,7 +1648,7 @@ dinoattach(device_t parent, device_t self, void *aux)
s = splhigh();
r->icr = 0;
r->imr = ~0;
data = r->irr0;
(void)r->irr0;
r->imr = 0;
r->iar0 = ci->ci_hpa | (31 - ca->ca_irq);
splx(s);

View File

@ -1,4 +1,4 @@
/* $NetBSD: elroy.c,v 1.13 2012/10/10 15:46:34 skrll Exp $ */
/* $NetBSD: elroy.c,v 1.14 2013/10/19 13:49:11 skrll Exp $ */
/* $OpenBSD: elroy.c,v 1.5 2009/03/30 21:24:57 kettenis Exp $ */
@ -254,7 +254,7 @@ elroy_conf_read(void *v, pcitag_t tag, int reg)
struct elroy_softc *sc = v;
volatile struct elroy_regs *r = sc->sc_regs;
uint32_t arb_mask, err_cfg, control;
pcireg_t data, data1;
pcireg_t data;
/* printf("elroy_conf_read(%p, 0x%08x, 0x%x)", v, tag, reg); */
arb_mask = elroy_read32(&r->arb_mask);
@ -268,7 +268,7 @@ elroy_conf_read(void *v, pcitag_t tag, int reg)
~htole32(ELROY_CONTROL_HF));
elroy_write32(&r->pci_conf_addr, htole32(tag | reg));
data1 = elroy_read32(&r->pci_conf_addr);
(void)elroy_read32(&r->pci_conf_addr);
data = elroy_read32(&r->pci_conf_data);
elroy_write32(&r->control, control |
@ -289,7 +289,6 @@ elroy_conf_write(void *v, pcitag_t tag, int reg, pcireg_t data)
struct elroy_softc *sc = v;
volatile struct elroy_regs *r = sc->sc_regs;
uint32_t arb_mask, err_cfg, control;
pcireg_t data1;
/* printf("elroy_conf_write(%p, 0x%08x, 0x%x, 0x%x)\n", v, tag, reg, data); */
arb_mask = elroy_read32(&r->arb_mask);
@ -304,13 +303,13 @@ elroy_conf_write(void *v, pcitag_t tag, int reg, pcireg_t data)
/* fix coalescing config writes errata by interleaving w/ a read */
elroy_write32(&r->pci_conf_addr, htole32(tag | PCI_ID_REG));
data1 = elroy_read32(&r->pci_conf_addr);
data1 = elroy_read32(&r->pci_conf_data);
(void)elroy_read32(&r->pci_conf_addr);
(void)elroy_read32(&r->pci_conf_data);
elroy_write32(&r->pci_conf_addr, htole32(tag | reg));
data1 = elroy_read32(&r->pci_conf_addr);
(void)elroy_read32(&r->pci_conf_addr);
elroy_write32(&r->pci_conf_data, htole32(data));
data1 = elroy_read32(&r->pci_conf_addr);
(void)elroy_read32(&r->pci_conf_addr);
elroy_write32(&r->control, control |
htole32(ELROY_CONTROL_CE|ELROY_CONTROL_CL));
@ -415,11 +414,10 @@ elroy_barrier(void *v, bus_space_handle_t h, bus_size_t o, bus_size_t l, int op)
{
struct elroy_softc *sc = v;
volatile struct elroy_regs *r = sc->sc_regs;
uint32_t data;
sync_caches();
if (op & BUS_SPACE_BARRIER_WRITE) {
data = r->pci_id; /* flush write fifo */
(void)r->pci_id; /* flush write fifo */
sync_caches();
}
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: lasi.c,v 1.23 2012/05/23 16:11:37 skrll Exp $ */
/* $NetBSD: lasi.c,v 1.24 2013/10/19 13:49:11 skrll Exp $ */
/* $OpenBSD: lasi.c,v 1.4 2001/06/09 03:57:19 mickey Exp $ */
@ -29,7 +29,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: lasi.c,v 1.23 2012/05/23 16:11:37 skrll Exp $");
__KERNEL_RCSID(0, "$NetBSD: lasi.c,v 1.24 2013/10/19 13:49:11 skrll Exp $");
#undef LASIDEBUG
@ -149,7 +149,7 @@ lasiattach(device_t parent, device_t self, void *aux)
struct gsc_attach_args ga;
struct cpu_info *ci = &cpus[0];
bus_space_handle_t ioh;
int s, in;
int s;
sc->sc_dev = self;
/*
@ -188,7 +188,7 @@ lasiattach(device_t parent, device_t self, void *aux)
sc->sc_trs->lasi_iar = ci->ci_hpa | (31 - ca->ca_irq);
sc->sc_trs->lasi_icr = 0;
sc->sc_trs->lasi_imr = ~0U;
in = sc->sc_trs->lasi_irr;
(void)sc->sc_trs->lasi_irr;
sc->sc_trs->lasi_imr = 0;
/* Establish the interrupt register. */

View File

@ -1,4 +1,4 @@
/* $NetBSD: wax.c,v 1.21 2012/10/10 15:46:34 skrll Exp $ */
/* $NetBSD: wax.c,v 1.22 2013/10/19 13:49:11 skrll Exp $ */
/* $OpenBSD: wax.c,v 1.1 1998/11/23 03:04:10 mickey Exp $ */
@ -29,7 +29,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: wax.c,v 1.21 2012/10/10 15:46:34 skrll Exp $");
__KERNEL_RCSID(0, "$NetBSD: wax.c,v 1.22 2013/10/19 13:49:11 skrll Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -112,7 +112,7 @@ waxattach(device_t parent, device_t self, void *aux)
struct gsc_attach_args ga;
struct cpu_info *ci = &cpus[0];
bus_space_handle_t ioh;
int s, in;
int s;
ca->ca_irq = hp700_intr_allocate_bit(&ci->ci_ir, ca->ca_irq);
if (ca->ca_irq == HP700CF_IRQ_UNDEF) {
@ -140,7 +140,7 @@ waxattach(device_t parent, device_t self, void *aux)
sc->sc_regs->wax_iar = ci->ci_hpa | (31 - ca->ca_irq);
sc->sc_regs->wax_icr = 0;
sc->sc_regs->wax_imr = ~0U;
in = sc->sc_regs->wax_irr;
(void)sc->sc_regs->wax_irr;
sc->sc_regs->wax_imr = 0;
splx(s);