ACK: [PATCH 6/9] lib: fwts_acpi_tables: remove dead store to facs
ivanhu
ivan.hu at canonical.com
Wed Dec 16 06:48:50 UTC 2015
On 2015年12月16日 08:51, Colin King wrote:
> From: Colin Ian King <colin.king at canonical.com>
>
> Static analysis from clang scan-build identified a dead
> store to face when table is non-null. Remove this statement
> and re-organise the code a little to move the scope of facs.
>
> Signed-off-by: Colin Ian King <colin.king at canonical.com>
> ---
> src/lib/src/fwts_acpi_tables.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/src/lib/src/fwts_acpi_tables.c b/src/lib/src/fwts_acpi_tables.c
> index 0a1af13..573a8af 100644
> --- a/src/lib/src/fwts_acpi_tables.c
> +++ b/src/lib/src/fwts_acpi_tables.c
> @@ -919,7 +919,6 @@ static int fwts_acpi_load_tables_fixup(fwts_framework *fw)
> fwts_acpi_table_rsdt *rsdt = NULL;
> fwts_acpi_table_xsdt *xsdt = NULL;
> fwts_acpi_table_fadt *fadt = NULL;
> - fwts_acpi_table_facs *facs = NULL;
> uint64_t rsdt_fake_addr = 0, xsdt_fake_addr = 0;
> bool redo_rsdp_checksum = false;
>
> @@ -941,9 +940,8 @@ static int fwts_acpi_load_tables_fixup(fwts_framework *fw)
> fwts_log_error(fw, "ACPI table find failure.");
> return FWTS_ERROR;
> }
> - if (table)
> - facs = (fwts_acpi_table_facs *)table->data;
> - else {
> + if (!table) {
> + fwts_acpi_table_facs *facs;
> size_t size = 64;
> uint64_t facs_addr;
>
>
Acked-by: Ivan Hu <ivan.hu at canonical.com>
More information about the fwts-devel
mailing list