Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1209274

[RFC] ACPICA: save a function call

From Zhouyi Zhou <yizhouzhou@ict.ac.cn>
Newsgroups linux.kernel
Subject [RFC] ACPICA: save a function call
Date 2015-08-18 16:10 +0200
Message-ID <pYPKp-8vl-5@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


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 <yizhouzhou@ict.ac.cn>

---
 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/

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

[RFC] ACPICA: save a function call  Zhouyi Zhou <yizhouzhou@ict.ac.cn> - 2015-08-18 16:10 +0200

csiph-web