ACK: [PATCH 04/12] acpi: acpidump: re-arrange code to avoid declarations after code

Alex Hung alex.hung at canonical.com
Tue Jun 10 17:46:58 UTC 2014


On 06/08/2014 09:42 AM, Colin King wrote:
> From: Colin Ian King <colin.king at canonical.com>
> 
> Signed-off-by: Colin Ian King <colin.king at canonical.com>
> ---
>  src/acpi/acpidump/acpidump.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/src/acpi/acpidump/acpidump.c b/src/acpi/acpidump/acpidump.c
> index 2781c5d..a5b96e1 100644
> --- a/src/acpi/acpidump/acpidump.c
> +++ b/src/acpi/acpidump/acpidump.c
> @@ -984,6 +984,7 @@ static void acpidump_mcfg(fwts_framework *fw, const fwts_acpi_table_info *table)
>  {
>  	fwts_acpi_table_mcfg *mcfg = (fwts_acpi_table_mcfg *)table->data;
>  	size_t i, n = table->length - sizeof(fwts_acpi_table_mcfg);
> +	fwts_acpi_mcfg_configuration *config = mcfg->configuration;
>  
>  	static const fwts_acpidump_field fields[] = {
>  		FIELD_UINT("Reserved", 	fwts_acpi_table_mcfg,	reserved),
> @@ -992,8 +993,6 @@ static void acpidump_mcfg(fwts_framework *fw, const fwts_acpi_table_info *table)
>  
>  	acpi_dump_table_fields(fw, table->data, fields, 0, table->length);
>  
> -	fwts_acpi_mcfg_configuration *config = mcfg->configuration;
> -
>  	for (i = 0; i < n / sizeof(fwts_acpi_mcfg_configuration); i++) {
>  		static const fwts_acpidump_field fields_config[] = {
>  			FIELD_UINT("  Base Address", 	fwts_acpi_mcfg_configuration,	base_address),
> @@ -1450,10 +1449,10 @@ static void acpidump_slic(fwts_framework *fw, const fwts_acpi_table_info *table)
>  	ptr += sizeof(fwts_acpi_table_header);
>  
>  	while (ptr < data + length) {
> -		fwts_log_nl(fw);
>  		fwts_acpi_table_slic_header *header =
>  			(fwts_acpi_table_slic_header *)ptr;
>  
> +		fwts_log_nl(fw);
>  		/*
>  		 *  Some machines such as the Acer Veritas have a SLIC header that
>  		 *  declares it's length as zero.  So to avoid spinning forever
> 

Acked-by: Alex Hung <alex.hung at canonical.com>



More information about the fwts-devel mailing list