aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/utilities/utmisc.c
diff options
context:
space:
mode:
authorBob Moore <robert.moore@intel.com>2006-10-02 00:00:00 -0400
committerLen Brown <len.brown@intel.com>2006-03-31 02:19:03 -0500
commit52fc0b026e99b5d5d585095148d997d5634bbc25 (patch)
tree7bf93132cfd3e6957308a84198ee159f7d43cf6f /drivers/acpi/utilities/utmisc.c
parent46358614ed5b031797522f1020e989c959a8d8a6 (diff)
[ACPI] ACPICA 20060210
Removed a couple of extraneous ACPI_ERROR messages that appeared during normal execution. These became apparent after the conversion from ACPI_DEBUG_PRINT. Fixed a problem where the CreateField operator could hang if the BitIndex or NumBits parameter referred to a named object. From Valery Podrezov. http://bugzilla.kernel.org/show_bug.cgi?id=5359 Fixed a problem where a DeRefOf operation on a buffer object incorrectly failed with an exception. This also fixes a couple of related RefOf and DeRefOf issues. From Valery Podrezov. http://bugzilla.kernel.org/show_bug.cgi?id=5360 http://bugzilla.kernel.org/show_bug.cgi?id=5387 http://bugzilla.kernel.org/show_bug.cgi?id=5392 Fixed a problem where the AE_BUFFER_LIMIT exception was returned instead of AE_STRING_LIMIT on an out-of-bounds Index() operation. From Valery Podrezov. http://bugzilla.kernel.org/show_bug.cgi?id=5480 Implemented a memory cleanup at the end of the execution of each iteration of an AML While() loop, preventing the accumulation of outstanding objects. From Valery Podrezov. http://bugzilla.kernel.org/show_bug.cgi?id=5427 Eliminated a chunk of duplicate code in the object resolution code. From Valery Podrezov. http://bugzilla.kernel.org/show_bug.cgi?id=5336 Fixed several warnings during the 64-bit code generation. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/utilities/utmisc.c')
-rw-r--r--drivers/acpi/utilities/utmisc.c31
1 files changed, 6 insertions, 25 deletions
diff --git a/drivers/acpi/utilities/utmisc.c b/drivers/acpi/utilities/utmisc.c
index 7364f5f8c9cd..60f36130663c 100644
--- a/drivers/acpi/utilities/utmisc.c
+++ b/drivers/acpi/utilities/utmisc.c
@@ -97,6 +97,7 @@ acpi_status acpi_ut_allocate_owner_id(acpi_owner_id * owner_id)
97 97
98 for (k = acpi_gbl_next_owner_id_offset; k < 32; k++) { 98 for (k = acpi_gbl_next_owner_id_offset; k < 32; k++) {
99 if (acpi_gbl_owner_id_mask[j] == ACPI_UINT32_MAX) { 99 if (acpi_gbl_owner_id_mask[j] == ACPI_UINT32_MAX) {
100
100 /* There are no free IDs in this mask */ 101 /* There are no free IDs in this mask */
101 102
102 break; 103 break;
@@ -273,6 +274,7 @@ void acpi_ut_print_string(char *string, u8 max_length)
273 274
274 acpi_os_printf("\""); 275 acpi_os_printf("\"");
275 for (i = 0; string[i] && (i < max_length); i++) { 276 for (i = 0; string[i] && (i < max_length); i++) {
277
276 /* Escape sequences */ 278 /* Escape sequences */
277 279
278 switch (string[i]) { 280 switch (string[i]) {
@@ -601,11 +603,13 @@ acpi_ut_strtoul64(char *string, u32 base, acpi_integer * ret_integer)
601 603
602 while (*string) { 604 while (*string) {
603 if (ACPI_IS_DIGIT(*string)) { 605 if (ACPI_IS_DIGIT(*string)) {
606
604 /* Convert ASCII 0-9 to Decimal value */ 607 /* Convert ASCII 0-9 to Decimal value */
605 608
606 this_digit = ((u8) * string) - '0'; 609 this_digit = ((u8) * string) - '0';
607 } else { 610 } else {
608 if (base == 10) { 611 if (base == 10) {
612
609 /* Digit is out of range */ 613 /* Digit is out of range */
610 614
611 goto error_exit; 615 goto error_exit;
@@ -613,6 +617,7 @@ acpi_ut_strtoul64(char *string, u32 base, acpi_integer * ret_integer)
613 617
614 this_digit = (u8) ACPI_TOUPPER(*string); 618 this_digit = (u8) ACPI_TOUPPER(*string);
615 if (ACPI_IS_XDIGIT((char)this_digit)) { 619 if (ACPI_IS_XDIGIT((char)this_digit)) {
620
616 /* Convert ASCII Hex char to value */ 621 /* Convert ASCII Hex char to value */
617 622
618 this_digit = this_digit - 'A' + 10; 623 this_digit = this_digit - 'A' + 10;
@@ -727,6 +732,7 @@ acpi_ut_walk_package_tree(union acpi_operand_object * source_object,
727 } 732 }
728 733
729 while (state) { 734 while (state) {
735
730 /* Get one element of the package */ 736 /* Get one element of the package */
731 737
732 this_index = state->pkg.index; 738 this_index = state->pkg.index;
@@ -814,31 +820,6 @@ acpi_ut_walk_package_tree(union acpi_operand_object * source_object,
814 820
815/******************************************************************************* 821/*******************************************************************************
816 * 822 *
817 * FUNCTION: acpi_ut_generate_checksum
818 *
819 * PARAMETERS: Buffer - Buffer to be scanned
820 * Length - number of bytes to examine
821 *
822 * RETURN: The generated checksum
823 *
824 * DESCRIPTION: Generate a checksum on a raw buffer
825 *
826 ******************************************************************************/
827
828u8 acpi_ut_generate_checksum(u8 * buffer, u32 length)
829{
830 u32 i;
831 signed char sum = 0;
832
833 for (i = 0; i < length; i++) {
834 sum = (signed char)(sum + buffer[i]);
835 }
836
837 return ((u8) (0 - sum));
838}
839
840/*******************************************************************************
841 *
842 * FUNCTION: acpi_ut_error, acpi_ut_warning, acpi_ut_info 823 * FUNCTION: acpi_ut_error, acpi_ut_warning, acpi_ut_info
843 * 824 *
844 * PARAMETERS: module_name - Caller's module name (for error output) 825 * PARAMETERS: module_name - Caller's module name (for error output)