Skip to contentSkip to conversation

acpi-build: Fix hint messages

PATCH In review Greg Kurz 2 participants 7 messages Jan 30, 2024

lore
Share & tools
lore

Greg Kurz

author
#0 lore raw

v2 cover acpi-build: Fix hint messages

ACPI build for ARM, i386 and Loongarch all have the same warning report with a hint for the user. The hint is printed with error_printf() as expected but it lacks the terminating '\n'.

v2:
- s/error_fprintf/error_printf in commit logs (Ani)

Greg Kurz (3):
hw/i386: Add \n to hint message hw/loongarch: Add \n to hint message hw/arm: Add \n to hint message

 hw/arm/virt-acpi-build.c  | 2 +-
 hw/i386/acpi-build.c      | 4 ++--
 hw/loongarch/acpi-build.c | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)
Signature · 1 line
2.43.0
author
#1 lore raw

PATCH v2 1/3 hw/i386: Add `\n` to hint message

error_printf() doesn't add newlines.

---
 hw/i386/acpi-build.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
hw/i386/acpi-build.c +2 -2
index edc979379c03..e990b0ae927f 100644
@@ -2697,7 +2697,7 @@ void acpi_build(AcpiBuildTables *tables, MachineState *machine)
                         " migration may not work",
                         tables_blob->len, legacy_table_size);
             error_printf("Try removing CPUs, NUMA nodes, memory slots"
-                         " or PCI bridges.");
+                         " or PCI bridges.\n");
         }
         g_array_set_size(tables_blob, legacy_table_size);
     } else {
@@ -2709,7 +2709,7 @@ void acpi_build(AcpiBuildTables *tables, MachineState *machine)
                         " migration may not work",
                         tables_blob->len, ACPI_BUILD_TABLE_SIZE / 2);
             error_printf("Try removing CPUs, NUMA nodes, memory slots"
-                         " or PCI bridges.");
+                         " or PCI bridges.\n");
         }
         acpi_align_size(tables_blob, ACPI_BUILD_TABLE_SIZE);
     }
Signature · 1 line
2.43.0
Reviewed-by on v2 1/3
#2 lore raw

Re: [PATCH v2 1/3] hw/i386: Add `\n` to hint message

Quoted 7 lines · Greg Kurz

error_printf() doesn't add newlines.

Quoted 29 lines

---
hw/i386/acpi-build.c | 4 ++--

1 file changed, 2 insertions(+), 2 deletions(-)
hw/i386/acpi-build.c +2 -2
index edc979379c03..e990b0ae927f 100644
@@ -2697,7 +2697,7 @@ void acpi_build(AcpiBuildTables *tables, MachineState *machine)
                        " migration may not work",
                        tables_blob->len, legacy_table_size);
            error_printf("Try removing CPUs, NUMA nodes, memory slots"
-                         " or PCI bridges.");
+                         " or PCI bridges.\n");
        }
        g_array_set_size(tables_blob, legacy_table_size);
    } else {
@@ -2709,7 +2709,7 @@ void acpi_build(AcpiBuildTables *tables, MachineState *machine)
                        " migration may not work",
                        tables_blob->len, ACPI_BUILD_TABLE_SIZE / 2);
            error_printf("Try removing CPUs, NUMA nodes, memory slots"
-                         " or PCI bridges.");
+                         " or PCI bridges.\n");
        }
        acpi_align_size(tables_blob, ACPI_BUILD_TABLE_SIZE);
    }
Signature · 1 line
2.43.0
author
#3 lore raw

PATCH v2 2/3 hw/loongarch: Add `\n` to hint message

In reply to Greg Kurz

error_printf() doesn't add newlines.

---
 hw/loongarch/acpi-build.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/loongarch/acpi-build.c +1 -1
index 730bc4a748c4..a1c419874123 100644
@@ -509,7 +509,7 @@ static void acpi_build(AcpiBuildTables *tables, MachineState *machine)
                     " migration may not work",
                     tables_blob->len, ACPI_BUILD_TABLE_SIZE / 2);
         error_printf("Try removing CPUs, NUMA nodes, memory slots"
-                     " or PCI bridges.");
+                     " or PCI bridges.\n");
     }
 
     acpi_align_size(tables->linker->cmd_blob, ACPI_BUILD_ALIGN_SIZE);
Signature · 1 line
2.43.0
Reviewed-by on v2 2/3
#4 lore raw

Re: [PATCH v2 2/3] hw/loongarch: Add `\n` to hint message

Quoted 7 lines · Greg Kurz

error_printf() doesn't add newlines.

Quoted 20 lines

---
hw/loongarch/acpi-build.c | 2 +-

1 file changed, 1 insertion(+), 1 deletion(-)
hw/loongarch/acpi-build.c +1 -1
index 730bc4a748c4..a1c419874123 100644
@@ -509,7 +509,7 @@ static void acpi_build(AcpiBuildTables *tables, MachineState *machine)
                    " migration may not work",
                    tables_blob->len, ACPI_BUILD_TABLE_SIZE / 2);
        error_printf("Try removing CPUs, NUMA nodes, memory slots"
-                     " or PCI bridges.");
+                     " or PCI bridges.\n");
    }
 
    acpi_align_size(tables->linker->cmd_blob, ACPI_BUILD_ALIGN_SIZE);
Signature · 1 line
2.43.0
author
#5 lore raw

PATCH v2 3/3 hw/arm: Add `\n` to hint message

In reply to Greg Kurz

error_printf() doesn't add newlines.

---
 hw/arm/virt-acpi-build.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/arm/virt-acpi-build.c +1 -1
index 17aeec7a6f56..48febde1ccd1 100644
@@ -1008,7 +1008,7 @@ void virt_acpi_build(VirtMachineState *vms, AcpiBuildTables *tables)
                     " migration may not work",
                     tables_blob->len, ACPI_BUILD_TABLE_SIZE / 2);
         error_printf("Try removing CPUs, NUMA nodes, memory slots"
-                     " or PCI bridges.");
+                     " or PCI bridges.\n");
     }
     acpi_align_size(tables_blob, ACPI_BUILD_TABLE_SIZE);
 
Signature · 1 line
2.43.0
Reviewed-by on v2 3/3
#6 lore raw

Re: [PATCH v2 3/3] hw/arm: Add `\n` to hint message

Quoted 7 lines · Greg Kurz

error_printf() doesn't add newlines.

Quoted 20 lines

---
hw/arm/virt-acpi-build.c | 2 +-

1 file changed, 1 insertion(+), 1 deletion(-)
hw/arm/virt-acpi-build.c +1 -1
index 17aeec7a6f56..48febde1ccd1 100644
@@ -1008,7 +1008,7 @@ void virt_acpi_build(VirtMachineState *vms, AcpiBuildTables *tables)
                    " migration may not work",
                    tables_blob->len, ACPI_BUILD_TABLE_SIZE / 2);
        error_printf("Try removing CPUs, NUMA nodes, memory slots"
-                     " or PCI bridges.");
+                     " or PCI bridges.\n");
    }
    acpi_align_size(tables_blob, ACPI_BUILD_TABLE_SIZE);
 
Signature · 1 line
2.43.0