Skip to contentSkip to conversation

ACPICA: wrong acpi_parse_state assigned acpi_ps_init_scope() ?

PATCH In review Roel Kluin 2 participants 2 messages Jan 15, 2010

Subsystems (2)
lore
Share & tools
lore

Roel Kluin

author
#0 lore raw

PATCH 1/1 ACPICA: wrong acpi_parse_state assigned acpi_ps_init_scope() ?

Assign the package end, not the last AML byte.

---
Is this right?

drivers/acpi/acpica/psscope.c +1 -1
index 2feca5c..a8dfe16 100644
@@ -118,7 +118,7 @@ acpi_ps_init_scope(struct acpi_parse_state * parser_state,
 	scope->parse_scope.op = root_op;
 	scope->parse_scope.arg_count = ACPI_VAR_ARGS;
 	scope->parse_scope.arg_end = parser_state->aml_end;
-	scope->parse_scope.pkg_end = parser_state->aml_end;
+	scope->parse_scope.pkg_end = parser_state->pkg_end;
 
 	parser_state->scope = scope;
 	parser_state->start_op = root_op;
#1 lore raw
Quoted 11 lines · Roel Kluin

Assign the package end, not the last AML byte.

---
Is this right?

drivers/acpi/acpica/psscope.c +0 -0
index 2feca5c..a8dfe16 100644

drivers/acpi/acpica/psscope.c acpi_ps_init_scope(struct acpi_parse_state * parser_state, · line 121

Quoted 5 lines
drivers/acpi/acpica/psscope.c +1 -1
@@ -118,7 +118,7 @@ acpi_ps_init_scope(struct acpi_parse_state * parser_state,
        scope->parse_scope.op = root_op;
        scope->parse_scope.arg_count = ACPI_VAR_ARGS;
        scope->parse_scope.arg_end = parser_state->aml_end;
-       scope->parse_scope.pkg_end = parser_state->aml_end;
+       scope->parse_scope.pkg_end = parser_state->pkg_end;

->aml_end and ->pkg_end are same here.

acpi_ps_init_scope is only called in acpi_ds_init_aml_walk which set aml_end and pkg_end the same.

acpi_ds_init_aml_walk(...)

{
    ....
    walk_state->parser_state.aml_end =
            walk_state->parser_state.pkg_end = aml_start + aml_length;
    .....

    status = acpi_ps_init_scope(&walk_state->parser_state, op);
    .....
}

Lin Ming

Quoted 8 lines
drivers/acpi/acpica/psscope.c +0 -1
        parser_state->scope = scope;
        parser_state->start_op = root_op;
--

To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html