The branch main has been updated by scottl:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=b6ac753a881be1a72bfbdb0d7ce0b22347eda458

commit b6ac753a881be1a72bfbdb0d7ce0b22347eda458
Author:     Scott Long <[email protected]>
AuthorDate: 2022-02-26 18:16:31 +0000
Commit:     Scott Long <[email protected]>
CommitDate: 2022-02-26 18:16:31 +0000

    Fix "set but not used" in twe.
---
 sys/dev/twe/twe.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/sys/dev/twe/twe.c b/sys/dev/twe/twe.c
index 389c4c4ac4c4..c20393fa72b3 100644
--- a/sys/dev/twe/twe.c
+++ b/sys/dev/twe/twe.c
@@ -1108,7 +1108,9 @@ int
 twe_start(struct twe_request *tr)
 {
     struct twe_softc   *sc = tr->tr_sc;
+#ifdef TWE_DEBUG
     TWE_Command                *cmd;
+#endif
     int                        i;
     u_int32_t          status_reg;
 
@@ -1119,7 +1121,9 @@ twe_start(struct twe_request *tr)
 
     /* mark the command as currently being processed */
     tr->tr_status = TWE_CMD_BUSY;
+#ifdef TWE_DEBUG
     cmd = TWE_FIND_COMMAND(tr);
+#endif
 
     /* 
      * Spin briefly waiting for the controller to come ready 
@@ -1170,7 +1174,9 @@ static void
 twe_done(struct twe_softc *sc, int startio)
 {
     TWE_Response_Queue rq;
+#ifdef TWE_DEBUG
     TWE_Command                *cmd;
+#endif
     struct twe_request *tr;
     int                        found;
     u_int32_t          status_reg;
@@ -1187,7 +1193,9 @@ twe_done(struct twe_softc *sc, int startio)
            found = 1;
            rq = TWE_RESPONSE_QUEUE(sc);
            tr = sc->twe_lookup[rq.u.response_id];      /* find command */
+#ifdef TWE_DEBUG
            cmd = TWE_FIND_COMMAND(tr);
+#endif
            if (tr->tr_status != TWE_CMD_BUSY)
                twe_printf(sc, "completion event for nonbusy command\n");
            tr->tr_status = TWE_CMD_COMPLETE;
@@ -1279,7 +1287,6 @@ twe_wait_status(struct twe_softc *sc, u_int32_t status, 
int timeout)
 static int
 twe_drain_response_queue(struct twe_softc *sc)
 {
-    TWE_Response_Queue rq;
     u_int32_t          status_reg;
 
     debug_called(4);
@@ -1290,7 +1297,6 @@ 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);
     }
 }
 

Reply via email to