acpi/ghes: simplify acpi_ghes_record_errors() code

Reduce the ident of the function and prepares it for
the next changes.

No functional changes.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Message-Id: <19af4188535217213486d169e0501e592bc78a95.1736945236.git.mchehab+huawei@kernel.org>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
Mauro Carvalho Chehab 2025-01-15 13:50:18 +01:00 committed by Michael S. Tsirkin
parent 239c3f7ed4
commit 872b69f21f

View file

@ -402,7 +402,9 @@ int acpi_ghes_record_errors(uint8_t source_id, uint64_t physical_address)
start_addr = le64_to_cpu(ags->ghes_addr_le); start_addr = le64_to_cpu(ags->ghes_addr_le);
if (physical_address) { if (!physical_address) {
return -1;
}
if (source_id < ACPI_GHES_ERROR_SOURCE_COUNT) { if (source_id < ACPI_GHES_ERROR_SOURCE_COUNT) {
start_addr += source_id * sizeof(uint64_t); start_addr += source_id * sizeof(uint64_t);
@ -434,7 +436,7 @@ int acpi_ghes_record_errors(uint8_t source_id, uint64_t physical_address)
ret = acpi_ghes_record_mem_error(error_block_addr, ret = acpi_ghes_record_mem_error(error_block_addr,
physical_address); physical_address);
} else } else {
error_report("can not find Generic Error Status Block"); error_report("can not find Generic Error Status Block");
} }