Skip to contentSkip to conversation

acpi-build: Fix hint messages

PATCH Superseded Greg Kurz 2 participants 6 messages Jan 30, 2024

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Greg Kurz

author
#0 lore raw

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'.

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 1/3 hw/i386: Add `\n` to hint message

error_fprintf() 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
#2 lore raw

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

Quoted 5 lines · Greg Kurz

error_fprintf() doesn't add newlines.

^^^^^^^^^^^^^^^^^

Should be error_printf(). Ditto for other patches.

Quoted 31 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

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

Quoted 10 lines · On Tue, 30 Jan 2024 21:43:27 +0530 Ani Sinha <[email protected]> wrote:
Quoted 5 lines · Greg Kurz

error_fprintf() doesn't add newlines.

^^^^^^^^^^^^^^^^^

Should be error_printf(). Ditto for other patches.

Thanks. Posted a v2.

Quoted 32 lines
Quoted 31 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
Signature · 1 line
Greg
author
#4 lore raw

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

In reply to Greg Kurz

error_fprintf() 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
author
#5 lore raw

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

In reply to Greg Kurz

error_fprintf() 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