diff mbox series

[v3] ACPI / APEI: Remove needless __ghes_check_estatus() calls

Message ID 1561439728-5223-1-git-send-email-zhangliguang@linux.alibaba.com
State Accepted, archived
Delegated to: Rafael Wysocki
Headers show
Series [v3] ACPI / APEI: Remove needless __ghes_check_estatus() calls | expand

Commit Message

Liguang Zhang June 25, 2019, 5:15 a.m. UTC
Function __ghes_check_estatus() is always called after
__ghes_peek_estatus(), but it is already called in __ghes_peek_estatus().
So we should remove some needless __ghes_check_estatus() calls.

Signed-off-by: Liguang Zhang <zhangliguang@linux.alibaba.com>
Reviewed-by: James Morse <james.morse@arm.com>
---
 drivers/acpi/apei/ghes.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Rafael J. Wysocki July 5, 2019, 9:42 a.m. UTC | #1
On Tuesday, June 25, 2019 7:15:28 AM CEST luanshi wrote:
> Function __ghes_check_estatus() is always called after
> __ghes_peek_estatus(), but it is already called in __ghes_peek_estatus().
> So we should remove some needless __ghes_check_estatus() calls.
> 
> Signed-off-by: Liguang Zhang <zhangliguang@linux.alibaba.com>
> Reviewed-by: James Morse <james.morse@arm.com>
> ---
>  drivers/acpi/apei/ghes.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/acpi/apei/ghes.c b/drivers/acpi/apei/ghes.c
> index 993940d..a66e00f 100644
> --- a/drivers/acpi/apei/ghes.c
> +++ b/drivers/acpi/apei/ghes.c
> @@ -345,7 +345,7 @@ static int __ghes_peek_estatus(struct ghes *ghes,
>  		return -ENOENT;
>  	}
>  
> -	return __ghes_check_estatus(ghes, estatus);
> +	return 0;
>  }
>  
>  static int __ghes_read_estatus(struct acpi_hest_generic_status *estatus,
> 

Applied, thanks!
diff mbox series

Patch

diff --git a/drivers/acpi/apei/ghes.c b/drivers/acpi/apei/ghes.c
index 993940d..a66e00f 100644
--- a/drivers/acpi/apei/ghes.c
+++ b/drivers/acpi/apei/ghes.c
@@ -345,7 +345,7 @@  static int __ghes_peek_estatus(struct ghes *ghes,
 		return -ENOENT;
 	}
 
-	return __ghes_check_estatus(ghes, estatus);
+	return 0;
 }
 
 static int __ghes_read_estatus(struct acpi_hest_generic_status *estatus,