ACK: [PATCH] acpi: dbg2: fix incorrect address size check with GAS struct

Colin Ian King colin.king at canonical.com
Wed Mar 30 09:56:09 UTC 2016


On 30/03/16 10:52, Alex Hung wrote:
> DBG2 spec defines AddressSize[] to be "Array of address sizes
> corresponding to each generic address above", and this should
> be the size pointed by GAS's address field
> 
> Signed-off-by: Alex Hung <alex.hung at canonical.com>
> ---
>  src/acpi/dbg2/dbg2.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/src/acpi/dbg2/dbg2.c b/src/acpi/dbg2/dbg2.c
> index 610e32c..e19b372 100644
> --- a/src/acpi/dbg2/dbg2.c
> +++ b/src/acpi/dbg2/dbg2.c
> @@ -358,12 +358,11 @@ static int dbg2_test1(fwts_framework *fw)
>  				fwts_log_info_verbatum(fw, "    Address                 0x%16.16" PRIx64, gas->address);
>  				fwts_log_nl(fw);
>  
> -				if (*addrsize != sizeof(fwts_acpi_gas)) {
> +				if (*addrsize == 0) {
>  					passed = false;
>  					fwts_failed(fw, LOG_LEVEL_HIGH,
>  						"DBG2InvalidAddressSize",
> -						"DBG2 Address Size is not the size of a "
> -						"Generic Address Structure");
> +						"DBG2 Address Size is 0");
>  				}
>  
>  				if (gas->register_bit_width == 0) {
> 
Acked-by: Colin Ian King <colin.king at canonical.com>



More information about the fwts-devel mailing list