[prev in list] [next in list] [prev in thread] [next in thread]
List: fwts-devel
Subject: ACK: [PATCH] acpi/method: remove duplicated code in _PSR test
From: Colin Ian King <colin.king () canonical ! com>
Date: 2020-05-26 15:49:04
Message-ID: 7b445bb9-e8a7-0798-995a-e2decd6a2c36 () canonical ! com
[Download RAW message or body]
On 16/05/2020 00:59, Alex Hung wrote:
> fwts_method_test_passed_failed_return is used since _PSR returns 0 or 1
> only.
>
> Signed-off-by: Alex Hung <alex.hung@canonical.com>
> ---
> src/acpi/method/method.c | 24 +-----------------------
> 1 file changed, 1 insertion(+), 23 deletions(-)
>
> diff --git a/src/acpi/method/method.c b/src/acpi/method/method.c
> index 11e230ea..b2029412 100644
> --- a/src/acpi/method/method.c
> +++ b/src/acpi/method/method.c
> @@ -4212,32 +4212,10 @@ static int method_test_PRL(fwts_framework *fw)
> "_PRL", NULL, 0, fwts_method_test_all_reference_package_return, "_PRL");
> }
>
> -static void method_test_PSR_return(
> - fwts_framework *fw,
> - char *name,
> - ACPI_BUFFER *buf,
> - ACPI_OBJECT *obj,
> - void *private)
> -{
> - FWTS_UNUSED(private);
> -
> - if (fwts_method_check_type(fw, name, buf, ACPI_TYPE_INTEGER) != FWTS_OK)
> - return;
> -
> - if (obj->Integer.Value > 2) {
> - fwts_failed(fw, LOG_LEVEL_MEDIUM,
> - "Method_PSRZeroOrOne",
> - "%s returned 0x%8.8" PRIx64 ", expected 0 "
> - "(offline) or 1 (online)",
> - name, (uint64_t)obj->Integer.Value);
> - } else
> - fwts_method_passed_sane_uint64(fw, name, obj->Integer.Value);
> -}
> -
> static int method_test_PSR(fwts_framework *fw)
> {
> return method_evaluate_method(fw, METHOD_OPTIONAL,
> - "_PSR", NULL, 0, method_test_PSR_return, NULL);
> + "_PSR", NULL, 0, fwts_method_test_passed_failed_return, "_PSR");
> }
>
> static void method_test_PIF_return(
>
Acked-by: Colin Ian King <colin.king@canonical.com>
--
fwts-devel mailing list
fwts-devel@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/fwts-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic