[PATCH 05/12] hw/char/serial: Remove unhelpful comment

Bernhard Beschow posted 12 patches 1 month, 1 week ago
Maintainers: Paolo Bonzini <pbonzini@redhat.com>, Peter Maydell <peter.maydell@linaro.org>, "Cédric Le Goater" <clg@kaod.org>, Steven Lee <steven_lee@aspeedtech.com>, Troy Lee <leetroy@gmail.com>, Jamin Lin <jamin_lin@aspeedtech.com>, Andrew Jeffery <andrew@codeconstruct.com.au>, Joel Stanley <joel@jms.id.au>, Richard Henderson <richard.henderson@linaro.org>, Helge Deller <deller@gmx.de>, "Marc-André Lureau" <marcandre.lureau@redhat.com>, "Michael S. Tsirkin" <mst@redhat.com>
There is a newer version of this series
[PATCH 05/12] hw/char/serial: Remove unhelpful comment
Posted by Bernhard Beschow 1 month, 1 week ago
There is no "is_load" flag and one can tell from the method name what
the method does. Remove this unhelpful comment.

Signed-off-by: Bernhard Beschow <shentey@gmail.com>
---
 hw/char/serial.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/hw/char/serial.c b/hw/char/serial.c
index 2c558cb9fc..f73de1ae4f 100644
--- a/hw/char/serial.c
+++ b/hw/char/serial.c
@@ -281,9 +281,6 @@ static void serial_xmit(SerialState *s)
     s->lsr |= UART_LSR_TEMT;
 }
 
-/* Setter for FCR.
-   is_load flag means, that value is set while loading VM state
-   and interrupt should not be invoked */
 static void serial_write_fcr(SerialState *s, uint8_t val)
 {
     /* Set fcr - val only has the bits that are supposed to "stick" */
-- 
2.53.0
Re: [PATCH 05/12] hw/char/serial: Remove unhelpful comment
Posted by Peter Maydell 1 month, 1 week ago
On Mon, 2 Mar 2026 at 22:03, Bernhard Beschow <shentey@gmail.com> wrote:
>
> There is no "is_load" flag and one can tell from the method name what
> the method does. Remove this unhelpful comment.
>
> Signed-off-by: Bernhard Beschow <shentey@gmail.com>
> ---
>  hw/char/serial.c | 3 ---
>  1 file changed, 3 deletions(-)
>
> diff --git a/hw/char/serial.c b/hw/char/serial.c
> index 2c558cb9fc..f73de1ae4f 100644
> --- a/hw/char/serial.c
> +++ b/hw/char/serial.c
> @@ -281,9 +281,6 @@ static void serial_xmit(SerialState *s)
>      s->lsr |= UART_LSR_TEMT;
>  }
>
> -/* Setter for FCR.
> -   is_load flag means, that value is set while loading VM state
> -   and interrupt should not be invoked */
>  static void serial_write_fcr(SerialState *s, uint8_t val)
>  {
>      /* Set fcr - val only has the bits that are supposed to "stick" */

This must be an ancient stale comment from before the device
was converted to vmstate.

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

thanks
-- PMM
Re: [PATCH 05/12] hw/char/serial: Remove unhelpful comment
Posted by Bernhard Beschow 1 month, 1 week ago

Am 3. März 2026 11:27:18 UTC schrieb Peter Maydell <peter.maydell@linaro.org>:
>On Mon, 2 Mar 2026 at 22:03, Bernhard Beschow <shentey@gmail.com> wrote:
>>
>> There is no "is_load" flag and one can tell from the method name what
>> the method does. Remove this unhelpful comment.
>>
>> Signed-off-by: Bernhard Beschow <shentey@gmail.com>
>> ---
>>  hw/char/serial.c | 3 ---
>>  1 file changed, 3 deletions(-)
>>
>> diff --git a/hw/char/serial.c b/hw/char/serial.c
>> index 2c558cb9fc..f73de1ae4f 100644
>> --- a/hw/char/serial.c
>> +++ b/hw/char/serial.c
>> @@ -281,9 +281,6 @@ static void serial_xmit(SerialState *s)
>>      s->lsr |= UART_LSR_TEMT;
>>  }
>>
>> -/* Setter for FCR.
>> -   is_load flag means, that value is set while loading VM state
>> -   and interrupt should not be invoked */
>>  static void serial_write_fcr(SerialState *s, uint8_t val)
>>  {
>>      /* Set fcr - val only has the bits that are supposed to "stick" */
>
>This must be an ancient stale comment from before the device
>was converted to vmstate.

Yeah, "stale" seems like a better fit. Will change in v2.

Best regards,
Bernhard

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