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@xxxxxxxxxxxxxxxxx> --- drivers/acpi/apei/ghes.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/drivers/acpi/apei/ghes.c b/drivers/acpi/apei/ghes.c index 993940d..1041a4d 100644 --- a/drivers/acpi/apei/ghes.c +++ b/drivers/acpi/apei/ghes.c @@ -372,10 +372,6 @@ static int ghes_read_estatus(struct ghes *ghes, if (rc) return rc; - rc = __ghes_check_estatus(ghes, estatus); - if (rc) - return rc; - return __ghes_read_estatus(estatus, *buf_paddr, fixmap_idx, cper_estatus_len(estatus)); } @@ -882,12 +878,6 @@ static int ghes_in_nmi_queue_one_entry(struct ghes *ghes, return rc; } - rc = __ghes_check_estatus(ghes, &tmp_header); - if (rc) { - ghes_clear_estatus(ghes, &tmp_header, buf_paddr, fixmap_idx); - return rc; - } - len = cper_estatus_len(&tmp_header); node_len = GHES_ESTATUS_NODE_LEN(len); estatus_node = (void *)gen_pool_alloc(ghes_estatus_pool, node_len); -- 1.8.3.1