ACK: [PATCH] method: replace duplicated code by util function in _PRR test

Colin Ian King colin.king at canonical.com
Fri May 15 21:38:05 UTC 2020


On 15/05/2020 22:36, Alex Hung wrote:
> Signed-off-by: Alex Hung <alex.hung at canonical.com>
> ---
>  src/acpi/method/method.c | 7 +------
>  1 file changed, 1 insertion(+), 6 deletions(-)
> 
> diff --git a/src/acpi/method/method.c b/src/acpi/method/method.c
> index b7e9177c..11e230ea 100644
> --- a/src/acpi/method/method.c
> +++ b/src/acpi/method/method.c
> @@ -1609,13 +1609,8 @@ static void method_test_PRR_return(
>  	if (fwts_method_package_count_equal(fw, name, "_PRR", obj, 1) != FWTS_OK)
>  		return;
>  
> -	if (obj->Package.Elements[0].Type != ACPI_TYPE_LOCAL_REFERENCE) {
> -		fwts_failed(fw, LOG_LEVEL_MEDIUM,
> -			"Method_PRRElementType",
> -			"%s returned a package that does not contain "
> -			"a reference.", name);
> +	if (fwts_method_package_elements_all_type(fw, name, "_PRR", obj, ACPI_TYPE_LOCAL_REFERENCE) != FWTS_OK)
>  		return;
> -	}
>  
>  	fwts_method_passed_sane(fw, name, "package");
>  }
> 

Acked-by: Colin Ian King <colin.king at canonical.com>



More information about the fwts-devel mailing list