diff mbox series

sbbr: Make method_test_ADR() optional.

Message ID 20210629101048.933733-1-gjb@semihalf.com
State Superseded
Headers show
Series sbbr: Allow 16550 compatible serial port in DBG2 | expand

Commit Message

Grzegorz Bernacki June 29, 2021, 10:10 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 29, 2021, 7:15 p.m. UTC | #1
The subject should be the names of the subsystems, i.e.
	acpi: method: Make method_test_ADR() optional

but I can fix this when applying.

On 2021-06-29 4:10 a.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>
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(