[PATCH v3 4/4] hw/char: sifive_uart: Remove ip variable

frank.chang@sifive.com posted 4 patches 3 weeks, 5 days ago
Maintainers: Alistair Francis <Alistair.Francis@wdc.com>, Palmer Dabbelt <palmer@dabbelt.com>, "Marc-André Lureau" <marcandre.lureau@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>
[PATCH v3 4/4] hw/char: sifive_uart: Remove ip variable
Posted by frank.chang@sifive.com 3 weeks, 5 days ago
From: Frank Chang <frank.chang@sifive.com>

The ip variable is no longer used in the code. Remove it from the
codebase.

Signed-off-by: Frank Chang <frank.chang@sifive.com>
---
 hw/char/sifive_uart.c         | 6 ++----
 include/hw/char/sifive_uart.h | 1 -
 2 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/hw/char/sifive_uart.c b/hw/char/sifive_uart.c
index f255cca960d..4c30fbf5685 100644
--- a/hw/char/sifive_uart.c
+++ b/hw/char/sifive_uart.c
@@ -285,7 +285,6 @@ static void sifive_uart_reset_enter(Object *obj, ResetType type)
 
     s->txfifo = 0;
     s->ie = 0;
-    s->ip = 0;
     s->txctrl = 0;
     s->rxctrl = 0;
     s->div = 0;
@@ -343,14 +342,13 @@ static void sifive_uart_reset_hold(Object *obj, ResetType type)
 
 static const VMStateDescription vmstate_sifive_uart = {
     .name = TYPE_SIFIVE_UART,
-    .version_id = 2,
-    .minimum_version_id = 2,
+    .version_id = 3,
+    .minimum_version_id = 3,
     .fields = (const VMStateField[]) {
         VMSTATE_UINT8_ARRAY(rx_fifo, SiFiveUARTState,
                             SIFIVE_UART_RX_FIFO_SIZE),
         VMSTATE_UINT8(rx_fifo_len, SiFiveUARTState),
         VMSTATE_UINT32(ie, SiFiveUARTState),
-        VMSTATE_UINT32(ip, SiFiveUARTState),
         VMSTATE_UINT32(txctrl, SiFiveUARTState),
         VMSTATE_UINT32(rxctrl, SiFiveUARTState),
         VMSTATE_UINT32(div, SiFiveUARTState),
diff --git a/include/hw/char/sifive_uart.h b/include/hw/char/sifive_uart.h
index c78d9bd1fc6..5f3b1327de0 100644
--- a/include/hw/char/sifive_uart.h
+++ b/include/hw/char/sifive_uart.h
@@ -73,7 +73,6 @@ struct SiFiveUARTState {
 
     uint32_t txfifo;
     uint32_t ie;
-    uint32_t ip;
     uint32_t txctrl;
     uint32_t rxctrl;
     uint32_t div;
-- 
2.43.0
Re: [PATCH v3 4/4] hw/char: sifive_uart: Remove ip variable
Posted by Chao Liu 3 weeks, 3 days ago
On Thu, Mar 12, 2026 at 11:32:01AM +0800, frank.chang@sifive.com wrote:
> From: Frank Chang <frank.chang@sifive.com>
> 
> The ip variable is no longer used in the code. Remove it from the
> codebase.
> 
> Signed-off-by: Frank Chang <frank.chang@sifive.com>
Reviewed-by: Chao Liu <chao.liu.zevorn@gmail.com>

Thanks,
Chao
> ---
>  hw/char/sifive_uart.c         | 6 ++----
>  include/hw/char/sifive_uart.h | 1 -
>  2 files changed, 2 insertions(+), 5 deletions(-)
> 
> diff --git a/hw/char/sifive_uart.c b/hw/char/sifive_uart.c
> index f255cca960d..4c30fbf5685 100644
> --- a/hw/char/sifive_uart.c
> +++ b/hw/char/sifive_uart.c
> @@ -285,7 +285,6 @@ static void sifive_uart_reset_enter(Object *obj, ResetType type)
>  
>      s->txfifo = 0;
>      s->ie = 0;
> -    s->ip = 0;
>      s->txctrl = 0;
>      s->rxctrl = 0;
>      s->div = 0;
> @@ -343,14 +342,13 @@ static void sifive_uart_reset_hold(Object *obj, ResetType type)
>  
>  static const VMStateDescription vmstate_sifive_uart = {
>      .name = TYPE_SIFIVE_UART,
> -    .version_id = 2,
> -    .minimum_version_id = 2,
> +    .version_id = 3,
> +    .minimum_version_id = 3,
>      .fields = (const VMStateField[]) {
>          VMSTATE_UINT8_ARRAY(rx_fifo, SiFiveUARTState,
>                              SIFIVE_UART_RX_FIFO_SIZE),
>          VMSTATE_UINT8(rx_fifo_len, SiFiveUARTState),
>          VMSTATE_UINT32(ie, SiFiveUARTState),
> -        VMSTATE_UINT32(ip, SiFiveUARTState),
>          VMSTATE_UINT32(txctrl, SiFiveUARTState),
>          VMSTATE_UINT32(rxctrl, SiFiveUARTState),
>          VMSTATE_UINT32(div, SiFiveUARTState),
> diff --git a/include/hw/char/sifive_uart.h b/include/hw/char/sifive_uart.h
> index c78d9bd1fc6..5f3b1327de0 100644
> --- a/include/hw/char/sifive_uart.h
> +++ b/include/hw/char/sifive_uart.h
> @@ -73,7 +73,6 @@ struct SiFiveUARTState {
>  
>      uint32_t txfifo;
>      uint32_t ie;
> -    uint32_t ip;
>      uint32_t txctrl;
>      uint32_t rxctrl;
>      uint32_t div;
> -- 
> 2.43.0
> 
>
Re: [PATCH v3 4/4] hw/char: sifive_uart: Remove ip variable
Posted by Alistair Francis 3 weeks, 4 days ago
On Thu, Mar 12, 2026 at 1:33 PM <frank.chang@sifive.com> wrote:
>
> From: Frank Chang <frank.chang@sifive.com>
>
> The ip variable is no longer used in the code. Remove it from the
> codebase.
>
> Signed-off-by: Frank Chang <frank.chang@sifive.com>

Reviewed-by: Alistair Francis <alistair.francis@wdc.com>

Alistair

> ---
>  hw/char/sifive_uart.c         | 6 ++----
>  include/hw/char/sifive_uart.h | 1 -
>  2 files changed, 2 insertions(+), 5 deletions(-)
>
> diff --git a/hw/char/sifive_uart.c b/hw/char/sifive_uart.c
> index f255cca960d..4c30fbf5685 100644
> --- a/hw/char/sifive_uart.c
> +++ b/hw/char/sifive_uart.c
> @@ -285,7 +285,6 @@ static void sifive_uart_reset_enter(Object *obj, ResetType type)
>
>      s->txfifo = 0;
>      s->ie = 0;
> -    s->ip = 0;
>      s->txctrl = 0;
>      s->rxctrl = 0;
>      s->div = 0;
> @@ -343,14 +342,13 @@ static void sifive_uart_reset_hold(Object *obj, ResetType type)
>
>  static const VMStateDescription vmstate_sifive_uart = {
>      .name = TYPE_SIFIVE_UART,
> -    .version_id = 2,
> -    .minimum_version_id = 2,
> +    .version_id = 3,
> +    .minimum_version_id = 3,
>      .fields = (const VMStateField[]) {
>          VMSTATE_UINT8_ARRAY(rx_fifo, SiFiveUARTState,
>                              SIFIVE_UART_RX_FIFO_SIZE),
>          VMSTATE_UINT8(rx_fifo_len, SiFiveUARTState),
>          VMSTATE_UINT32(ie, SiFiveUARTState),
> -        VMSTATE_UINT32(ip, SiFiveUARTState),
>          VMSTATE_UINT32(txctrl, SiFiveUARTState),
>          VMSTATE_UINT32(rxctrl, SiFiveUARTState),
>          VMSTATE_UINT32(div, SiFiveUARTState),
> diff --git a/include/hw/char/sifive_uart.h b/include/hw/char/sifive_uart.h
> index c78d9bd1fc6..5f3b1327de0 100644
> --- a/include/hw/char/sifive_uart.h
> +++ b/include/hw/char/sifive_uart.h
> @@ -73,7 +73,6 @@ struct SiFiveUARTState {
>
>      uint32_t txfifo;
>      uint32_t ie;
> -    uint32_t ip;
>      uint32_t txctrl;
>      uint32_t rxctrl;
>      uint32_t div;
> --
> 2.43.0
>
>