twe(4): Remove a cast to a union (which is a GNU extension).
authorSascha Wildner <saw@online.de>
Sat, 17 Dec 2011 14:04:09 +0000 (15:04 +0100)
committerSascha Wildner <saw@online.de>
Sat, 17 Dec 2011 14:04:09 +0000 (15:04 +0100)
sys/dev/raid/twe/twe.c
sys/dev/raid/twe/twe_compat.h

index a80f463..9683684 100644 (file)
@@ -1138,7 +1138,7 @@ twe_done(struct twe_softc *sc)
 
        if (!(status_reg & TWE_STATUS_RESPONSE_QUEUE_EMPTY)) {
            found = 1;
-           rq = TWE_RESPONSE_QUEUE(sc);
+           rq.value = TWE_RESPONSE_QUEUE(sc);
            tr = sc->twe_lookup[rq.u.response_id];      /* find command */
            cmd = TWE_FIND_COMMAND(tr);
            if (tr->tr_status != TWE_CMD_BUSY)
@@ -1244,7 +1244,7 @@ twe_drain_response_queue(struct twe_softc *sc)
            return(1);
        if (status_reg & TWE_STATUS_RESPONSE_QUEUE_EMPTY)
            return(0);
-       rq = TWE_RESPONSE_QUEUE(sc);
+       rq.value = TWE_RESPONSE_QUEUE(sc);
     }
 }
 
index 69a7330..6ed0a20 100644 (file)
@@ -59,7 +59,7 @@
 #define TWE_CONTROL(sc, val)           bus_space_write_4((sc)->twe_btag, (sc)->twe_bhandle, 0x0, (u_int32_t)val)
 #define TWE_STATUS(sc)                 (u_int32_t)bus_space_read_4((sc)->twe_btag, (sc)->twe_bhandle, 0x4)
 #define TWE_COMMAND_QUEUE(sc, val)     bus_space_write_4((sc)->twe_btag, (sc)->twe_bhandle, 0x8, (u_int32_t)val)
-#define TWE_RESPONSE_QUEUE(sc)         (TWE_Response_Queue)bus_space_read_4((sc)->twe_btag, (sc)->twe_bhandle, 0xc)
+#define TWE_RESPONSE_QUEUE(sc)         bus_space_read_4((sc)->twe_btag, (sc)->twe_bhandle, 0xc)
 
 /*
  * FreeBSD-specific softc elements