Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/sbus get rid of junk variable



details:   https://anonhg.NetBSD.org/src/rev/f4c54fe9021c
branches:  trunk
changeset: 791461:f4c54fe9021c
user:      macallan <macallan%NetBSD.org@localhost>
date:      Tue Nov 19 10:49:00 2013 +0000

description:
get rid of junk variable

diffstat:

 sys/dev/sbus/p9100.c |  18 ++++++++----------
 1 files changed, 8 insertions(+), 10 deletions(-)

diffs (74 lines):

diff -r 04abb5d03be7 -r f4c54fe9021c sys/dev/sbus/p9100.c
--- a/sys/dev/sbus/p9100.c      Tue Nov 19 10:07:11 2013 +0000
+++ b/sys/dev/sbus/p9100.c      Tue Nov 19 10:49:00 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: p9100.c,v 1.59 2012/10/27 17:18:37 chs Exp $ */
+/*     $NetBSD: p9100.c,v 1.60 2013/11/19 10:49:00 macallan Exp $ */
 
 /*-
  * Copyright (c) 1998, 2005, 2006 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: p9100.c,v 1.59 2012/10/27 17:18:37 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: p9100.c,v 1.60 2013/11/19 10:49:00 macallan Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -114,7 +114,6 @@
 #ifdef PNOZZ_USE_LATCH
        bus_space_handle_t sc_fb_memh;  /*   bus space handle */
 #endif
-       volatile uint32_t sc_junk;
        uint32_t        sc_mono_width;  /* for setup_mono */
 
        uint32_t        sc_width;
@@ -262,9 +261,8 @@
 
 #ifdef PNOZZ_USE_LATCH
 #define PNOZZ_LATCH(sc, off) if(sc->sc_last_offset != (off & 0xffffff80)) { \
-               sc->sc_junk = bus_space_read_4(sc->sc_bustag, sc->sc_fb_memh, \
-                   off); \
-               sc->sc_last_offset = off & 0xffffff80; }
+       (void)bus_space_read_4(sc->sc_bustag, sc->sc_fb_memh, off); \
+       sc->sc_last_offset = off & 0xffffff80; }
 #else
 #define PNOZZ_LATCH(a, b)
 #endif
@@ -791,7 +789,7 @@
        p9100_ctl_write_4(sc, ABS_XY2, dst << sc->sc_depthshift);
        p9100_ctl_write_4(sc, ABS_XY3, dstw << sc->sc_depthshift);
 
-       sc->sc_junk = p9100_ctl_read_4(sc, COMMAND_BLIT);
+       (void)p9100_ctl_read_4(sc, COMMAND_BLIT);
 }
 
 /* solid rectangle fill */
@@ -813,7 +811,7 @@
        p9100_ctl_write_4(sc, COORD_INDEX, 0);
        p9100_ctl_write_4(sc, RECT_RTW_XY, src);
        p9100_ctl_write_4(sc, RECT_RTW_XY, srcw);
-       sc->sc_junk = p9100_ctl_read_4(sc, COMMAND_QUAD);
+       (void)p9100_ctl_read_4(sc, COMMAND_QUAD);
 }
 
 /* setup for mono->colour expansion */
@@ -892,7 +890,7 @@
 p9100_ramdac_read(struct p9100_softc *sc, bus_size_t off)
 {
 
-       sc->sc_junk = p9100_ctl_read_4(sc, PWRUP_CNFG);
+       (void)p9100_ctl_read_4(sc, PWRUP_CNFG);
        return ((bus_space_read_4(sc->sc_bustag,
            sc->sc_ctl_memh, off) >> 16) & 0xff);
 }
@@ -901,7 +899,7 @@
 p9100_ramdac_write(struct p9100_softc *sc, bus_size_t off, uint8_t v)
 {
 
-       sc->sc_junk = p9100_ctl_read_4(sc, PWRUP_CNFG);
+       (void)p9100_ctl_read_4(sc, PWRUP_CNFG);
        bus_space_write_4(sc->sc_bustag, sc->sc_ctl_memh, off,
            ((uint32_t)v) << 16);
 }



Home | Main Index | Thread Index | Old Index