mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-09-02 06:51:53 -06:00
esp.c: remove redundant n variable in PDMA COMMAND phase
This variable can be replaced by the existing len variable. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Tested-by: Helge Deller <deller@gmx.de> Tested-by: Thomas Huth <thuth@redhat.com> Message-Id: <20240112125420.514425-82-mark.cave-ayland@ilande.co.uk> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
This commit is contained in:
parent
67ea170ee4
commit
406e8a3e92
1 changed files with 3 additions and 5 deletions
|
@ -427,7 +427,6 @@ static void esp_do_dma(ESPState *s)
|
||||||
{
|
{
|
||||||
uint32_t len, cmdlen;
|
uint32_t len, cmdlen;
|
||||||
uint8_t buf[ESP_CMDFIFO_SZ];
|
uint8_t buf[ESP_CMDFIFO_SZ];
|
||||||
int n;
|
|
||||||
|
|
||||||
len = esp_get_tc(s);
|
len = esp_get_tc(s);
|
||||||
|
|
||||||
|
@ -494,10 +493,9 @@ static void esp_do_dma(ESPState *s)
|
||||||
fifo8_push_all(&s->cmdfifo, buf, len);
|
fifo8_push_all(&s->cmdfifo, buf, len);
|
||||||
esp_set_tc(s, esp_get_tc(s) - len);
|
esp_set_tc(s, esp_get_tc(s) - len);
|
||||||
} else {
|
} else {
|
||||||
n = esp_fifo_pop_buf(&s->fifo, buf, fifo8_num_used(&s->fifo));
|
len = esp_fifo_pop_buf(&s->fifo, buf, fifo8_num_used(&s->fifo));
|
||||||
n = MIN(fifo8_num_free(&s->cmdfifo), n);
|
len = MIN(fifo8_num_free(&s->cmdfifo), len);
|
||||||
fifo8_push_all(&s->cmdfifo, buf, n);
|
fifo8_push_all(&s->cmdfifo, buf, len);
|
||||||
|
|
||||||
esp_raise_drq(s);
|
esp_raise_drq(s);
|
||||||
}
|
}
|
||||||
trace_esp_handle_ti_cmd(cmdlen);
|
trace_esp_handle_ti_cmd(cmdlen);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue