Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/hp700/dev Appease gcc 4.8.



details:   https://anonhg.NetBSD.org/src/rev/b891faad16bf
branches:  trunk
changeset: 790680:b891faad16bf
user:      skrll <skrll%NetBSD.org@localhost>
date:      Sat Oct 19 13:49:11 2013 +0000

description:
Appease gcc 4.8.

XXX should really use bus_space(9)

diffstat:

 sys/arch/hp700/dev/asp.c   |   7 +++----
 sys/arch/hp700/dev/dino.c  |  10 ++++------
 sys/arch/hp700/dev/elroy.c |  18 ++++++++----------
 sys/arch/hp700/dev/lasi.c  |   8 ++++----
 sys/arch/hp700/dev/wax.c   |   8 ++++----
 5 files changed, 23 insertions(+), 28 deletions(-)

diffs (225 lines):

diff -r 74449064bc50 -r b891faad16bf sys/arch/hp700/dev/asp.c
--- a/sys/arch/hp700/dev/asp.c  Sat Oct 19 13:42:10 2013 +0000
+++ b/sys/arch/hp700/dev/asp.c  Sat Oct 19 13:49:11 2013 +0000
@@ -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 @@
        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 @@
        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. */
diff -r 74449064bc50 -r b891faad16bf sys/arch/hp700/dev/dino.c
--- a/sys/arch/hp700/dev/dino.c Sat Oct 19 13:42:10 2013 +0000
+++ b/sys/arch/hp700/dev/dino.c Sat Oct 19 13:49:11 2013 +0000
@@ -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 @@
 {
        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 @@
 
        /* 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 @@
        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 @@
        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);
diff -r 74449064bc50 -r b891faad16bf sys/arch/hp700/dev/elroy.c
--- a/sys/arch/hp700/dev/elroy.c        Sat Oct 19 13:42:10 2013 +0000
+++ b/sys/arch/hp700/dev/elroy.c        Sat Oct 19 13:49:11 2013 +0000
@@ -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 @@
        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 @@
            ~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 @@
        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 @@
 
        /* 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 @@
 {
        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();
        }
 }
diff -r 74449064bc50 -r b891faad16bf sys/arch/hp700/dev/lasi.c
--- a/sys/arch/hp700/dev/lasi.c Sat Oct 19 13:42:10 2013 +0000
+++ b/sys/arch/hp700/dev/lasi.c Sat Oct 19 13:49:11 2013 +0000
@@ -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 @@
        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 @@
        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. */
diff -r 74449064bc50 -r b891faad16bf sys/arch/hp700/dev/wax.c
--- a/sys/arch/hp700/dev/wax.c  Sat Oct 19 13:42:10 2013 +0000
+++ b/sys/arch/hp700/dev/wax.c  Sat Oct 19 13:49:11 2013 +0000
@@ -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 @@
        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 @@
        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);
 



Home | Main Index | Thread Index | Old Index