All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Cédric Le Goater" <clg@kaod.org>
To: "Kenneth Jia(贾纪东_华硕上海)" <kenneth_jia@asus.com>,
	"'qemu-arm@nongnu.org'" <qemu-arm@nongnu.org>
Cc: "'Cédric Le Goater'" <clg@redhat.com>,
	"'Philippe Mathieu-Daudé'" <philmd@linaro.org>,
	"'Jamin Lin'" <jamin_lin@aspeedtech.com>,
	"'Andrew Jeffery'" <andrew@codeconstruct.com.au>,
	"'Gavin Shan'" <gshan@redhat.com>,
	"'open list:All patches CC here'" <qemu-devel@nongnu.org>
Subject: Re: [PATCH] hw/arm/aspeed: fix connect_serial_hds_to_uarts
Date: Fri, 13 Dec 2024 08:19:16 +0100	[thread overview]
Message-ID: <8af809d7-5fa2-471f-9fc9-eee482988894@kaod.org> (raw)
In-Reply-To: <5f9b0c53f1644922ba85522046e92f4c@asus.com>

Hello Kenneth,

On 12/12/24 14:31, Kenneth Jia(贾纪东_华硕上海) wrote:
>  From 24d3badbbb9dcc0d220609a7dd30f8da5002cba7 Mon Sep 17 00:00:00 2001
> 
> From: Kenneth Jia <kenneth_jia@asus.com>
> 
> Date: Thu, 12 Dec 2024 20:42:04 +0800
> 
> Subject: [PATCH]    hw/arm/aspeed: fix connect_serial_hds_to_uarts
> 
>     In the loop, we need ignore the index increase when uart == uart_chosen
> 
>     We should increase the index only after we allocate a serial.
> 
> Signed-off-by: Kenneth Jia <kenneth_jia@asus.com>

Could you please tell us a bit on your test environment ? I am interested
to know how you found the issue.

Also, please use "git send-email" to send patches.

Anyhow,

Fixes: d2b3eaefb4d7 ("aspeed: Refactor UART init for multi-SoC machines")
Reviewed-by: Cédric Le Goater <clg@redhat.com>

Thanks,

C.



> 
> ---
> 
> hw/arm/aspeed.c | 4 ++--
> 
> 1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/hw/arm/aspeed.c b/hw/arm/aspeed.c
> 
> index 556498f2a0..d8cb2d1429 100644
> 
> --- a/hw/arm/aspeed.c
> 
> +++ b/hw/arm/aspeed.c
> 
> @@ -364,11 +364,11 @@ static void connect_serial_hds_to_uarts(AspeedMachineState *bmc)
> 
>       int uart_chosen = bmc->uart_chosen ? bmc->uart_chosen : amc->uart_default;
> 
>       aspeed_soc_uart_set_chr(s, uart_chosen, serial_hd(0));
> 
> -    for (int i = 1, uart = sc->uarts_base; i < sc->uarts_num; i++, uart++) {
> 
> +    for (int i = 1, uart = sc->uarts_base; i < sc->uarts_num; uart++) {
> 
>           if (uart == uart_chosen) {
> 
>               continue;
> 
>           }
> 
> -        aspeed_soc_uart_set_chr(s, uart, serial_hd(i));
> 
> +        aspeed_soc_uart_set_chr(s, uart, serial_hd(i++));
> 
>       }
> 
> }
> 
> --
> 
> 2.34.1
> 


  reply	other threads:[~2024-12-13  7:20 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-12 13:31 [PATCH] hw/arm/aspeed: fix connect_serial_hds_to_uarts kenneth_jia--- via
2024-12-12 13:31 ` kenneth_jia--- via
2024-12-13  7:19 ` Cédric Le Goater [this message]
2024-12-13  9:48   ` 答复: " kenneth_jia--- via
2024-12-13  9:56     ` Cédric Le Goater
2024-12-13 10:11       ` 答复: " kenneth_jia--- via
2024-12-13 10:11         ` kenneth_jia--- via
2024-12-13 10:47 ` Cédric Le Goater

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8af809d7-5fa2-471f-9fc9-eee482988894@kaod.org \
    --to=clg@kaod.org \
    --cc=andrew@codeconstruct.com.au \
    --cc=clg@redhat.com \
    --cc=gshan@redhat.com \
    --cc=jamin_lin@aspeedtech.com \
    --cc=kenneth_jia@asus.com \
    --cc=philmd@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.