diff mbox

acpi: method: don't bother reporting internal ACPI lock success

Message ID 1355337318-30030-1-git-send-email-colin.king@canonical.com
State Accepted
Headers show

Commit Message

Colin Ian King Dec. 12, 2012, 6:35 p.m. UTC
From: Colin Ian King <colin.king@canonical.com>

Each object that gets evaluated has a sanity check to see if the
internal locking state is sane.  This rarely goes wrong, so ingore
reporting success as this adds to the noise on the output. Just report
failures.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 src/acpi/method/method.c | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

Comments

Keng-Yu Lin Dec. 18, 2012, 2:40 a.m. UTC | #1
On Thu, Dec 13, 2012 at 2:35 AM, Colin King <colin.king@canonical.com> wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Each object that gets evaluated has a sanity check to see if the
> internal locking state is sane.  This rarely goes wrong, so ingore
> reporting success as this adds to the noise on the output. Just report
> failures.
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>  src/acpi/method/method.c | 10 ++--------
>  1 file changed, 2 insertions(+), 8 deletions(-)
>
> diff --git a/src/acpi/method/method.c b/src/acpi/method/method.c
> index 3ec7836..52b0e18 100644
> --- a/src/acpi/method/method.c
> +++ b/src/acpi/method/method.c
> @@ -342,8 +342,7 @@ static void method_evaluate_found_method(
>
>         if (ACPI_FAILURE(ret) != AE_OK) {
>                 fwts_method_evaluate_report_error(fw, name, ret);
> -       }
> -       else {
> +       } else {
>                 if (check_func != NULL) {
>                         ACPI_OBJECT *obj = buf.Pointer;
>                         check_func(fw, name, &buf, obj, private);
> @@ -366,12 +365,7 @@ static void method_evaluate_found_method(
>                         "acquired lock. It may be occurring in the method "
>                         "being tested or other methods used while evaluating "
>                         "the method.");
> -       } else
> -               if ((sem_acquired + sem_released) > 0)
> -                       fwts_passed(fw,
> -                               "%s correctly acquired and released locks "
> -                               "%d times.", name, sem_acquired);
> -
> +       }
>  }
>
>  /*
> --
> 1.8.0
>
Acked-by: Keng-Yu Lin <kengyu@canonical.com>
Ivan Hu Dec. 20, 2012, 2:29 a.m. UTC | #2
On 12/13/2012 02:35 AM, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Each object that gets evaluated has a sanity check to see if the
> internal locking state is sane.  This rarely goes wrong, so ingore
> reporting success as this adds to the noise on the output. Just report
> failures.
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>   src/acpi/method/method.c | 10 ++--------
>   1 file changed, 2 insertions(+), 8 deletions(-)
>
> diff --git a/src/acpi/method/method.c b/src/acpi/method/method.c
> index 3ec7836..52b0e18 100644
> --- a/src/acpi/method/method.c
> +++ b/src/acpi/method/method.c
> @@ -342,8 +342,7 @@ static void method_evaluate_found_method(
>
>   	if (ACPI_FAILURE(ret) != AE_OK) {
>   		fwts_method_evaluate_report_error(fw, name, ret);
> -	}
> -	else {
> +	} else {
>   		if (check_func != NULL) {
>   			ACPI_OBJECT *obj = buf.Pointer;
>   			check_func(fw, name, &buf, obj, private);
> @@ -366,12 +365,7 @@ static void method_evaluate_found_method(
>   			"acquired lock. It may be occurring in the method "
>   			"being tested or other methods used while evaluating "
>   			"the method.");
> -	} else
> -		if ((sem_acquired + sem_released) > 0)
> -			fwts_passed(fw,
> -				"%s correctly acquired and released locks "
> -				"%d times.", name, sem_acquired);
> -
> +	}
>   }
>
>   /*
>
Acked-by: Ivan Hu <ivan.hu@canonical.com>
diff mbox

Patch

diff --git a/src/acpi/method/method.c b/src/acpi/method/method.c
index 3ec7836..52b0e18 100644
--- a/src/acpi/method/method.c
+++ b/src/acpi/method/method.c
@@ -342,8 +342,7 @@  static void method_evaluate_found_method(
 
 	if (ACPI_FAILURE(ret) != AE_OK) {
 		fwts_method_evaluate_report_error(fw, name, ret);
-	}
-	else {
+	} else {
 		if (check_func != NULL) {
 			ACPI_OBJECT *obj = buf.Pointer;
 			check_func(fw, name, &buf, obj, private);
@@ -366,12 +365,7 @@  static void method_evaluate_found_method(
 			"acquired lock. It may be occurring in the method "
 			"being tested or other methods used while evaluating "
 			"the method.");
-	} else
-		if ((sem_acquired + sem_released) > 0)
-			fwts_passed(fw,
-				"%s correctly acquired and released locks "
-				"%d times.", name, sem_acquired);
-
+	}
 }
 
 /*