ACK: [PATCH 2/2] acpi/method: check _PSC, _SxD and _SxW for max returned integers

ivanhu ivan.hu at canonical.com
Fri May 8 08:04:05 UTC 2020



On 5/8/20 4:26 AM, Alex Hung wrote:
> Signed-off-by: Alex Hung <alex.hung at canonical.com>
> ---
>  src/acpi/method/method.c | 9 ++++++---
>  1 file changed, 6 insertions(+), 3 deletions(-)
> 
> diff --git a/src/acpi/method/method.c b/src/acpi/method/method.c
> index 07eec496..254e1519 100644
> --- a/src/acpi/method/method.c
> +++ b/src/acpi/method/method.c
> @@ -1533,8 +1533,9 @@ static int method_test_PS3(fwts_framework *fw)
>  
>  static int method_test_PSC(fwts_framework *fw)
>  {
> +	uint64_t max = 3;
>  	return method_evaluate_method(fw, METHOD_OPTIONAL,
> -		"_PSC", NULL, 0, fwts_method_test_integer_return, NULL);
> +		"_PSC", NULL, 0, fwts_method_test_integer_max_return, &max);
>  }
>  
>  static int method_test_PSE(fwts_framework *fw)
> @@ -1596,8 +1597,9 @@ static int method_test_PSW(fwts_framework *fw)
>  #define method_test_SxD(name)						\
>  static int method_test ## name(fwts_framework *fw)			\
>  {									\
> +	uint64_t max = 3;						\
>  	return method_evaluate_method(fw, METHOD_OPTIONAL,		\
> -		# name, NULL, 0, fwts_method_test_integer_return, # name);	\
> +		# name, NULL, 0, fwts_method_test_integer_max_return, &max);	\
>  }
>  
>  method_test_SxD(_S1D)
> @@ -1608,8 +1610,9 @@ method_test_SxD(_S4D)
>  #define method_test_SxW(name)						\
>  static int method_test ## name(fwts_framework *fw)			\
>  {									\
> +	uint64_t max = 3;						\
>  	return method_evaluate_method(fw, METHOD_OPTIONAL,		\
> -		# name, NULL, 0, fwts_method_test_integer_return, # name);	\
> +		# name, NULL, 0, fwts_method_test_integer_max_return, &max);	\
>  }
>  
>  method_test_SxW(_S0W)
> 

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



More information about the fwts-devel mailing list