diff options
author | Bob Moore <robert.moore@intel.com> | 2009-03-18 22:14:45 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2009-03-27 12:11:06 -0400 |
commit | 03ef132b7258bbea4858be4b1bd6cb6c3fdd3253 (patch) | |
tree | 7df4b7f383b2313aa434696d050f4867c5f2ed84 /drivers/acpi/acpica/nspredef.c | |
parent | f65563063375b05898a94ab71b52612cbe3a789b (diff) |
ACPICA: Fix index value in package warning message
For predefined method validation. Index value in warning message
could be off by one.
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/acpica/nspredef.c')
-rw-r--r-- | drivers/acpi/acpica/nspredef.c | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/drivers/acpi/acpica/nspredef.c b/drivers/acpi/acpica/nspredef.c index 0d0b4ee1358e..d9e8cbc6e679 100644 --- a/drivers/acpi/acpica/nspredef.c +++ b/drivers/acpi/acpica/nspredef.c | |||
@@ -79,7 +79,9 @@ acpi_ns_check_package(char *pathname, | |||
79 | static acpi_status | 79 | static acpi_status |
80 | acpi_ns_check_package_elements(char *pathname, | 80 | acpi_ns_check_package_elements(char *pathname, |
81 | union acpi_operand_object **elements, | 81 | union acpi_operand_object **elements, |
82 | u8 type1, u32 count1, u8 type2, u32 count2); | 82 | u8 type1, |
83 | u32 count1, | ||
84 | u8 type2, u32 count2, u32 start_index); | ||
83 | 85 | ||
84 | static acpi_status | 86 | static acpi_status |
85 | acpi_ns_check_object_type(char *pathname, | 87 | acpi_ns_check_object_type(char *pathname, |
@@ -473,7 +475,7 @@ acpi_ns_check_package(char *pathname, | |||
473 | package->ret_info. | 475 | package->ret_info. |
474 | object_type2, | 476 | object_type2, |
475 | package->ret_info. | 477 | package->ret_info. |
476 | count2); | 478 | count2, 0); |
477 | if (ACPI_FAILURE(status)) { | 479 | if (ACPI_FAILURE(status)) { |
478 | return (status); | 480 | return (status); |
479 | } | 481 | } |
@@ -624,7 +626,7 @@ acpi_ns_check_package(char *pathname, | |||
624 | object_type2, | 626 | object_type2, |
625 | package-> | 627 | package-> |
626 | ret_info. | 628 | ret_info. |
627 | count2); | 629 | count2, 0); |
628 | if (ACPI_FAILURE(status)) { | 630 | if (ACPI_FAILURE(status)) { |
629 | return (status); | 631 | return (status); |
630 | } | 632 | } |
@@ -673,7 +675,8 @@ acpi_ns_check_package(char *pathname, | |||
673 | object_type1, | 675 | object_type1, |
674 | sub_package-> | 676 | sub_package-> |
675 | package. | 677 | package. |
676 | count, 0, 0); | 678 | count, 0, 0, |
679 | 0); | ||
677 | if (ACPI_FAILURE(status)) { | 680 | if (ACPI_FAILURE(status)) { |
678 | return (status); | 681 | return (status); |
679 | } | 682 | } |
@@ -711,7 +714,8 @@ acpi_ns_check_package(char *pathname, | |||
711 | ret_info. | 714 | ret_info. |
712 | object_type1, | 715 | object_type1, |
713 | (expected_count | 716 | (expected_count |
714 | - 1), 0, 0); | 717 | - 1), 0, 0, |
718 | 1); | ||
715 | if (ACPI_FAILURE(status)) { | 719 | if (ACPI_FAILURE(status)) { |
716 | return (status); | 720 | return (status); |
717 | } | 721 | } |
@@ -759,6 +763,7 @@ acpi_ns_check_package(char *pathname, | |||
759 | * Count1 - Count for first group | 763 | * Count1 - Count for first group |
760 | * Type2 - Object type for second group | 764 | * Type2 - Object type for second group |
761 | * Count2 - Count for second group | 765 | * Count2 - Count for second group |
766 | * start_index - Start of the first group of elements | ||
762 | * | 767 | * |
763 | * RETURN: Status | 768 | * RETURN: Status |
764 | * | 769 | * |
@@ -770,7 +775,9 @@ acpi_ns_check_package(char *pathname, | |||
770 | static acpi_status | 775 | static acpi_status |
771 | acpi_ns_check_package_elements(char *pathname, | 776 | acpi_ns_check_package_elements(char *pathname, |
772 | union acpi_operand_object **elements, | 777 | union acpi_operand_object **elements, |
773 | u8 type1, u32 count1, u8 type2, u32 count2) | 778 | u8 type1, |
779 | u32 count1, | ||
780 | u8 type2, u32 count2, u32 start_index) | ||
774 | { | 781 | { |
775 | union acpi_operand_object **this_element = elements; | 782 | union acpi_operand_object **this_element = elements; |
776 | acpi_status status; | 783 | acpi_status status; |
@@ -783,7 +790,7 @@ acpi_ns_check_package_elements(char *pathname, | |||
783 | */ | 790 | */ |
784 | for (i = 0; i < count1; i++) { | 791 | for (i = 0; i < count1; i++) { |
785 | status = acpi_ns_check_object_type(pathname, this_element, | 792 | status = acpi_ns_check_object_type(pathname, this_element, |
786 | type1, i); | 793 | type1, i + start_index); |
787 | if (ACPI_FAILURE(status)) { | 794 | if (ACPI_FAILURE(status)) { |
788 | return (status); | 795 | return (status); |
789 | } | 796 | } |
@@ -792,7 +799,8 @@ acpi_ns_check_package_elements(char *pathname, | |||
792 | 799 | ||
793 | for (i = 0; i < count2; i++) { | 800 | for (i = 0; i < count2; i++) { |
794 | status = acpi_ns_check_object_type(pathname, this_element, | 801 | status = acpi_ns_check_object_type(pathname, this_element, |
795 | type2, (i + count1)); | 802 | type2, |
803 | (i + count1 + start_index)); | ||
796 | if (ACPI_FAILURE(status)) { | 804 | if (ACPI_FAILURE(status)) { |
797 | return (status); | 805 | return (status); |
798 | } | 806 | } |