ACPICA: Core: Replace all %d format specifiers with %u (unsigned)
authorBob Moore <robert.moore@intel.com>
Wed, 26 May 2010 03:47:13 +0000 (11:47 +0800)
committerLen Brown <len.brown@intel.com>
Wed, 7 Jul 2010 02:33:55 +0000 (22:33 -0400)
With only a few exceptions, ACPICA does not use signed integers.
Therefore, %d is incorrect.

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>
drivers/acpi/acpica/dsmethod.c
drivers/acpi/acpica/dsmthdat.c
drivers/acpi/acpica/dsutils.c
drivers/acpi/acpica/exdump.c
drivers/acpi/acpica/exfldio.c
drivers/acpi/acpica/exprep.c
drivers/acpi/acpica/exregion.c
drivers/acpi/acpica/hwsleep.c
drivers/acpi/acpica/nsaccess.c
drivers/acpi/acpica/nsdump.c
drivers/acpi/acpica/nsparse.c

index 2a9a561c2f017110e4ac61dc3c38f3a9a7d073c7..00846333773eec656e6f8561ba38c2bdbfc5dcee 100644 (file)
@@ -605,7 +605,7 @@ acpi_ds_terminate_control_method(union acpi_operand_object *method_desc,
                 * we immediately reuse it for the next thread executing this method
                 */
                ACPI_DEBUG_PRINT((ACPI_DB_DISPATCH,
-                                 "*** Completed execution of one thread, %d threads remaining\n",
+                                 "*** Completed execution of one thread, %u threads remaining\n",
                                  method_desc->method.thread_count));
        } else {
                /* This is the only executing thread for this method */
index f3d52f59250b3146509a5caae7399dca00069b8c..d5e927f818a07e5ab7941ce8ff51727660e4bf93 100644 (file)
@@ -146,7 +146,7 @@ void acpi_ds_method_data_delete_all(struct acpi_walk_state *walk_state)
 
        for (index = 0; index < ACPI_METHOD_NUM_LOCALS; index++) {
                if (walk_state->local_variables[index].object) {
-                       ACPI_DEBUG_PRINT((ACPI_DB_EXEC, "Deleting Local%d=%p\n",
+                       ACPI_DEBUG_PRINT((ACPI_DB_EXEC, "Deleting Local%u=%p\n",
                                          index,
                                          walk_state->local_variables[index].
                                          object));
@@ -162,7 +162,7 @@ void acpi_ds_method_data_delete_all(struct acpi_walk_state *walk_state)
 
        for (index = 0; index < ACPI_METHOD_NUM_ARGS; index++) {
                if (walk_state->arguments[index].object) {
-                       ACPI_DEBUG_PRINT((ACPI_DB_EXEC, "Deleting Arg%d=%p\n",
+                       ACPI_DEBUG_PRINT((ACPI_DB_EXEC, "Deleting Arg%u=%p\n",
                                          index,
                                          walk_state->arguments[index].object));
 
@@ -226,7 +226,7 @@ acpi_ds_method_data_init_args(union acpi_operand_object **params,
                index++;
        }
 
-       ACPI_DEBUG_PRINT((ACPI_DB_EXEC, "%d args passed to method\n", index));
+       ACPI_DEBUG_PRINT((ACPI_DB_EXEC, "%u args passed to method\n", index));
        return_ACPI_STATUS(AE_OK);
 }
 
@@ -323,7 +323,7 @@ acpi_ds_method_data_set_value(u8 type,
        ACPI_FUNCTION_TRACE(ds_method_data_set_value);
 
        ACPI_DEBUG_PRINT((ACPI_DB_EXEC,
-                         "NewObj %p Type %2.2X, Refs=%d [%s]\n", object,
+                         "NewObj %p Type %2.2X, Refs=%u [%s]\n", object,
                          type, object->common.reference_count,
                          acpi_ut_get_type_name(object->common.type)));
 
@@ -543,7 +543,7 @@ acpi_ds_store_object_to_local(u8 type,
        union acpi_operand_object *new_obj_desc;
 
        ACPI_FUNCTION_TRACE(ds_store_object_to_local);
-       ACPI_DEBUG_PRINT((ACPI_DB_EXEC, "Type=%2.2X Index=%d Obj=%p\n",
+       ACPI_DEBUG_PRINT((ACPI_DB_EXEC, "Type=%2.2X Index=%u Obj=%p\n",
                          type, index, obj_desc));
 
        /* Parameter validation */
index 306c62ab2e88ccaacb60546373350c8aad294a97..15135c25aa9bc38e2e83f0ad70e0310c0d519381 100644 (file)
@@ -746,7 +746,7 @@ acpi_ds_create_operands(struct acpi_walk_state *walk_state,
                index--;
 
                ACPI_DEBUG_PRINT((ACPI_DB_DISPATCH,
-                                 "Arg #%d (%p) done, Arg1=%p\n", index, arg,
+                                 "Arg #%u (%p) done, Arg1=%p\n", index, arg,
                                  first_arg));
        }
 
@@ -760,7 +760,7 @@ acpi_ds_create_operands(struct acpi_walk_state *walk_state,
         */
        acpi_ds_obj_stack_pop_and_delete(arg_count, walk_state);
 
-       ACPI_EXCEPTION((AE_INFO, status, "While creating Arg %d", index));
+       ACPI_EXCEPTION((AE_INFO, status, "While creating Arg %u", index));
        return_ACPI_STATUS(status);
 }
 
index d39d438ba1e3468560d24bb991a47ae54e5ac127..cdb66d1e3fde291f59034078eaf16b86bd9e2c38 100644 (file)
@@ -742,7 +742,7 @@ acpi_ex_dump_operands(union acpi_operand_object **operands,
        }
 
        ACPI_DEBUG_PRINT((ACPI_DB_EXEC,
-                         "**** Start operand dump for opcode [%s], %d operands\n",
+                         "**** Start operand dump for opcode [%s], %u operands\n",
                          opcode_name, num_operands));
 
        if (num_operands == 0) {
@@ -945,7 +945,7 @@ acpi_ex_dump_package_obj(union acpi_operand_object *obj_desc,
 
        case ACPI_TYPE_PACKAGE:
 
-               acpi_os_printf("[Package] Contains %d Elements:\n",
+               acpi_os_printf("[Package] Contains %u Elements:\n",
                               obj_desc->package.count);
 
                for (i = 0; i < obj_desc->package.count; i++) {
index a6dc26f0b3be5cb6f679207d005033d4ae534bb9..047217303a4b748bf091a9a88454f37fc86e9400 100644 (file)
@@ -534,13 +534,13 @@ acpi_ex_field_datum_io(union acpi_operand_object *obj_desc,
        if (ACPI_SUCCESS(status)) {
                if (read_write == ACPI_READ) {
                        ACPI_DEBUG_PRINT((ACPI_DB_BFIELD,
-                                         "Value Read %8.8X%8.8X, Width %d\n",
+                                         "Value Read %8.8X%8.8X, Width %u\n",
                                          ACPI_FORMAT_UINT64(*value),
                                          obj_desc->common_field.
                                          access_byte_width));
                } else {
                        ACPI_DEBUG_PRINT((ACPI_DB_BFIELD,
-                                         "Value Written %8.8X%8.8X, Width %d\n",
+                                         "Value Written %8.8X%8.8X, Width %u\n",
                                          ACPI_FORMAT_UINT64(*value),
                                          obj_desc->common_field.
                                          access_byte_width));
index 25059dace0ad1af3bc2784b2e272c10ddf650d26..0686f271c61e5c19ff82a8bcf22bedbe66a37bcc 100644 (file)
@@ -108,11 +108,11 @@ acpi_ex_generate_access(u32 field_bit_offset,
        field_byte_length = field_byte_end_offset - field_byte_offset;
 
        ACPI_DEBUG_PRINT((ACPI_DB_BFIELD,
-                         "Bit length %d, Bit offset %d\n",
+                         "Bit length %u, Bit offset %u\n",
                          field_bit_length, field_bit_offset));
 
        ACPI_DEBUG_PRINT((ACPI_DB_BFIELD,
-                         "Byte Length %d, Byte Offset %d, End Offset %d\n",
+                         "Byte Length %u, Byte Offset %u, End Offset %u\n",
                          field_byte_length, field_byte_offset,
                          field_byte_end_offset));
 
@@ -147,11 +147,11 @@ acpi_ex_generate_access(u32 field_bit_offset,
                        accesses = field_end_offset - field_start_offset;
 
                        ACPI_DEBUG_PRINT((ACPI_DB_BFIELD,
-                                         "AccessWidth %d end is within region\n",
+                                         "AccessWidth %u end is within region\n",
                                          access_byte_width));
 
                        ACPI_DEBUG_PRINT((ACPI_DB_BFIELD,
-                                         "Field Start %d, Field End %d -- requires %d accesses\n",
+                                         "Field Start %u, Field End %u -- requires %u accesses\n",
                                          field_start_offset, field_end_offset,
                                          accesses));
 
@@ -159,7 +159,7 @@ acpi_ex_generate_access(u32 field_bit_offset,
 
                        if (accesses <= 1) {
                                ACPI_DEBUG_PRINT((ACPI_DB_BFIELD,
-                                                 "Entire field can be accessed with one operation of size %d\n",
+                                                 "Entire field can be accessed with one operation of size %u\n",
                                                  access_byte_width));
                                return_VALUE(access_byte_width);
                        }
@@ -174,7 +174,7 @@ acpi_ex_generate_access(u32 field_bit_offset,
                        }
                } else {
                        ACPI_DEBUG_PRINT((ACPI_DB_BFIELD,
-                                         "AccessWidth %d end is NOT within region\n",
+                                         "AccessWidth %u end is NOT within region\n",
                                          access_byte_width));
                        if (access_byte_width == 1) {
                                ACPI_DEBUG_PRINT((ACPI_DB_BFIELD,
@@ -190,7 +190,7 @@ acpi_ex_generate_access(u32 field_bit_offset,
                         * previous access
                         */
                        ACPI_DEBUG_PRINT((ACPI_DB_BFIELD,
-                                         "Backing off to previous optimal access width of %d\n",
+                                         "Backing off to previous optimal access width of %u\n",
                                          minimum_access_width));
                        return_VALUE(minimum_access_width);
                }
index 531000fc77d2e15afb4a97107ab00dadab3b6a47..8819d2ac5aee73b0eb8a4bf205b9c1efa7abb5ab 100644 (file)
@@ -194,7 +194,7 @@ acpi_ex_system_memory_space_handler(u32 function,
            ((u64) address - (u64) mem_info->mapped_physical_address);
 
        ACPI_DEBUG_PRINT((ACPI_DB_INFO,
-                         "System-Memory (width %d) R/W %d Address=%8.8X%8.8X\n",
+                         "System-Memory (width %u) R/W %u Address=%8.8X%8.8X\n",
                          bit_width, function,
                          ACPI_FORMAT_NATIVE_UINT(address)));
 
@@ -297,7 +297,7 @@ acpi_ex_system_io_space_handler(u32 function,
        ACPI_FUNCTION_TRACE(ex_system_io_space_handler);
 
        ACPI_DEBUG_PRINT((ACPI_DB_INFO,
-                         "System-IO (width %d) R/W %d Address=%8.8X%8.8X\n",
+                         "System-IO (width %u) R/W %u Address=%8.8X%8.8X\n",
                          bit_width, function,
                          ACPI_FORMAT_NATIVE_UINT(address)));
 
@@ -373,7 +373,7 @@ acpi_ex_pci_config_space_handler(u32 function,
        pci_register = (u16) (u32) address;
 
        ACPI_DEBUG_PRINT((ACPI_DB_INFO,
-                         "Pci-Config %d (%d) Seg(%04x) Bus(%04x) Dev(%04x) Func(%04x) Reg(%04x)\n",
+                         "Pci-Config %u (%u) Seg(%04x) Bus(%04x) Dev(%04x) Func(%04x) Reg(%04x)\n",
                          function, bit_width, pci_id->segment, pci_id->bus,
                          pci_id->device, pci_id->function, pci_register));
 
index 36eb803dd9d0629f39afba450b928aae5734119b..3796811276ac51e73104ff1baed329225dfd6ee8 100644 (file)
@@ -307,7 +307,7 @@ acpi_status asmlinkage acpi_enter_sleep_state(u8 sleep_state)
                return_ACPI_STATUS(status);
        }
        ACPI_DEBUG_PRINT((ACPI_DB_INIT,
-                         "Entering sleep state [S%d]\n", sleep_state));
+                         "Entering sleep state [S%u]\n", sleep_state));
 
        /* Clear the SLP_EN and SLP_TYP fields */
 
index 3a2814676ac361dbdf41fd19d338cbc1668236fd..2cebfa94b79aa0313ef17dd19716776552c9a28f 100644 (file)
@@ -433,7 +433,7 @@ acpi_ns_lookup(union acpi_generic_state *scope_info,
 
                        if (search_parent_flag == ACPI_NS_NO_UPSEARCH) {
                                ACPI_DEBUG_PRINT((ACPI_DB_NAMES,
-                                                 "Search scope is [%4.4s], path has %d carat(s)\n",
+                                                 "Search scope is [%4.4s], path has %u carat(s)\n",
                                                  acpi_ut_get_node_name
                                                  (this_node), num_carats));
                        }
@@ -495,7 +495,7 @@ acpi_ns_lookup(union acpi_generic_state *scope_info,
                        path++;
 
                        ACPI_DEBUG_PRINT((ACPI_DB_NAMES,
-                                         "Multi Pathname (%d Segments, Flags=%X)\n",
+                                         "Multi Pathname (%u Segments, Flags=%X)\n",
                                          num_segments, flags));
                        break;
 
index 2110cc2360f038139b3dfd5f510dc600e479173b..a54dc39e304b2e2a0c34835aca4464b17032d251 100644 (file)
@@ -441,7 +441,7 @@ acpi_ns_dump_one_object(acpi_handle obj_handle,
                        return (AE_OK);
                }
 
-               acpi_os_printf("(R%d)", obj_desc->common.reference_count);
+               acpi_os_printf("(R%u)", obj_desc->common.reference_count);
 
                switch (type) {
                case ACPI_TYPE_METHOD:
index 27cda52c76bcf1a81d7550cd4fae01f5d4c3d414..5808c89e9fac1638d26a240a42482baf72c8f7e8 100644 (file)
@@ -136,8 +136,8 @@ acpi_ns_one_complete_parse(u32 pass_number,
 
        /* Parse the AML */
 
-       ACPI_DEBUG_PRINT((ACPI_DB_PARSE, "*PARSE* pass %d parse\n",
-                         (unsigned)pass_number));
+       ACPI_DEBUG_PRINT((ACPI_DB_PARSE, "*PARSE* pass %u parse\n",
+                         pass_number));
        status = acpi_ps_parse_aml(walk_state);
 
       cleanup: