]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/acpi/executer/exconvrt.c
Merge branch 'master' of /home/trondmy/kernel/linux-2.6/
[linux-2.6-omap-h63xx.git] / drivers / acpi / executer / exconvrt.c
index 04e5194989a6ffe51a718f370dedc85ba9e6aadd..b732e399b1eff86abb6439ef0657ff9a5fda0272 100644 (file)
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2005, R. Byron Moore
+ * Copyright (C) 2000 - 2006, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -79,7 +79,7 @@ acpi_ex_convert_to_integer(union acpi_operand_object *obj_desc,
        u32 count;
        acpi_status status;
 
-       ACPI_FUNCTION_TRACE_PTR("ex_convert_to_integer", obj_desc);
+       ACPI_FUNCTION_TRACE_PTR(ex_convert_to_integer, obj_desc);
 
        switch (ACPI_GET_OBJECT_TYPE(obj_desc)) {
        case ACPI_TYPE_INTEGER:
@@ -199,7 +199,7 @@ acpi_ex_convert_to_buffer(union acpi_operand_object *obj_desc,
        union acpi_operand_object *return_desc;
        u8 *new_buf;
 
-       ACPI_FUNCTION_TRACE_PTR("ex_convert_to_buffer", obj_desc);
+       ACPI_FUNCTION_TRACE_PTR(ex_convert_to_buffer, obj_desc);
 
        switch (ACPI_GET_OBJECT_TYPE(obj_desc)) {
        case ACPI_TYPE_BUFFER:
@@ -319,6 +319,7 @@ acpi_ex_convert_to_ascii(acpi_integer integer,
                remainder = 0;
 
                for (i = decimal_length; i > 0; i--) {
+
                        /* Divide by nth factor of 10 */
 
                        digit = integer;
@@ -346,6 +347,7 @@ acpi_ex_convert_to_ascii(acpi_integer integer,
 
                hex_length = (acpi_native_uint) ACPI_MUL_2(data_width);
                for (i = 0, j = (hex_length - 1); i < hex_length; i++, j--) {
+
                        /* Get one hex digit, most significant digits first */
 
                        string[k] =
@@ -400,7 +402,7 @@ acpi_ex_convert_to_string(union acpi_operand_object * obj_desc,
        u16 base = 16;
        u8 separator = ',';
 
-       ACPI_FUNCTION_TRACE_PTR("ex_convert_to_string", obj_desc);
+       ACPI_FUNCTION_TRACE_PTR(ex_convert_to_string, obj_desc);
 
        switch (ACPI_GET_OBJECT_TYPE(obj_desc)) {
        case ACPI_TYPE_STRING:
@@ -504,18 +506,12 @@ acpi_ex_convert_to_string(union acpi_operand_object * obj_desc,
                }
 
                /*
-                * Perform the conversion.
+                * Create a new string object and string buffer
                 * (-1 because of extra separator included in string_length from above)
                 */
-               string_length--;
-               if (string_length > ACPI_MAX_STRING_CONVERSION) {       /* ACPI limit */
-                       return_ACPI_STATUS(AE_AML_STRING_LIMIT);
-               }
-
-               /* Create a new string object and string buffer */
-
                return_desc =
-                   acpi_ut_create_string_object((acpi_size) string_length);
+                   acpi_ut_create_string_object((acpi_size)
+                                                (string_length - 1));
                if (!return_desc) {
                        return_ACPI_STATUS(AE_NO_MEMORY);
                }
@@ -573,7 +569,7 @@ acpi_ex_convert_to_target_type(acpi_object_type destination_type,
 {
        acpi_status status = AE_OK;
 
-       ACPI_FUNCTION_TRACE("ex_convert_to_target_type");
+       ACPI_FUNCTION_TRACE(ex_convert_to_target_type);
 
        /* Default behavior */
 
@@ -647,7 +643,9 @@ acpi_ex_convert_to_target_type(acpi_object_type destination_type,
                        break;
 
                default:
-                       ACPI_REPORT_ERROR(("Bad destination type during conversion: %X\n", destination_type));
+                       ACPI_ERROR((AE_INFO,
+                                   "Bad destination type during conversion: %X",
+                                   destination_type));
                        status = AE_AML_INTERNAL;
                        break;
                }
@@ -660,17 +658,13 @@ acpi_ex_convert_to_target_type(acpi_object_type destination_type,
                break;
 
        default:
-               ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
-                                 "Unknown Target type ID 0x%X Op %s dest_type %s\n",
-                                 GET_CURRENT_ARG_TYPE(walk_state->op_info->
-                                                      runtime_args),
-                                 walk_state->op_info->name,
-                                 acpi_ut_get_type_name(destination_type)));
-
-               ACPI_REPORT_ERROR(("Bad Target Type (ARGI): %X\n",
-                                  GET_CURRENT_ARG_TYPE(walk_state->op_info->
-                                                       runtime_args)))
-                   status = AE_AML_INTERNAL;
+               ACPI_ERROR((AE_INFO,
+                           "Unknown Target type ID 0x%X AmlOpcode %X DestType %s",
+                           GET_CURRENT_ARG_TYPE(walk_state->op_info->
+                                                runtime_args),
+                           walk_state->opcode,
+                           acpi_ut_get_type_name(destination_type)));
+               status = AE_AML_INTERNAL;
        }
 
        /*