mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 00:33:55 -06:00
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:
parent
239c3f7ed4
commit
872b69f21f
1 changed files with 29 additions and 27 deletions
|
@ -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");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue