Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753273AbbHROIq (ORCPT ); Tue, 18 Aug 2015 10:08:46 -0400 Received: from smtp15.cstnet.cn ([159.226.251.15]:53301 "EHLO cstnet.cn" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752555AbbHROIo (ORCPT ); Tue, 18 Aug 2015 10:08:44 -0400 From: Zhouyi Zhou To: lv.zheng@intel.com, robert.moore@intel.com, rafael.j.wysocki@intel.com, lenb@kernel.org, linux-acpi@vger.kernel.org, devel@acpica.org, linux-kernel@vger.kernel.org Cc: Zhouyi Zhou Subject: [RFC] ACPICA: save a function call Date: Tue, 18 Aug 2015 22:07:43 +0800 Message-Id: <1439906863-5681-1-git-send-email-yizhouzhou@ict.ac.cn> X-Mailer: git-send-email 1.7.10.4 X-CM-TRANSID: UgCowJBrr+dDPNNVKYS_AQ--.4325S2 X-Coremail-Antispam: 1UD129KBjvJXoWrtFy7Jw17Kw45AryrJFWxtFb_yoW8JF17pa 9Fvay2kryxGr40yF1DCw109Fy5GasYvry7GFWqkwnrXF1kGr1qywsxAr95XFZ8t39rXw4U ZF4kAwn8Ja1jyw7anT9S1TB71UUUUU7qnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDU0xBIdaVrnRJUUUqK14x267AKxVW8JVW5JwAFc2x0x2IEx4CE42xK8VAvwI8IcIk0 rVWrJVCq3wAFIxvE14AKwVWUJVWUGwA2ocxC64kIII0Yj41l84ACjcxK6xIIjxv20xvE14 v26r4j6ryUM28EF7xvwVC0I7IYx2IY6xkF7I0E14v26r4j6F4UM28EF7xvwVC2z280aVAF wI0_GcCE3s1l84ACjcxK6I8E87Iv6xkF7I0E14v26rxl6s0DM2AIxVAIcxkEcVAq07x20x vEncxIr21l5I8CrVACY4xI64kE6c02F40Ex7xfMcIj6xIIjxv20xvE14v26r1Y6r17McIj 6I8E87Iv67AKxVWUJVW8JwAm72CE4IkC6x0Yz7v_Jr0_Gr1lF7xvr2IYc2Ij64vIr41lF7 xvr2IYc2Ij64vIr40E4x8a64kEw24lF7I21c0EjII2zVCS5cI20VAGYxC7MxAIw28IcxkI 7VAKI48JMI8I3I0E5I8CrVAFwI0_Jr0_Jr4lx2IqxVCjr7xvwVAFwI0_JrI_JrWlx4CE17 CEb7AF67AKxVWUtVW8ZwCI42IY6xIIjxv20xvE14v26r1j6r1xMIIF0xvE2Ix0cI8IcVCY 1x0267AKxVWUJVW8JwCI42IY6xAIw20EY4v20xvaj40_Zr0_Wr1UMIIF0xvEx4A2jsIE14 v26r1j6r4UMIIF0xvEx4A2jsIEc7CjxVAFwI0_Jr0_GrUvcSsGvfC2KfnxnUUI43ZEXa7x R_UUUUUUUUU== X-CM-SenderInfo: x1l2x05x2k03g6lf3hldfou0/ Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1458 Lines: 45 In function acpi_ps_build_named_op, the if statement in line 221 ensure the argument status to function call acpi_ps_next_parse_state has the value 0, while acpi_ps_next_parse_state do not change any global state when called with callback_status==0. I think following lines should be removed to save some CPU cycles because the compilers won't do it (the callee is defined in another compiling unit, so it can't be inlined). Signed-off-by: Zhouyi Zhou --- drivers/acpi/acpica/psobject.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/drivers/acpi/acpica/psobject.c b/drivers/acpi/acpica/psobject.c index 2f5ddd8..4ff6530 100644 --- a/drivers/acpi/acpica/psobject.c +++ b/drivers/acpi/acpica/psobject.c @@ -230,14 +230,6 @@ acpi_ps_build_named_op(struct acpi_walk_state *walk_state, return_ACPI_STATUS(AE_CTRL_PARSE_CONTINUE); } - status = acpi_ps_next_parse_state(walk_state, *op, status); - if (ACPI_FAILURE(status)) { - if (status == AE_CTRL_PENDING) { - status = AE_CTRL_PARSE_PENDING; - } - return_ACPI_STATUS(status); - } - acpi_ps_append_arg(*op, unnamed_op->common.value.arg); if ((*op)->common.aml_opcode == AML_REGION_OP || -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/