[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] hw/core/machine: Add the missing delimiter in cpu_slot_to_st

From: Laurent Vivier
Subject: Re: [PATCH] hw/core/machine: Add the missing delimiter in cpu_slot_to_string()
Date: Tue, 26 Oct 2021 15:08:09 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.2.0

Le 26/10/2021 à 14:55, wangyanan (Y) a écrit :

On 2021/10/19 16:23, Laurent Vivier wrote:
Le 08/10/2021 à 09:50, Yanan Wang a écrit :
The expected output string from cpu_slot_to_string() ought to be
like "socket-id: *, die-id: *, core-id: *, thread-id: *", so add
the missing ", " before "die-id". This affects the readability
of the error message.

Fixes: 176d2cda0d ("i386/cpu: Consolidate die-id validity in smp context")
Signed-off-by: Yanan Wang <wangyanan55@huawei.com>
  hw/core/machine.c | 3 +++
  1 file changed, 3 insertions(+)

diff --git a/hw/core/machine.c b/hw/core/machine.c
index b8d95eec32..0a23ae3106 100644
--- a/hw/core/machine.c
+++ b/hw/core/machine.c
@@ -1157,6 +1157,9 @@ static char *cpu_slot_to_string(const CPUArchId *cpu)
          g_string_append_printf(s, "socket-id: %"PRId64, cpu->props.socket_id);
      if (cpu->props.has_die_id) {
+        if (s->len) {
+            g_string_append_printf(s, ", ");
+        }
          g_string_append_printf(s, "die-id: %"PRId64, cpu->props.die_id);
      if (cpu->props.has_core_id) {

Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Thanks! Will you take this one in the trivial branch ?

yes, sorry, I missed that one in my last collect. Thank you for the heads-up.

Applied to my trivial-patches branch.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]