]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
acpi/ghes: Abort in acpi_ghes_memory_errors() if necessary
authorGavin Shan <gshan@redhat.com>
Mon, 1 Dec 2025 14:18:00 +0000 (00:18 +1000)
committerMichael S. Tsirkin <mst@redhat.com>
Thu, 5 Feb 2026 10:06:45 +0000 (05:06 -0500)
The function hw/acpi/ghes-stub.c::acpi_ghes_memory_errors() shouldn't
be called by any one. Take g_assert_not_reached() as a clearer indication.

Suggested-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Gavin Shan <gshan@redhat.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Message-Id: <20251201141803.2386129-3-gshan@redhat.com>

hw/acpi/ghes-stub.c

index 40f660c246fe2e26094c8dc9b0dcd0855237547d..b54f1b093c4acbdb89bc54b0b5cab8bdbf8becf8 100644 (file)
@@ -14,7 +14,7 @@
 int acpi_ghes_memory_errors(AcpiGhesState *ags, uint16_t source_id,
                             uint64_t physical_address)
 {
-    return -1;
+    g_assert_not_reached();
 }
 
 AcpiGhesState *acpi_ghes_get_state(void)