Re: [PATCH] hw/loongarch: remove acpi-build.c unused variable 'aml_len'
On 7/20/22 21:00, Song Gao wrote: @@ -413,7 +413,6 @@ static void acpi_build(AcpiBuildTables *tables, MachineState *machine) AcpiFadtData fadt_data; unsigned facs, rsdt, fadt, dsdt; uint8_t *u; -size_t aml_len = 0; ... @@ -451,7 +444,6 @@ static void acpi_build(AcpiBuildTables *tables, MachineState *machine) fadt_data.xdsdt_tbl_offset = build_fadt(tables_blob, tables->linker, _data, lams->oem_id, lams->oem_table_id); -aml_len += tables_blob->len - fadt; This in turn removes the last use of fadt. r~
Re: [PATCH] hw/loongarch: remove acpi-build.c unused variable 'aml_len'
On 7/20/22 21:00, Song Gao wrote: Fix a compiler warning on openbsd: ../src/hw/loongarch/acpi-build.c:416:12: warning: variable 'aml_len' set but not used [-Wunused-but-set-variable] size_t aml_len = 0; ^ Reported-by: Peter Maydell Signed-off-by: Song Gao --- hw/loongarch/acpi-build.c | 8 1 file changed, 8 deletions(-) Thanks, queued. r~
Re: [PATCH] hw/loongarch: remove acpi-build.c unused variable 'aml_len'
Ping for 7.1 On 2022/7/24 上午11:27, Richard Henderson wrote: On 7/21/22 09:30, Song Gao wrote: Fix a compiler warning on openbsd: ../src/hw/loongarch/acpi-build.c:416:12: warning: variable 'aml_len' set but not used [-Wunused-but-set-variable] size_t aml_len = 0; ^ Reported-by: Peter Maydell Signed-off-by: Song Gao --- Reviewed-by: Richard Henderson r~
Re: [PATCH] hw/loongarch: remove acpi-build.c unused variable 'aml_len'
On 7/21/22 09:30, Song Gao wrote: Fix a compiler warning on openbsd: ../src/hw/loongarch/acpi-build.c:416:12: warning: variable 'aml_len' set but not used [-Wunused-but-set-variable] size_t aml_len = 0; ^ Reported-by: Peter Maydell Signed-off-by: Song Gao --- Reviewed-by: Richard Henderson r~
[PATCH] hw/loongarch: remove acpi-build.c unused variable 'aml_len'
Fix a compiler warning on openbsd: ../src/hw/loongarch/acpi-build.c:416:12: warning: variable 'aml_len' set but not used [-Wunused-but-set-variable] size_t aml_len = 0; ^ Reported-by: Peter Maydell Signed-off-by: Song Gao --- hw/loongarch/acpi-build.c | 8 1 file changed, 8 deletions(-) diff --git a/hw/loongarch/acpi-build.c b/hw/loongarch/acpi-build.c index b95b83b079..f7f6fc9b8a 100644 --- a/hw/loongarch/acpi-build.c +++ b/hw/loongarch/acpi-build.c @@ -413,7 +413,6 @@ static void acpi_build(AcpiBuildTables *tables, MachineState *machine) AcpiFadtData fadt_data; unsigned facs, rsdt, fadt, dsdt; uint8_t *u; -size_t aml_len = 0; GArray *tables_blob = tables->table_data; init_common_fadt_data(_data); @@ -437,12 +436,6 @@ static void acpi_build(AcpiBuildTables *tables, MachineState *machine) dsdt = tables_blob->len; build_dsdt(tables_blob, tables->linker, machine); -/* - * Count the size of the DSDT, we will need it for - * legacy sizing of ACPI tables. - */ -aml_len += tables_blob->len - dsdt; - /* ACPI tables pointed to by RSDT */ fadt = tables_blob->len; acpi_add_table(table_offsets, tables_blob); @@ -451,7 +444,6 @@ static void acpi_build(AcpiBuildTables *tables, MachineState *machine) fadt_data.xdsdt_tbl_offset = build_fadt(tables_blob, tables->linker, _data, lams->oem_id, lams->oem_table_id); -aml_len += tables_blob->len - fadt; acpi_add_table(table_offsets, tables_blob); build_madt(tables_blob, tables->linker, lams); -- 2.31.1