aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBob Moore <robert.moore@intel.com>2008-04-10 11:06:40 -0400
committerLen Brown <len.brown@intel.com>2008-04-22 14:29:27 -0400
commit1d18c05825c3f2b8933a7fc7f7528881e98deb04 (patch)
tree8b0a1ed08c4281451899d28785b936369b77b91d
parent39adb11e56d8eef6169aeae38f65df26883ff49c (diff)
ACPICA: Cosmetic changes only, no functional changes
Lint changes, fix compiler warnings, etc. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
-rw-r--r--drivers/acpi/events/evmisc.c7
-rw-r--r--drivers/acpi/events/evregion.c2
-rw-r--r--drivers/acpi/hardware/hwsleep.c14
-rw-r--r--drivers/acpi/namespace/nsdump.c9
-rw-r--r--drivers/acpi/namespace/nsload.c2
-rw-r--r--drivers/acpi/namespace/nsnames.c2
-rw-r--r--drivers/acpi/namespace/nsparse.c17
-rw-r--r--drivers/acpi/resources/rscalc.c6
-rw-r--r--drivers/acpi/resources/rsutils.c6
-rw-r--r--drivers/acpi/utilities/utalloc.c2
-rw-r--r--drivers/acpi/utilities/utcopy.c2
-rw-r--r--drivers/acpi/utilities/utdebug.c10
-rw-r--r--drivers/acpi/utilities/utglobal.c2
13 files changed, 44 insertions, 37 deletions
diff --git a/drivers/acpi/events/evmisc.c b/drivers/acpi/events/evmisc.c
index d075062f5b89..4e7a13afe80c 100644
--- a/drivers/acpi/events/evmisc.c
+++ b/drivers/acpi/events/evmisc.c
@@ -349,9 +349,10 @@ acpi_status acpi_ev_init_global_lock_handler(void)
349 349
350 ACPI_FUNCTION_TRACE(ev_init_global_lock_handler); 350 ACPI_FUNCTION_TRACE(ev_init_global_lock_handler);
351 351
352 status = 352 status = acpi_get_table_by_index(ACPI_TABLE_INDEX_FACS,
353 acpi_get_table_by_index(ACPI_TABLE_INDEX_FACS, 353 ACPI_CAST_INDIRECT_PTR(struct
354 (struct acpi_table_header **)&facs); 354 acpi_table_header,
355 &facs));
355 if (ACPI_FAILURE(status)) { 356 if (ACPI_FAILURE(status)) {
356 return_ACPI_STATUS(status); 357 return_ACPI_STATUS(status);
357 } 358 }
diff --git a/drivers/acpi/events/evregion.c b/drivers/acpi/events/evregion.c
index 58ad09725dd2..03624e94778e 100644
--- a/drivers/acpi/events/evregion.c
+++ b/drivers/acpi/events/evregion.c
@@ -394,7 +394,7 @@ acpi_ev_address_space_dispatch(union acpi_operand_object *region_obj,
394 ACPI_DEBUG_PRINT((ACPI_DB_OPREGION, 394 ACPI_DEBUG_PRINT((ACPI_DB_OPREGION,
395 "Handler %p (@%p) Address %8.8X%8.8X [%s]\n", 395 "Handler %p (@%p) Address %8.8X%8.8X [%s]\n",
396 &region_obj->region.handler->address_space, handler, 396 &region_obj->region.handler->address_space, handler,
397 ACPI_FORMAT_UINT64(address), 397 ACPI_FORMAT_NATIVE_UINT(address),
398 acpi_ut_get_region_name(region_obj->region. 398 acpi_ut_get_region_name(region_obj->region.
399 space_id))); 399 space_id)));
400 400
diff --git a/drivers/acpi/hardware/hwsleep.c b/drivers/acpi/hardware/hwsleep.c
index 4290e0193097..202f11af3689 100644
--- a/drivers/acpi/hardware/hwsleep.c
+++ b/drivers/acpi/hardware/hwsleep.c
@@ -70,9 +70,10 @@ acpi_set_firmware_waking_vector(acpi_physical_address physical_address)
70 70
71 /* Get the FACS */ 71 /* Get the FACS */
72 72
73 status = 73 status = acpi_get_table_by_index(ACPI_TABLE_INDEX_FACS,
74 acpi_get_table_by_index(ACPI_TABLE_INDEX_FACS, 74 ACPI_CAST_INDIRECT_PTR(struct
75 (struct acpi_table_header **)&facs); 75 acpi_table_header,
76 &facs));
76 if (ACPI_FAILURE(status)) { 77 if (ACPI_FAILURE(status)) {
77 return_ACPI_STATUS(status); 78 return_ACPI_STATUS(status);
78 } 79 }
@@ -124,9 +125,10 @@ acpi_get_firmware_waking_vector(acpi_physical_address * physical_address)
124 125
125 /* Get the FACS */ 126 /* Get the FACS */
126 127
127 status = 128 status = acpi_get_table_by_index(ACPI_TABLE_INDEX_FACS,
128 acpi_get_table_by_index(ACPI_TABLE_INDEX_FACS, 129 ACPI_CAST_INDIRECT_PTR(struct
129 (struct acpi_table_header **)&facs); 130 acpi_table_header,
131 &facs));
130 if (ACPI_FAILURE(status)) { 132 if (ACPI_FAILURE(status)) {
131 return_ACPI_STATUS(status); 133 return_ACPI_STATUS(status);
132 } 134 }
diff --git a/drivers/acpi/namespace/nsdump.c b/drivers/acpi/namespace/nsdump.c
index 1fc4f86676e1..3068e20911f4 100644
--- a/drivers/acpi/namespace/nsdump.c
+++ b/drivers/acpi/namespace/nsdump.c
@@ -249,7 +249,9 @@ acpi_ns_dump_one_object(acpi_handle obj_handle,
249 acpi_os_printf("ID %X Len %.4X Addr %p\n", 249 acpi_os_printf("ID %X Len %.4X Addr %p\n",
250 obj_desc->processor.proc_id, 250 obj_desc->processor.proc_id,
251 obj_desc->processor.length, 251 obj_desc->processor.length,
252 (char *)obj_desc->processor.address); 252 ACPI_CAST_PTR(void,
253 obj_desc->processor.
254 address));
253 break; 255 break;
254 256
255 case ACPI_TYPE_DEVICE: 257 case ACPI_TYPE_DEVICE:
@@ -320,9 +322,8 @@ acpi_ns_dump_one_object(acpi_handle obj_handle,
320 space_id)); 322 space_id));
321 if (obj_desc->region.flags & AOPOBJ_DATA_VALID) { 323 if (obj_desc->region.flags & AOPOBJ_DATA_VALID) {
322 acpi_os_printf(" Addr %8.8X%8.8X Len %.4X\n", 324 acpi_os_printf(" Addr %8.8X%8.8X Len %.4X\n",
323 ACPI_FORMAT_UINT64(obj_desc-> 325 ACPI_FORMAT_NATIVE_UINT
324 region. 326 (obj_desc->region.address),
325 address),
326 obj_desc->region.length); 327 obj_desc->region.length);
327 } else { 328 } else {
328 acpi_os_printf 329 acpi_os_printf
diff --git a/drivers/acpi/namespace/nsload.c b/drivers/acpi/namespace/nsload.c
index 545010dfd835..1bfcb6f3f44f 100644
--- a/drivers/acpi/namespace/nsload.c
+++ b/drivers/acpi/namespace/nsload.c
@@ -111,7 +111,7 @@ acpi_ns_load_table(acpi_native_uint table_index,
111 if (ACPI_SUCCESS(status)) { 111 if (ACPI_SUCCESS(status)) {
112 acpi_tb_set_table_loaded_flag(table_index, TRUE); 112 acpi_tb_set_table_loaded_flag(table_index, TRUE);
113 } else { 113 } else {
114 acpi_tb_release_owner_id(table_index); 114 (void)acpi_tb_release_owner_id(table_index);
115 } 115 }
116 116
117 unlock: 117 unlock:
diff --git a/drivers/acpi/namespace/nsnames.c b/drivers/acpi/namespace/nsnames.c
index e14a1412656b..ba1a4f00ba12 100644
--- a/drivers/acpi/namespace/nsnames.c
+++ b/drivers/acpi/namespace/nsnames.c
@@ -182,7 +182,7 @@ acpi_size acpi_ns_get_pathname_length(struct acpi_namespace_node *node)
182 while (next_node && (next_node != acpi_gbl_root_node)) { 182 while (next_node && (next_node != acpi_gbl_root_node)) {
183 if (ACPI_GET_DESCRIPTOR_TYPE(next_node) != ACPI_DESC_TYPE_NAMED) { 183 if (ACPI_GET_DESCRIPTOR_TYPE(next_node) != ACPI_DESC_TYPE_NAMED) {
184 ACPI_ERROR((AE_INFO, 184 ACPI_ERROR((AE_INFO,
185 "Invalid NS Node (%X) while traversing path", 185 "Invalid NS Node (%p) while traversing path",
186 next_node)); 186 next_node));
187 return 0; 187 return 0;
188 } 188 }
diff --git a/drivers/acpi/namespace/nsparse.c b/drivers/acpi/namespace/nsparse.c
index 86bd6e5920c7..f260b6941c13 100644
--- a/drivers/acpi/namespace/nsparse.c
+++ b/drivers/acpi/namespace/nsparse.c
@@ -112,21 +112,25 @@ acpi_ns_one_complete_parse(acpi_native_uint pass_number,
112 aml_start = (u8 *) table + sizeof(struct acpi_table_header); 112 aml_start = (u8 *) table + sizeof(struct acpi_table_header);
113 aml_length = table->length - sizeof(struct acpi_table_header); 113 aml_length = table->length - sizeof(struct acpi_table_header);
114 status = acpi_ds_init_aml_walk(walk_state, parse_root, NULL, 114 status = acpi_ds_init_aml_walk(walk_state, parse_root, NULL,
115 aml_start, aml_length, NULL, 115 aml_start, (u32) aml_length,
116 (u8) pass_number); 116 NULL, (u8) pass_number);
117 } 117 }
118 118
119 if (ACPI_FAILURE(status)) { 119 if (ACPI_FAILURE(status)) {
120 acpi_ds_delete_walk_state(walk_state); 120 acpi_ds_delete_walk_state(walk_state);
121 acpi_ps_delete_parse_tree(parse_root); 121 goto cleanup;
122 return_ACPI_STATUS(status);
123 } 122 }
124 123
125 /* start_node is the default location to load the table */ 124 /* start_node is the default location to load the table */
126 125
127 if (start_node && start_node != acpi_gbl_root_node) { 126 if (start_node && start_node != acpi_gbl_root_node) {
128 acpi_ds_scope_stack_push(start_node, ACPI_TYPE_METHOD, 127 status =
129 walk_state); 128 acpi_ds_scope_stack_push(start_node, ACPI_TYPE_METHOD,
129 walk_state);
130 if (ACPI_FAILURE(status)) {
131 acpi_ds_delete_walk_state(walk_state);
132 goto cleanup;
133 }
130 } 134 }
131 135
132 /* Parse the AML */ 136 /* Parse the AML */
@@ -135,6 +139,7 @@ acpi_ns_one_complete_parse(acpi_native_uint pass_number,
135 (unsigned)pass_number)); 139 (unsigned)pass_number));
136 status = acpi_ps_parse_aml(walk_state); 140 status = acpi_ps_parse_aml(walk_state);
137 141
142 cleanup:
138 acpi_ps_delete_parse_tree(parse_root); 143 acpi_ps_delete_parse_tree(parse_root);
139 return_ACPI_STATUS(status); 144 return_ACPI_STATUS(status);
140} 145}
diff --git a/drivers/acpi/resources/rscalc.c b/drivers/acpi/resources/rscalc.c
index 0dd2ce8a3475..dcc51e92ac92 100644
--- a/drivers/acpi/resources/rscalc.c
+++ b/drivers/acpi/resources/rscalc.c
@@ -73,7 +73,7 @@ acpi_rs_stream_option_length(u32 resource_length, u32 minimum_total_length);
73 73
74static u8 acpi_rs_count_set_bits(u16 bit_field) 74static u8 acpi_rs_count_set_bits(u16 bit_field)
75{ 75{
76 u8 bits_set; 76 acpi_native_uint bits_set;
77 77
78 ACPI_FUNCTION_ENTRY(); 78 ACPI_FUNCTION_ENTRY();
79 79
@@ -81,10 +81,10 @@ static u8 acpi_rs_count_set_bits(u16 bit_field)
81 81
82 /* Zero the least significant bit that is set */ 82 /* Zero the least significant bit that is set */
83 83
84 bit_field &= (bit_field - 1); 84 bit_field &= (u16) (bit_field - 1);
85 } 85 }
86 86
87 return (bits_set); 87 return ((u8) bits_set);
88} 88}
89 89
90/******************************************************************************* 90/*******************************************************************************
diff --git a/drivers/acpi/resources/rsutils.c b/drivers/acpi/resources/rsutils.c
index 11c0bd7b9cfd..935a4827e7ab 100644
--- a/drivers/acpi/resources/rsutils.c
+++ b/drivers/acpi/resources/rsutils.c
@@ -97,17 +97,17 @@ u8 acpi_rs_decode_bitmask(u16 mask, u8 * list)
97u16 acpi_rs_encode_bitmask(u8 * list, u8 count) 97u16 acpi_rs_encode_bitmask(u8 * list, u8 count)
98{ 98{
99 acpi_native_uint i; 99 acpi_native_uint i;
100 u16 mask; 100 acpi_native_uint mask;
101 101
102 ACPI_FUNCTION_ENTRY(); 102 ACPI_FUNCTION_ENTRY();
103 103
104 /* Encode the list into a single bitmask */ 104 /* Encode the list into a single bitmask */
105 105
106 for (i = 0, mask = 0; i < count; i++) { 106 for (i = 0, mask = 0; i < count; i++) {
107 mask |= (0x0001 << list[i]); 107 mask |= (0x1 << list[i]);
108 } 108 }
109 109
110 return (mask); 110 return ((u16) mask);
111} 111}
112 112
113/******************************************************************************* 113/*******************************************************************************
diff --git a/drivers/acpi/utilities/utalloc.c b/drivers/acpi/utilities/utalloc.c
index 6e56d5f7c43a..181e66986fa9 100644
--- a/drivers/acpi/utilities/utalloc.c
+++ b/drivers/acpi/utilities/utalloc.c
@@ -147,7 +147,7 @@ acpi_status acpi_ut_delete_caches(void)
147 147
148 if (acpi_gbl_display_final_mem_stats) { 148 if (acpi_gbl_display_final_mem_stats) {
149 ACPI_STRCPY(buffer, "MEMORY"); 149 ACPI_STRCPY(buffer, "MEMORY");
150 acpi_db_display_statistics(buffer); 150 (void)acpi_db_display_statistics(buffer);
151 } 151 }
152#endif 152#endif
153 153
diff --git a/drivers/acpi/utilities/utcopy.c b/drivers/acpi/utilities/utcopy.c
index 879eaa10d3ae..b56953d2b59e 100644
--- a/drivers/acpi/utilities/utcopy.c
+++ b/drivers/acpi/utilities/utcopy.c
@@ -570,7 +570,7 @@ acpi_ut_copy_epackage_to_ipackage(union acpi_object *external_object,
570 570
571 /* Truncate package and delete it */ 571 /* Truncate package and delete it */
572 572
573 package_object->package.count = i; 573 package_object->package.count = (u32) i;
574 package_elements[i] = NULL; 574 package_elements[i] = NULL;
575 acpi_ut_remove_reference(package_object); 575 acpi_ut_remove_reference(package_object);
576 return_ACPI_STATUS(status); 576 return_ACPI_STATUS(status);
diff --git a/drivers/acpi/utilities/utdebug.c b/drivers/acpi/utilities/utdebug.c
index a9148677f037..2d6a78fb01cf 100644
--- a/drivers/acpi/utilities/utdebug.c
+++ b/drivers/acpi/utilities/utdebug.c
@@ -68,9 +68,9 @@ static const char *acpi_ut_trim_function_name(const char *function_name);
68 68
69void acpi_ut_init_stack_ptr_trace(void) 69void acpi_ut_init_stack_ptr_trace(void)
70{ 70{
71 u32 current_sp; 71 acpi_size current_sp;
72 72
73 acpi_gbl_entry_stack_pointer = ACPI_PTR_DIFF(&current_sp, NULL); 73 acpi_gbl_entry_stack_pointer = &current_sp;
74} 74}
75 75
76/******************************************************************************* 76/*******************************************************************************
@@ -89,10 +89,8 @@ void acpi_ut_track_stack_ptr(void)
89{ 89{
90 acpi_size current_sp; 90 acpi_size current_sp;
91 91
92 current_sp = ACPI_PTR_DIFF(&current_sp, NULL); 92 if (&current_sp < acpi_gbl_lowest_stack_pointer) {
93 93 acpi_gbl_lowest_stack_pointer = &current_sp;
94 if (current_sp < acpi_gbl_lowest_stack_pointer) {
95 acpi_gbl_lowest_stack_pointer = current_sp;
96 } 94 }
97 95
98 if (acpi_gbl_nesting_level > acpi_gbl_deepest_nesting) { 96 if (acpi_gbl_nesting_level > acpi_gbl_deepest_nesting) {
diff --git a/drivers/acpi/utilities/utglobal.c b/drivers/acpi/utilities/utglobal.c
index 44425433075a..d2097ded262d 100644
--- a/drivers/acpi/utilities/utglobal.c
+++ b/drivers/acpi/utilities/utglobal.c
@@ -723,7 +723,7 @@ void acpi_ut_init_globals(void)
723 acpi_gbl_root_node_struct.flags = ANOBJ_END_OF_PEER_LIST; 723 acpi_gbl_root_node_struct.flags = ANOBJ_END_OF_PEER_LIST;
724 724
725#ifdef ACPI_DEBUG_OUTPUT 725#ifdef ACPI_DEBUG_OUTPUT
726 acpi_gbl_lowest_stack_pointer = ACPI_SIZE_MAX; 726 acpi_gbl_lowest_stack_pointer = ACPI_CAST_PTR(acpi_size, ACPI_SIZE_MAX);
727#endif 727#endif
728 728
729#ifdef ACPI_DBG_TRACK_ALLOCATIONS 729#ifdef ACPI_DBG_TRACK_ALLOCATIONS