mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Fix "set but not used" in twe.
This commit is contained in:
parent
fa911920b1
commit
b6ac753a88
1 changed files with 8 additions and 2 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue