From patchwork Tue Jun 25 05:15:28 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: luanshi X-Patchwork-Id: 11014707 X-Patchwork-Delegate: rjw@sisk.pl Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id BE3EF924 for ; Tue, 25 Jun 2019 05:15:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A1ED728555 for ; Tue, 25 Jun 2019 05:15:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8F85828640; Tue, 25 Jun 2019 05:15:41 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EE75428555 for ; Tue, 25 Jun 2019 05:15:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726447AbfFYFPk (ORCPT ); Tue, 25 Jun 2019 01:15:40 -0400 Received: from out30-43.freemail.mail.aliyun.com ([115.124.30.43]:33691 "EHLO out30-43.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726422AbfFYFPk (ORCPT ); Tue, 25 Jun 2019 01:15:40 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R161e4;CH=green;DM=||false|;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e07417;MF=zhangliguang@linux.alibaba.com;NM=1;PH=DS;RN=6;SR=0;TI=SMTPD_---0TV8sUTW_1561439729; Received: from localhost(mailfrom:zhangliguang@linux.alibaba.com fp:SMTPD_---0TV8sUTW_1561439729) by smtp.aliyun-inc.com(127.0.0.1); Tue, 25 Jun 2019 13:15:36 +0800 From: luanshi To: "Rafael J. Wysocki" , Len Brown Cc: linux-acpi@vger.kernel.org, James Morse , Tony Luck , Borislav Petkov Subject: [PATCH v3] ACPI / APEI: Remove needless __ghes_check_estatus() calls Date: Tue, 25 Jun 2019 13:15:28 +0800 Message-Id: <1561439728-5223-1-git-send-email-zhangliguang@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Reviewed-by: James Morse --- 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,