diff options
Diffstat (limited to 'drivers/acpi/parser/psargs.c')
| -rw-r--r-- | drivers/acpi/parser/psargs.c | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/drivers/acpi/parser/psargs.c b/drivers/acpi/parser/psargs.c index de573be52718..bf88e076c3e9 100644 --- a/drivers/acpi/parser/psargs.c +++ b/drivers/acpi/parser/psargs.c | |||
| @@ -79,7 +79,7 @@ acpi_ps_get_next_package_length(struct acpi_parse_state *parser_state) | |||
| 79 | acpi_native_uint byte_count; | 79 | acpi_native_uint byte_count; |
| 80 | u8 byte_zero_mask = 0x3F; /* Default [0:5] */ | 80 | u8 byte_zero_mask = 0x3F; /* Default [0:5] */ |
| 81 | 81 | ||
| 82 | ACPI_FUNCTION_TRACE("ps_get_next_package_length"); | 82 | ACPI_FUNCTION_TRACE(ps_get_next_package_length); |
| 83 | 83 | ||
| 84 | /* | 84 | /* |
| 85 | * Byte 0 bits [6:7] contain the number of additional bytes | 85 | * Byte 0 bits [6:7] contain the number of additional bytes |
| @@ -128,7 +128,7 @@ u8 *acpi_ps_get_next_package_end(struct acpi_parse_state *parser_state) | |||
| 128 | u8 *start = parser_state->aml; | 128 | u8 *start = parser_state->aml; |
| 129 | u32 package_length; | 129 | u32 package_length; |
| 130 | 130 | ||
| 131 | ACPI_FUNCTION_TRACE("ps_get_next_package_end"); | 131 | ACPI_FUNCTION_TRACE(ps_get_next_package_end); |
| 132 | 132 | ||
| 133 | /* Function below updates parser_state->Aml */ | 133 | /* Function below updates parser_state->Aml */ |
| 134 | 134 | ||
| @@ -157,7 +157,7 @@ char *acpi_ps_get_next_namestring(struct acpi_parse_state *parser_state) | |||
| 157 | u8 *start = parser_state->aml; | 157 | u8 *start = parser_state->aml; |
| 158 | u8 *end = parser_state->aml; | 158 | u8 *end = parser_state->aml; |
| 159 | 159 | ||
| 160 | ACPI_FUNCTION_TRACE("ps_get_next_namestring"); | 160 | ACPI_FUNCTION_TRACE(ps_get_next_namestring); |
| 161 | 161 | ||
| 162 | /* Point past any namestring prefix characters (backslash or carat) */ | 162 | /* Point past any namestring prefix characters (backslash or carat) */ |
| 163 | 163 | ||
| @@ -237,7 +237,7 @@ acpi_ps_get_next_namepath(struct acpi_walk_state *walk_state, | |||
| 237 | struct acpi_namespace_node *node; | 237 | struct acpi_namespace_node *node; |
| 238 | union acpi_generic_state scope_info; | 238 | union acpi_generic_state scope_info; |
| 239 | 239 | ||
| 240 | ACPI_FUNCTION_TRACE("ps_get_next_namepath"); | 240 | ACPI_FUNCTION_TRACE(ps_get_next_namepath); |
| 241 | 241 | ||
| 242 | path = acpi_ps_get_next_namestring(parser_state); | 242 | path = acpi_ps_get_next_namestring(parser_state); |
| 243 | acpi_ps_init_op(arg, AML_INT_NAMEPATH_OP); | 243 | acpi_ps_init_op(arg, AML_INT_NAMEPATH_OP); |
| @@ -275,6 +275,7 @@ acpi_ps_get_next_namepath(struct acpi_walk_state *walk_state, | |||
| 275 | */ | 275 | */ |
| 276 | if (ACPI_SUCCESS(status) && | 276 | if (ACPI_SUCCESS(status) && |
| 277 | possible_method_call && (node->type == ACPI_TYPE_METHOD)) { | 277 | possible_method_call && (node->type == ACPI_TYPE_METHOD)) { |
| 278 | |||
| 278 | /* This name is actually a control method invocation */ | 279 | /* This name is actually a control method invocation */ |
| 279 | 280 | ||
| 280 | method_desc = acpi_ns_get_attached_object(node); | 281 | method_desc = acpi_ns_get_attached_object(node); |
| @@ -319,6 +320,7 @@ acpi_ps_get_next_namepath(struct acpi_walk_state *walk_state, | |||
| 319 | * some not_found cases are allowed | 320 | * some not_found cases are allowed |
| 320 | */ | 321 | */ |
| 321 | if (status == AE_NOT_FOUND) { | 322 | if (status == AE_NOT_FOUND) { |
| 323 | |||
| 322 | /* 1) not_found is ok during load pass 1/2 (allow forward references) */ | 324 | /* 1) not_found is ok during load pass 1/2 (allow forward references) */ |
| 323 | 325 | ||
| 324 | if ((walk_state->parse_flags & ACPI_PARSE_MODE_MASK) != | 326 | if ((walk_state->parse_flags & ACPI_PARSE_MODE_MASK) != |
| @@ -354,6 +356,7 @@ acpi_ps_get_next_namepath(struct acpi_walk_state *walk_state, | |||
| 354 | 356 | ||
| 355 | if ((walk_state->parse_flags & ACPI_PARSE_MODE_MASK) == | 357 | if ((walk_state->parse_flags & ACPI_PARSE_MODE_MASK) == |
| 356 | ACPI_PARSE_EXECUTE) { | 358 | ACPI_PARSE_EXECUTE) { |
| 359 | |||
| 357 | /* Report a control method execution error */ | 360 | /* Report a control method execution error */ |
| 358 | 361 | ||
| 359 | status = acpi_ds_method_error(status, walk_state); | 362 | status = acpi_ds_method_error(status, walk_state); |
| @@ -388,7 +391,7 @@ acpi_ps_get_next_simple_arg(struct acpi_parse_state *parser_state, | |||
| 388 | u16 opcode; | 391 | u16 opcode; |
| 389 | u8 *aml = parser_state->aml; | 392 | u8 *aml = parser_state->aml; |
| 390 | 393 | ||
| 391 | ACPI_FUNCTION_TRACE_U32("ps_get_next_simple_arg", arg_type); | 394 | ACPI_FUNCTION_TRACE_U32(ps_get_next_simple_arg, arg_type); |
| 392 | 395 | ||
| 393 | switch (arg_type) { | 396 | switch (arg_type) { |
| 394 | case ARGP_BYTEDATA: | 397 | case ARGP_BYTEDATA: |
| @@ -453,7 +456,7 @@ acpi_ps_get_next_simple_arg(struct acpi_parse_state *parser_state, | |||
| 453 | 456 | ||
| 454 | default: | 457 | default: |
| 455 | 458 | ||
| 456 | ACPI_ERROR((AE_INFO, "Invalid arg_type %X", arg_type)); | 459 | ACPI_ERROR((AE_INFO, "Invalid ArgType %X", arg_type)); |
| 457 | return_VOID; | 460 | return_VOID; |
| 458 | } | 461 | } |
| 459 | 462 | ||
| @@ -484,7 +487,7 @@ static union acpi_parse_object *acpi_ps_get_next_field(struct acpi_parse_state | |||
| 484 | u16 opcode; | 487 | u16 opcode; |
| 485 | u32 name; | 488 | u32 name; |
| 486 | 489 | ||
| 487 | ACPI_FUNCTION_TRACE("ps_get_next_field"); | 490 | ACPI_FUNCTION_TRACE(ps_get_next_field); |
| 488 | 491 | ||
| 489 | /* Determine field type */ | 492 | /* Determine field type */ |
| 490 | 493 | ||
| @@ -590,7 +593,7 @@ acpi_ps_get_next_arg(struct acpi_walk_state *walk_state, | |||
| 590 | u32 subop; | 593 | u32 subop; |
| 591 | acpi_status status = AE_OK; | 594 | acpi_status status = AE_OK; |
| 592 | 595 | ||
| 593 | ACPI_FUNCTION_TRACE_PTR("ps_get_next_arg", parser_state); | 596 | ACPI_FUNCTION_TRACE_PTR(ps_get_next_arg, parser_state); |
| 594 | 597 | ||
| 595 | switch (arg_type) { | 598 | switch (arg_type) { |
| 596 | case ARGP_BYTEDATA: | 599 | case ARGP_BYTEDATA: |
| @@ -620,6 +623,7 @@ acpi_ps_get_next_arg(struct acpi_walk_state *walk_state, | |||
| 620 | case ARGP_FIELDLIST: | 623 | case ARGP_FIELDLIST: |
| 621 | 624 | ||
| 622 | if (parser_state->aml < parser_state->pkg_end) { | 625 | if (parser_state->aml < parser_state->pkg_end) { |
| 626 | |||
| 623 | /* Non-empty list */ | 627 | /* Non-empty list */ |
| 624 | 628 | ||
| 625 | while (parser_state->aml < parser_state->pkg_end) { | 629 | while (parser_state->aml < parser_state->pkg_end) { |
| @@ -645,6 +649,7 @@ acpi_ps_get_next_arg(struct acpi_walk_state *walk_state, | |||
| 645 | case ARGP_BYTELIST: | 649 | case ARGP_BYTELIST: |
| 646 | 650 | ||
| 647 | if (parser_state->aml < parser_state->pkg_end) { | 651 | if (parser_state->aml < parser_state->pkg_end) { |
| 652 | |||
| 648 | /* Non-empty list */ | 653 | /* Non-empty list */ |
| 649 | 654 | ||
| 650 | arg = acpi_ps_alloc_op(AML_INT_BYTELIST_OP); | 655 | arg = acpi_ps_alloc_op(AML_INT_BYTELIST_OP); |
| @@ -673,6 +678,7 @@ acpi_ps_get_next_arg(struct acpi_walk_state *walk_state, | |||
| 673 | if (subop == 0 || | 678 | if (subop == 0 || |
| 674 | acpi_ps_is_leading_char(subop) || | 679 | acpi_ps_is_leading_char(subop) || |
| 675 | acpi_ps_is_prefix_char(subop)) { | 680 | acpi_ps_is_prefix_char(subop)) { |
| 681 | |||
| 676 | /* null_name or name_string */ | 682 | /* null_name or name_string */ |
| 677 | 683 | ||
| 678 | arg = acpi_ps_alloc_op(AML_INT_NAMEPATH_OP); | 684 | arg = acpi_ps_alloc_op(AML_INT_NAMEPATH_OP); |
| @@ -703,6 +709,7 @@ acpi_ps_get_next_arg(struct acpi_walk_state *walk_state, | |||
| 703 | case ARGP_OBJLIST: | 709 | case ARGP_OBJLIST: |
| 704 | 710 | ||
| 705 | if (parser_state->aml < parser_state->pkg_end) { | 711 | if (parser_state->aml < parser_state->pkg_end) { |
| 712 | |||
| 706 | /* Non-empty list of variable arguments, nothing returned */ | 713 | /* Non-empty list of variable arguments, nothing returned */ |
| 707 | 714 | ||
| 708 | walk_state->arg_count = ACPI_VAR_ARGS; | 715 | walk_state->arg_count = ACPI_VAR_ARGS; |
| @@ -711,7 +718,7 @@ acpi_ps_get_next_arg(struct acpi_walk_state *walk_state, | |||
| 711 | 718 | ||
| 712 | default: | 719 | default: |
| 713 | 720 | ||
| 714 | ACPI_ERROR((AE_INFO, "Invalid arg_type: %X", arg_type)); | 721 | ACPI_ERROR((AE_INFO, "Invalid ArgType: %X", arg_type)); |
| 715 | status = AE_AML_OPERAND_TYPE; | 722 | status = AE_AML_OPERAND_TYPE; |
| 716 | break; | 723 | break; |
| 717 | } | 724 | } |
