Commit b27d6597 authored by Bob Moore's avatar Bob Moore Committed by Len Brown

ACPICA: Core: Replace all %d format specifiers with %u (unsigned)

With only a few exceptions, ACPICA does not use signed integers.
Therefore, %d is incorrect.
Signed-off-by: default avatarBob Moore <robert.moore@intel.com>
Signed-off-by: default avatarLin Ming <ming.m.lin@intel.com>
Signed-off-by: default avatarLen Brown <len.brown@intel.com>
parent 96b7b7ad
...@@ -605,7 +605,7 @@ acpi_ds_terminate_control_method(union acpi_operand_object *method_desc, ...@@ -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 * we immediately reuse it for the next thread executing this method
*/ */
ACPI_DEBUG_PRINT((ACPI_DB_DISPATCH, 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)); method_desc->method.thread_count));
} else { } else {
/* This is the only executing thread for this method */ /* This is the only executing thread for this method */
......
...@@ -146,7 +146,7 @@ void acpi_ds_method_data_delete_all(struct acpi_walk_state *walk_state) ...@@ -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++) { for (index = 0; index < ACPI_METHOD_NUM_LOCALS; index++) {
if (walk_state->local_variables[index].object) { 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, index,
walk_state->local_variables[index]. walk_state->local_variables[index].
object)); object));
...@@ -162,7 +162,7 @@ void acpi_ds_method_data_delete_all(struct acpi_walk_state *walk_state) ...@@ -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++) { for (index = 0; index < ACPI_METHOD_NUM_ARGS; index++) {
if (walk_state->arguments[index].object) { 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, index,
walk_state->arguments[index].object)); walk_state->arguments[index].object));
...@@ -226,7 +226,7 @@ acpi_ds_method_data_init_args(union acpi_operand_object **params, ...@@ -226,7 +226,7 @@ acpi_ds_method_data_init_args(union acpi_operand_object **params,
index++; 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); return_ACPI_STATUS(AE_OK);
} }
...@@ -323,7 +323,7 @@ acpi_ds_method_data_set_value(u8 type, ...@@ -323,7 +323,7 @@ acpi_ds_method_data_set_value(u8 type,
ACPI_FUNCTION_TRACE(ds_method_data_set_value); ACPI_FUNCTION_TRACE(ds_method_data_set_value);
ACPI_DEBUG_PRINT((ACPI_DB_EXEC, 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, type, object->common.reference_count,
acpi_ut_get_type_name(object->common.type))); acpi_ut_get_type_name(object->common.type)));
...@@ -543,7 +543,7 @@ acpi_ds_store_object_to_local(u8 type, ...@@ -543,7 +543,7 @@ acpi_ds_store_object_to_local(u8 type,
union acpi_operand_object *new_obj_desc; union acpi_operand_object *new_obj_desc;
ACPI_FUNCTION_TRACE(ds_store_object_to_local); 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)); type, index, obj_desc));
/* Parameter validation */ /* Parameter validation */
......
...@@ -746,7 +746,7 @@ acpi_ds_create_operands(struct acpi_walk_state *walk_state, ...@@ -746,7 +746,7 @@ acpi_ds_create_operands(struct acpi_walk_state *walk_state,
index--; index--;
ACPI_DEBUG_PRINT((ACPI_DB_DISPATCH, 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)); first_arg));
} }
...@@ -760,7 +760,7 @@ acpi_ds_create_operands(struct acpi_walk_state *walk_state, ...@@ -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_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); return_ACPI_STATUS(status);
} }
......
...@@ -742,7 +742,7 @@ acpi_ex_dump_operands(union acpi_operand_object **operands, ...@@ -742,7 +742,7 @@ acpi_ex_dump_operands(union acpi_operand_object **operands,
} }
ACPI_DEBUG_PRINT((ACPI_DB_EXEC, 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)); opcode_name, num_operands));
if (num_operands == 0) { if (num_operands == 0) {
...@@ -945,7 +945,7 @@ acpi_ex_dump_package_obj(union acpi_operand_object *obj_desc, ...@@ -945,7 +945,7 @@ acpi_ex_dump_package_obj(union acpi_operand_object *obj_desc,
case ACPI_TYPE_PACKAGE: case ACPI_TYPE_PACKAGE:
acpi_os_printf("[Package] Contains %d Elements:\n", acpi_os_printf("[Package] Contains %u Elements:\n",
obj_desc->package.count); obj_desc->package.count);
for (i = 0; i < obj_desc->package.count; i++) { for (i = 0; i < obj_desc->package.count; i++) {
......
...@@ -534,13 +534,13 @@ acpi_ex_field_datum_io(union acpi_operand_object *obj_desc, ...@@ -534,13 +534,13 @@ acpi_ex_field_datum_io(union acpi_operand_object *obj_desc,
if (ACPI_SUCCESS(status)) { if (ACPI_SUCCESS(status)) {
if (read_write == ACPI_READ) { if (read_write == ACPI_READ) {
ACPI_DEBUG_PRINT((ACPI_DB_BFIELD, 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), ACPI_FORMAT_UINT64(*value),
obj_desc->common_field. obj_desc->common_field.
access_byte_width)); access_byte_width));
} else { } else {
ACPI_DEBUG_PRINT((ACPI_DB_BFIELD, 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), ACPI_FORMAT_UINT64(*value),
obj_desc->common_field. obj_desc->common_field.
access_byte_width)); access_byte_width));
......
...@@ -108,11 +108,11 @@ acpi_ex_generate_access(u32 field_bit_offset, ...@@ -108,11 +108,11 @@ acpi_ex_generate_access(u32 field_bit_offset,
field_byte_length = field_byte_end_offset - field_byte_offset; field_byte_length = field_byte_end_offset - field_byte_offset;
ACPI_DEBUG_PRINT((ACPI_DB_BFIELD, 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)); field_bit_length, field_bit_offset));
ACPI_DEBUG_PRINT((ACPI_DB_BFIELD, 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_length, field_byte_offset,
field_byte_end_offset)); field_byte_end_offset));
...@@ -147,11 +147,11 @@ acpi_ex_generate_access(u32 field_bit_offset, ...@@ -147,11 +147,11 @@ acpi_ex_generate_access(u32 field_bit_offset,
accesses = field_end_offset - field_start_offset; accesses = field_end_offset - field_start_offset;
ACPI_DEBUG_PRINT((ACPI_DB_BFIELD, ACPI_DEBUG_PRINT((ACPI_DB_BFIELD,
"AccessWidth %d end is within region\n", "AccessWidth %u end is within region\n",
access_byte_width)); access_byte_width));
ACPI_DEBUG_PRINT((ACPI_DB_BFIELD, 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, field_start_offset, field_end_offset,
accesses)); accesses));
...@@ -159,7 +159,7 @@ acpi_ex_generate_access(u32 field_bit_offset, ...@@ -159,7 +159,7 @@ acpi_ex_generate_access(u32 field_bit_offset,
if (accesses <= 1) { if (accesses <= 1) {
ACPI_DEBUG_PRINT((ACPI_DB_BFIELD, 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)); access_byte_width));
return_VALUE(access_byte_width); return_VALUE(access_byte_width);
} }
...@@ -174,7 +174,7 @@ acpi_ex_generate_access(u32 field_bit_offset, ...@@ -174,7 +174,7 @@ acpi_ex_generate_access(u32 field_bit_offset,
} }
} else { } else {
ACPI_DEBUG_PRINT((ACPI_DB_BFIELD, 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)); access_byte_width));
if (access_byte_width == 1) { if (access_byte_width == 1) {
ACPI_DEBUG_PRINT((ACPI_DB_BFIELD, ACPI_DEBUG_PRINT((ACPI_DB_BFIELD,
...@@ -190,7 +190,7 @@ acpi_ex_generate_access(u32 field_bit_offset, ...@@ -190,7 +190,7 @@ acpi_ex_generate_access(u32 field_bit_offset,
* previous access * previous access
*/ */
ACPI_DEBUG_PRINT((ACPI_DB_BFIELD, 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)); minimum_access_width));
return_VALUE(minimum_access_width); return_VALUE(minimum_access_width);
} }
......
...@@ -194,7 +194,7 @@ acpi_ex_system_memory_space_handler(u32 function, ...@@ -194,7 +194,7 @@ acpi_ex_system_memory_space_handler(u32 function,
((u64) address - (u64) mem_info->mapped_physical_address); ((u64) address - (u64) mem_info->mapped_physical_address);
ACPI_DEBUG_PRINT((ACPI_DB_INFO, 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, bit_width, function,
ACPI_FORMAT_NATIVE_UINT(address))); ACPI_FORMAT_NATIVE_UINT(address)));
...@@ -297,7 +297,7 @@ acpi_ex_system_io_space_handler(u32 function, ...@@ -297,7 +297,7 @@ acpi_ex_system_io_space_handler(u32 function,
ACPI_FUNCTION_TRACE(ex_system_io_space_handler); ACPI_FUNCTION_TRACE(ex_system_io_space_handler);
ACPI_DEBUG_PRINT((ACPI_DB_INFO, 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, bit_width, function,
ACPI_FORMAT_NATIVE_UINT(address))); ACPI_FORMAT_NATIVE_UINT(address)));
...@@ -373,7 +373,7 @@ acpi_ex_pci_config_space_handler(u32 function, ...@@ -373,7 +373,7 @@ acpi_ex_pci_config_space_handler(u32 function,
pci_register = (u16) (u32) address; pci_register = (u16) (u32) address;
ACPI_DEBUG_PRINT((ACPI_DB_INFO, 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, function, bit_width, pci_id->segment, pci_id->bus,
pci_id->device, pci_id->function, pci_register)); pci_id->device, pci_id->function, pci_register));
......
...@@ -307,7 +307,7 @@ acpi_status asmlinkage acpi_enter_sleep_state(u8 sleep_state) ...@@ -307,7 +307,7 @@ acpi_status asmlinkage acpi_enter_sleep_state(u8 sleep_state)
return_ACPI_STATUS(status); return_ACPI_STATUS(status);
} }
ACPI_DEBUG_PRINT((ACPI_DB_INIT, 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 */ /* Clear the SLP_EN and SLP_TYP fields */
......
...@@ -433,7 +433,7 @@ acpi_ns_lookup(union acpi_generic_state *scope_info, ...@@ -433,7 +433,7 @@ acpi_ns_lookup(union acpi_generic_state *scope_info,
if (search_parent_flag == ACPI_NS_NO_UPSEARCH) { if (search_parent_flag == ACPI_NS_NO_UPSEARCH) {
ACPI_DEBUG_PRINT((ACPI_DB_NAMES, 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 acpi_ut_get_node_name
(this_node), num_carats)); (this_node), num_carats));
} }
...@@ -495,7 +495,7 @@ acpi_ns_lookup(union acpi_generic_state *scope_info, ...@@ -495,7 +495,7 @@ acpi_ns_lookup(union acpi_generic_state *scope_info,
path++; path++;
ACPI_DEBUG_PRINT((ACPI_DB_NAMES, ACPI_DEBUG_PRINT((ACPI_DB_NAMES,
"Multi Pathname (%d Segments, Flags=%X)\n", "Multi Pathname (%u Segments, Flags=%X)\n",
num_segments, flags)); num_segments, flags));
break; break;
......
...@@ -441,7 +441,7 @@ acpi_ns_dump_one_object(acpi_handle obj_handle, ...@@ -441,7 +441,7 @@ acpi_ns_dump_one_object(acpi_handle obj_handle,
return (AE_OK); 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) { switch (type) {
case ACPI_TYPE_METHOD: case ACPI_TYPE_METHOD:
......
...@@ -136,8 +136,8 @@ acpi_ns_one_complete_parse(u32 pass_number, ...@@ -136,8 +136,8 @@ acpi_ns_one_complete_parse(u32 pass_number,
/* Parse the AML */ /* Parse the AML */
ACPI_DEBUG_PRINT((ACPI_DB_PARSE, "*PARSE* pass %d parse\n", ACPI_DEBUG_PRINT((ACPI_DB_PARSE, "*PARSE* pass %u parse\n",
(unsigned)pass_number)); pass_number));
status = acpi_ps_parse_aml(walk_state); status = acpi_ps_parse_aml(walk_state);
cleanup: cleanup:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment