ACK: [PATCH 4/7] acpi: method: remove redundant count_equal checks in _CPC test

ivanhu ivan.hu at canonical.com
Mon Jan 25 03:18:22 UTC 2021



On 1/23/21 10:12 AM, Alex Hung wrote:
> fwts_method_package_count_equal includes it already.
> 
> Signed-off-by: Alex Hung <alex.hung at canonical.com>
> ---
>  src/acpi/method/method.c | 11 -----------
>  1 file changed, 11 deletions(-)
> 
> diff --git a/src/acpi/method/method.c b/src/acpi/method/method.c
> index 8bc25396..61204f92 100644
> --- a/src/acpi/method/method.c
> +++ b/src/acpi/method/method.c
> @@ -1783,25 +1783,14 @@ static void method_test_CPC_return(
>  	revision = obj->Package.Elements[1].Integer.Value;
>  
>  	if (revision == 1) {		// acpi 5.0
> -		/* Something is really wrong if we don't have any elements in _CPC */
> -		if (fwts_method_package_count_equal(fw, name, obj, 17) != FWTS_OK)
> -			return;
> -
>  		/* For now, just check types */
>  		if (fwts_method_package_elements_type(fw, name, obj, elementsv1) != FWTS_OK)
>  			return;
>  	} else if (revision == 2) {	// acpi 5.1 ~ acpi 6.1a
> -		/* Something is really wrong if we don't have any elements in _CPC */
> -		if (fwts_method_package_count_equal(fw, name, obj, 21) != FWTS_OK)
> -			return;
> -
>  		/* For now, just check types */
>  		if (fwts_method_package_elements_type(fw, name, obj, elementsv2) != FWTS_OK)
>  			return;
>  	} else if (revision == 3) {	// acpi 6.2 and later
> -		if (fwts_method_package_count_equal(fw, name, obj, 23) != FWTS_OK)
> -			return;
> -
>  		/* For now, just check types */
>  		if (fwts_method_package_elements_type(fw, name, obj, elementsv3) != FWTS_OK)
>  			return;
> 


Acked-by: Ivan Hu <ivan.hu at canonical.com>



More information about the fwts-devel mailing list