diff mbox series

[PATCH-for-9.1,v2,03/11] hw/net/lan9118: Remove duplicated assignment

Message ID 20240409133801.23503-4-philmd@linaro.org
State New
Headers show
Series hw/net/lan9118: Fix overflow in TX FIFO | expand

Commit Message

Philippe Mathieu-Daudé April 9, 2024, 1:37 p.m. UTC
s->txp->fifo_used is zeroed in the next 3 lines.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 hw/net/lan9118.c | 1 -
 1 file changed, 1 deletion(-)

Comments

Peter Maydell April 9, 2024, 1:44 p.m. UTC | #1
On Tue, 9 Apr 2024 at 14:39, Philippe Mathieu-Daudé <philmd@linaro.org> wrote:
>
> s->txp->fifo_used is zeroed in the next 3 lines.
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
>  hw/net/lan9118.c | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/hw/net/lan9118.c b/hw/net/lan9118.c
> index 91d81b410b..d6f0e37eb1 100644
> --- a/hw/net/lan9118.c
> +++ b/hw/net/lan9118.c
> @@ -438,7 +438,6 @@ static void lan9118_reset(DeviceState *d)
>      s->hw_cfg = s->mode_16bit ? 0x00050000 : 0x00050004;
>      s->pmt_ctrl &= 0x45;
>      s->gpio_cfg = 0;
> -    s->txp->fifo_used = 0;
>      s->txp->state = TX_IDLE;
>      s->txp->cmd_a = 0xffffffffu;
>      s->txp->cmd_b = 0xffffffffu;

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>

thanks
-- PMM
diff mbox series

Patch

diff --git a/hw/net/lan9118.c b/hw/net/lan9118.c
index 91d81b410b..d6f0e37eb1 100644
--- a/hw/net/lan9118.c
+++ b/hw/net/lan9118.c
@@ -438,7 +438,6 @@  static void lan9118_reset(DeviceState *d)
     s->hw_cfg = s->mode_16bit ? 0x00050000 : 0x00050004;
     s->pmt_ctrl &= 0x45;
     s->gpio_cfg = 0;
-    s->txp->fifo_used = 0;
     s->txp->state = TX_IDLE;
     s->txp->cmd_a = 0xffffffffu;
     s->txp->cmd_b = 0xffffffffu;