diff mbox series

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

Message ID 1561376883-95788-1-git-send-email-zhangliguang@linux.alibaba.com
State Superseded, archived
Headers show
Series [v2] ACPI / APEI: Remove needless __ghes_check_estatus() calls | expand

Commit Message

Liguang Zhang June 24, 2019, 11:48 a.m. UTC
Function __ghes_check_estatus() is 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>
---
 drivers/acpi/apei/ghes.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

James Morse June 24, 2019, 5:34 p.m. UTC | #1
Hi Liguang,

On 24/06/2019 12:48, luanshi wrote:
> Function __ghes_check_estatus() is called after __ghes_peek_estatus(),

(Nit: 'is always called' would be clearer)

> but it is already called in __ghes_peek_estatus(). So we should remove
> some needless __ghes_check_estatus() calls.

Reviewed-by: James Morse <james.morse@arm.com>


Thanks!

James
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,