diff mbox series

[v2] acpi: method: Make method_test_ADR() optional.

Message ID 20210630054545.959797-1-gjb@semihalf.com
State Accepted
Headers show
Series [v2] acpi: method: Make _AEI test optional for SBBR. | expand

Commit Message

Grzegorz Bernacki June 30, 2021, 5:45 a.m. UTC
According to ACPI specification _ADR is not required
if _HID exists for given device. This test focus on
testing returning value of _ADR, not the existence of
_ADR, that's why it should not be mandatory.

BugLink: https://bugs.launchpad.net/fwts/+bug/1933493

Signed-off-by: Grzegorz Bernacki <gjb@semihalf.com>
---
 src/acpi/method/method.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

Comments

Alex Hung June 30, 2021, 5:58 a.m. UTC | #1
On 2021-06-29 11:45 p.m., Grzegorz Bernacki wrote:
> According to ACPI specification _ADR is not required
> if _HID exists for given device. This test focus on
> testing returning value of _ADR, not the existence of
> _ADR, that's why it should not be mandatory.
> 
> BugLink: https://bugs.launchpad.net/fwts/+bug/1933493
> 
> Signed-off-by: Grzegorz Bernacki <gjb@semihalf.com>
> ---
>  src/acpi/method/method.c | 8 ++------
>  1 file changed, 2 insertions(+), 6 deletions(-)
> 
> diff --git a/src/acpi/method/method.c b/src/acpi/method/method.c
> index 9832c4e1..9200f7d4 100644
> --- a/src/acpi/method/method.c
> +++ b/src/acpi/method/method.c
> @@ -4340,12 +4340,8 @@ static int method_test_VPO(fwts_framework *fw)
>  
>  static int method_test_ADR(fwts_framework *fw)
>  {
> -	if (fw->flags & FWTS_FLAG_SBBR)
> -		return method_evaluate_method(fw, METHOD_MANDATORY,
> -			"_ADR", NULL, 0, fwts_method_test_integer_return, NULL);
> -	else
> -		return method_evaluate_method(fw, METHOD_OPTIONAL,
> -			"_ADR", NULL, 0, fwts_method_test_integer_return, NULL);
> +	return method_evaluate_method(fw, METHOD_OPTIONAL,
> +		"_ADR", NULL, 0, fwts_method_test_integer_return, NULL);
>  }
>  
>  static void method_test_BCL_return(
> 


Acked-by: Alex Hung <alex.hung@canonical.com>
Colin Ian King June 30, 2021, 6:32 a.m. UTC | #2
On 30/06/2021 06:45, Grzegorz Bernacki wrote:
> According to ACPI specification _ADR is not required
> if _HID exists for given device. This test focus on
> testing returning value of _ADR, not the existence of
> _ADR, that's why it should not be mandatory.
> 
> BugLink: https://bugs.launchpad.net/fwts/+bug/1933493
> 
> Signed-off-by: Grzegorz Bernacki <gjb@semihalf.com>
> ---
>  src/acpi/method/method.c | 8 ++------
>  1 file changed, 2 insertions(+), 6 deletions(-)
> 
> diff --git a/src/acpi/method/method.c b/src/acpi/method/method.c
> index 9832c4e1..9200f7d4 100644
> --- a/src/acpi/method/method.c
> +++ b/src/acpi/method/method.c
> @@ -4340,12 +4340,8 @@ static int method_test_VPO(fwts_framework *fw)
>  
>  static int method_test_ADR(fwts_framework *fw)
>  {
> -	if (fw->flags & FWTS_FLAG_SBBR)
> -		return method_evaluate_method(fw, METHOD_MANDATORY,
> -			"_ADR", NULL, 0, fwts_method_test_integer_return, NULL);
> -	else
> -		return method_evaluate_method(fw, METHOD_OPTIONAL,
> -			"_ADR", NULL, 0, fwts_method_test_integer_return, NULL);
> +	return method_evaluate_method(fw, METHOD_OPTIONAL,
> +		"_ADR", NULL, 0, fwts_method_test_integer_return, NULL);
>  }
>  
>  static void method_test_BCL_return(
> 

Thanks for the fixes.

Acked-by: Colin Ian King <colin.king@canonical.com>
diff mbox series

Patch

diff --git a/src/acpi/method/method.c b/src/acpi/method/method.c
index 9832c4e1..9200f7d4 100644
--- a/src/acpi/method/method.c
+++ b/src/acpi/method/method.c
@@ -4340,12 +4340,8 @@  static int method_test_VPO(fwts_framework *fw)
 
 static int method_test_ADR(fwts_framework *fw)
 {
-	if (fw->flags & FWTS_FLAG_SBBR)
-		return method_evaluate_method(fw, METHOD_MANDATORY,
-			"_ADR", NULL, 0, fwts_method_test_integer_return, NULL);
-	else
-		return method_evaluate_method(fw, METHOD_OPTIONAL,
-			"_ADR", NULL, 0, fwts_method_test_integer_return, NULL);
+	return method_evaluate_method(fw, METHOD_OPTIONAL,
+		"_ADR", NULL, 0, fwts_method_test_integer_return, NULL);
 }
 
 static void method_test_BCL_return(