aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLv Zheng <lv.zheng@intel.com>2016-05-05 00:57:53 -0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2016-05-05 09:14:35 -0400
commitf5c1e1c5a652e4b43eb9b571577ef72731f3fa8b (patch)
tree14eebafa4758ac6f5506400cd5915cd36e395b00
parent8804f2525a56261b93576a1900185ac2691d138a (diff)
ACPICA: Divergence: remove unwanted spaces for typedef
ACPICA commit b2294cae776f5a66a7697414b21949d307e6856f This patch removes unwanted spaces for typedef. This solution doesn't cover function types. Note that the linuxize result of this commit is very giant and should have many conflicts against the current Linux upstream. Thus it is required to modify the linuxize result of this commit and the commits around it manually in order to have them merged to the Linux upstream. Since this is very costy, we should do this only once, and if we can't ensure to do this only once, we need to revert the Linux code to the wrong indentation result before merging the linuxize result of this commit. Lv Zheng. Link: https://github.com/acpica/acpica/commit/b2294cae Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-rw-r--r--drivers/acpi/acpica/acdebug.h6
-rw-r--r--drivers/acpi/acpica/acevents.h1
-rw-r--r--drivers/acpi/acpica/acinterp.h2
-rw-r--r--drivers/acpi/acpica/aclocal.h31
-rw-r--r--drivers/acpi/acpica/acresrc.h8
-rw-r--r--drivers/acpi/acpica/acutils.h22
-rw-r--r--drivers/acpi/acpica/dbcmds.c4
-rw-r--r--drivers/acpi/acpica/dbconvert.c4
-rw-r--r--drivers/acpi/acpica/dbexec.c2
-rw-r--r--drivers/acpi/acpica/dbinput.c6
-rw-r--r--drivers/acpi/acpica/dbnames.c2
-rw-r--r--drivers/acpi/acpica/dbxface.c4
-rw-r--r--drivers/acpi/acpica/dscontrol.c4
-rw-r--r--drivers/acpi/acpica/dsinit.c2
-rw-r--r--drivers/acpi/acpica/dsmethod.c2
-rw-r--r--drivers/acpi/acpica/dsutils.c2
-rw-r--r--drivers/acpi/acpica/dswload.c4
-rw-r--r--drivers/acpi/acpica/dswload2.c4
-rw-r--r--drivers/acpi/acpica/dswstate.c10
-rw-r--r--drivers/acpi/acpica/evgpe.c4
-rw-r--r--drivers/acpi/acpica/evgpeblk.c4
-rw-r--r--drivers/acpi/acpica/evgpeutil.c4
-rw-r--r--drivers/acpi/acpica/evhandler.c2
-rw-r--r--drivers/acpi/acpica/evmisc.c3
-rw-r--r--drivers/acpi/acpica/evrgnini.c2
-rw-r--r--drivers/acpi/acpica/evxfgpe.c2
-rw-r--r--drivers/acpi/acpica/exconcat.c4
-rw-r--r--drivers/acpi/acpica/exconvrt.c4
-rw-r--r--drivers/acpi/acpica/excreate.c2
-rw-r--r--drivers/acpi/acpica/exfield.c4
-rw-r--r--drivers/acpi/acpica/exfldio.c2
-rw-r--r--drivers/acpi/acpica/exoparg3.c8
-rw-r--r--drivers/acpi/acpica/exoparg6.c2
-rw-r--r--drivers/acpi/acpica/exregion.c6
-rw-r--r--drivers/acpi/acpica/exresnte.c4
-rw-r--r--drivers/acpi/acpica/exresolv.c2
-rw-r--r--drivers/acpi/acpica/exresop.c4
-rw-r--r--drivers/acpi/acpica/exstorob.c4
-rw-r--r--drivers/acpi/acpica/hwgpe.c6
-rw-r--r--drivers/acpi/acpica/hwxface.c7
-rw-r--r--drivers/acpi/acpica/nsconvert.c6
-rw-r--r--drivers/acpi/acpica/nsnames.c2
-rw-r--r--drivers/acpi/acpica/nsobject.c4
-rw-r--r--drivers/acpi/acpica/nsrepair.c2
-rw-r--r--drivers/acpi/acpica/nsrepair2.c6
-rw-r--r--drivers/acpi/acpica/nsutils.c8
-rw-r--r--drivers/acpi/acpica/nsxfeval.c2
-rw-r--r--drivers/acpi/acpica/nsxfname.c6
-rw-r--r--drivers/acpi/acpica/nsxfobj.c6
-rw-r--r--drivers/acpi/acpica/psargs.c2
-rw-r--r--drivers/acpi/acpica/psparse.c4
-rw-r--r--drivers/acpi/acpica/psxface.c2
-rw-r--r--drivers/acpi/acpica/rscalc.c90
-rw-r--r--drivers/acpi/acpica/rscreate.c2
-rw-r--r--drivers/acpi/acpica/rsmisc.c2
-rw-r--r--drivers/acpi/acpica/rsutils.c12
-rw-r--r--drivers/acpi/acpica/rsxface.c6
-rw-r--r--drivers/acpi/acpica/tbdata.c9
-rw-r--r--drivers/acpi/acpica/tbfadt.c2
-rw-r--r--drivers/acpi/acpica/tbutils.c6
-rw-r--r--drivers/acpi/acpica/tbxface.c6
-rw-r--r--drivers/acpi/acpica/tbxfroot.c8
-rw-r--r--drivers/acpi/acpica/utalloc.c5
-rw-r--r--drivers/acpi/acpica/utbuffer.c24
-rw-r--r--drivers/acpi/acpica/utcache.c7
-rw-r--r--drivers/acpi/acpica/utcopy.c16
-rw-r--r--drivers/acpi/acpica/utids.c8
-rw-r--r--drivers/acpi/acpica/utmath.c4
-rw-r--r--drivers/acpi/acpica/utobject.c18
-rw-r--r--drivers/acpi/acpica/utosi.c4
-rw-r--r--drivers/acpi/acpica/utownerid.c6
-rw-r--r--drivers/acpi/acpica/utprint.c14
-rw-r--r--drivers/acpi/acpica/utstring.c2
-rw-r--r--drivers/acpi/acpica/utxface.c4
-rw-r--r--include/acpi/acpiosxf.h8
-rw-r--r--include/acpi/acpixf.h21
-rw-r--r--include/acpi/actypes.h41
-rw-r--r--tools/power/acpi/os_specific/service_layers/oslinuxtbl.c47
-rw-r--r--tools/power/acpi/os_specific/service_layers/osunixxf.c24
-rw-r--r--tools/power/acpi/tools/acpidump/apdump.c2
80 files changed, 324 insertions, 324 deletions
diff --git a/drivers/acpi/acpica/acdebug.h b/drivers/acpi/acpica/acdebug.h
index 9e2e080ac9af..f6404ea928cb 100644
--- a/drivers/acpi/acpica/acdebug.h
+++ b/drivers/acpi/acpica/acdebug.h
@@ -196,7 +196,7 @@ ACPI_DBR_DEPENDENT_RETURN_VOID(void
196 acpi_walk_state 196 acpi_walk_state
197 *walk_state)) 197 *walk_state))
198 198
199 acpi_status acpi_db_display_all_methods(char *display_count_arg); 199acpi_status acpi_db_display_all_methods(char *display_count_arg);
200 200
201void acpi_db_display_arguments(void); 201void acpi_db_display_arguments(void);
202 202
@@ -220,7 +220,7 @@ ACPI_DBR_DEPENDENT_RETURN_VOID(void
220 * dbexec - debugger control method execution 220 * dbexec - debugger control method execution
221 */ 221 */
222void 222void
223acpi_db_execute(char *name, char **args, acpi_object_type * types, u32 flags); 223acpi_db_execute(char *name, char **args, acpi_object_type *types, u32 flags);
224 224
225void 225void
226acpi_db_create_execution_threads(char *num_threads_arg, 226acpi_db_create_execution_threads(char *num_threads_arg,
@@ -271,7 +271,7 @@ void ACPI_SYSTEM_XFACE acpi_db_execute_thread(void *context);
271acpi_status acpi_db_user_commands(void); 271acpi_status acpi_db_user_commands(void);
272 272
273char *acpi_db_get_next_token(char *string, 273char *acpi_db_get_next_token(char *string,
274 char **next, acpi_object_type * return_type); 274 char **next, acpi_object_type *return_type);
275 275
276/* 276/*
277 * dbobject 277 * dbobject
diff --git a/drivers/acpi/acpica/acevents.h b/drivers/acpi/acpica/acevents.h
index 17f221782d2f..77af91cf46d4 100644
--- a/drivers/acpi/acpica/acevents.h
+++ b/drivers/acpi/acpica/acevents.h
@@ -72,6 +72,7 @@ acpi_status acpi_ev_init_global_lock_handler(void);
72ACPI_HW_DEPENDENT_RETURN_OK(acpi_status 72ACPI_HW_DEPENDENT_RETURN_OK(acpi_status
73 acpi_ev_acquire_global_lock(u16 timeout)) 73 acpi_ev_acquire_global_lock(u16 timeout))
74ACPI_HW_DEPENDENT_RETURN_OK(acpi_status acpi_ev_release_global_lock(void)) 74ACPI_HW_DEPENDENT_RETURN_OK(acpi_status acpi_ev_release_global_lock(void))
75
75acpi_status acpi_ev_remove_global_lock_handler(void); 76acpi_status acpi_ev_remove_global_lock_handler(void);
76 77
77/* 78/*
diff --git a/drivers/acpi/acpica/acinterp.h b/drivers/acpi/acpica/acinterp.h
index 8b09d28fe5a8..7ead235555cf 100644
--- a/drivers/acpi/acpica/acinterp.h
+++ b/drivers/acpi/acpica/acinterp.h
@@ -370,7 +370,7 @@ acpi_ex_resolve_to_value(union acpi_operand_object **stack_ptr,
370acpi_status 370acpi_status
371acpi_ex_resolve_multiple(struct acpi_walk_state *walk_state, 371acpi_ex_resolve_multiple(struct acpi_walk_state *walk_state,
372 union acpi_operand_object *operand, 372 union acpi_operand_object *operand,
373 acpi_object_type * return_type, 373 acpi_object_type *return_type,
374 union acpi_operand_object **return_desc); 374 union acpi_operand_object **return_desc);
375 375
376/* 376/*
diff --git a/drivers/acpi/acpica/aclocal.h b/drivers/acpi/acpica/aclocal.h
index 083b16ada31e..166a67fb271d 100644
--- a/drivers/acpi/acpica/aclocal.h
+++ b/drivers/acpi/acpica/aclocal.h
@@ -278,7 +278,7 @@ struct acpi_create_field_info {
278}; 278};
279 279
280typedef 280typedef
281acpi_status(*acpi_internal_method) (struct acpi_walk_state * walk_state); 281acpi_status (*acpi_internal_method) (struct acpi_walk_state * walk_state);
282 282
283/* 283/*
284 * Bitmapped ACPI types. Used internally only 284 * Bitmapped ACPI types. Used internally only
@@ -395,11 +395,12 @@ union acpi_predefined_info {
395 395
396/* Return object auto-repair info */ 396/* Return object auto-repair info */
397 397
398typedef acpi_status(*acpi_object_converter) (struct acpi_namespace_node * scope, 398typedef acpi_status (*acpi_object_converter) (struct acpi_namespace_node *
399 union acpi_operand_object 399 scope,
400 *original_object, 400 union acpi_operand_object *
401 union acpi_operand_object 401 original_object,
402 **converted_object); 402 union acpi_operand_object **
403 converted_object);
403 404
404struct acpi_simple_repair_info { 405struct acpi_simple_repair_info {
405 char name[ACPI_NAME_SIZE]; 406 char name[ACPI_NAME_SIZE];
@@ -539,10 +540,10 @@ struct acpi_gpe_device_info {
539 struct acpi_namespace_node *gpe_device; 540 struct acpi_namespace_node *gpe_device;
540}; 541};
541 542
542typedef acpi_status(*acpi_gpe_callback) (struct acpi_gpe_xrupt_info * 543typedef acpi_status (*acpi_gpe_callback) (struct acpi_gpe_xrupt_info *
543 gpe_xrupt_info, 544 gpe_xrupt_info,
544 struct acpi_gpe_block_info *gpe_block, 545 struct acpi_gpe_block_info *
545 void *context); 546 gpe_block, void *context);
546 547
547/* Information about each particular fixed event */ 548/* Information about each particular fixed event */
548 549
@@ -657,10 +658,11 @@ struct acpi_result_values {
657}; 658};
658 659
659typedef 660typedef
660acpi_status(*acpi_parse_downwards) (struct acpi_walk_state * walk_state, 661acpi_status (*acpi_parse_downwards) (struct acpi_walk_state * walk_state,
661 union acpi_parse_object ** out_op); 662 union acpi_parse_object ** out_op);
662 663
663typedef acpi_status(*acpi_parse_upwards) (struct acpi_walk_state * walk_state); 664typedef
665acpi_status (*acpi_parse_upwards) (struct acpi_walk_state * walk_state);
664 666
665/* Global handlers for AML Notifies */ 667/* Global handlers for AML Notifies */
666 668
@@ -700,7 +702,8 @@ union acpi_generic_state {
700 * 702 *
701 ****************************************************************************/ 703 ****************************************************************************/
702 704
703typedef acpi_status(*acpi_execute_op) (struct acpi_walk_state * walk_state); 705typedef
706acpi_status (*acpi_execute_op) (struct acpi_walk_state * walk_state);
704 707
705/* Address Range info block */ 708/* Address Range info block */
706 709
diff --git a/drivers/acpi/acpica/acresrc.h b/drivers/acpi/acpica/acresrc.h
index 83e9a296c6ee..63da1e37caba 100644
--- a/drivers/acpi/acpica/acresrc.h
+++ b/drivers/acpi/acpica/acresrc.h
@@ -223,16 +223,16 @@ acpi_rs_get_aei_method_data(struct acpi_namespace_node *node,
223 * rscalc 223 * rscalc
224 */ 224 */
225acpi_status 225acpi_status
226acpi_rs_get_list_length(u8 * aml_buffer, 226acpi_rs_get_list_length(u8 *aml_buffer,
227 u32 aml_buffer_length, acpi_size * size_needed); 227 u32 aml_buffer_length, acpi_size *size_needed);
228 228
229acpi_status 229acpi_status
230acpi_rs_get_aml_length(struct acpi_resource *resource_list, 230acpi_rs_get_aml_length(struct acpi_resource *resource_list,
231 acpi_size resource_list_size, acpi_size * size_needed); 231 acpi_size resource_list_size, acpi_size *size_needed);
232 232
233acpi_status 233acpi_status
234acpi_rs_get_pci_routing_table_length(union acpi_operand_object *package_object, 234acpi_rs_get_pci_routing_table_length(union acpi_operand_object *package_object,
235 acpi_size * buffer_size_needed); 235 acpi_size *buffer_size_needed);
236 236
237acpi_status 237acpi_status
238acpi_rs_convert_aml_to_resources(u8 * aml, 238acpi_rs_convert_aml_to_resources(u8 * aml,
diff --git a/drivers/acpi/acpica/acutils.h b/drivers/acpi/acpica/acutils.h
index 4ff971c4c979..107f9e0090f7 100644
--- a/drivers/acpi/acpica/acutils.h
+++ b/drivers/acpi/acpica/acutils.h
@@ -136,16 +136,16 @@ extern const char *acpi_gbl_pt_decode[];
136#define ACPI_SMALL_VARIABLE_LENGTH 3 136#define ACPI_SMALL_VARIABLE_LENGTH 3
137 137
138typedef 138typedef
139acpi_status(*acpi_walk_aml_callback) (u8 *aml, 139acpi_status (*acpi_walk_aml_callback) (u8 *aml,
140 u32 length, 140 u32 length,
141 u32 offset, 141 u32 offset,
142 u8 resource_index, void **context); 142 u8 resource_index, void **context);
143 143
144typedef 144typedef
145acpi_status(*acpi_pkg_callback) (u8 object_type, 145acpi_status (*acpi_pkg_callback) (u8 object_type,
146 union acpi_operand_object *source_object, 146 union acpi_operand_object * source_object,
147 union acpi_generic_state * state, 147 union acpi_generic_state * state,
148 void *context); 148 void *context);
149 149
150struct acpi_pkg_info { 150struct acpi_pkg_info {
151 u8 *free_space; 151 u8 *free_space;
@@ -424,7 +424,7 @@ union acpi_operand_object *acpi_ut_create_buffer_object(acpi_size buffer_size);
424union acpi_operand_object *acpi_ut_create_string_object(acpi_size string_size); 424union acpi_operand_object *acpi_ut_create_string_object(acpi_size string_size);
425 425
426acpi_status 426acpi_status
427acpi_ut_get_object_size(union acpi_operand_object *obj, acpi_size * obj_length); 427acpi_ut_get_object_size(union acpi_operand_object *obj, acpi_size *obj_length);
428 428
429/* 429/*
430 * utosi - Support for the _OSI predefined control method 430 * utosi - Support for the _OSI predefined control method
@@ -541,9 +541,9 @@ acpi_ut_display_init_pathname(u8 type,
541/* 541/*
542 * utownerid - Support for Table/Method Owner IDs 542 * utownerid - Support for Table/Method Owner IDs
543 */ 543 */
544acpi_status acpi_ut_allocate_owner_id(acpi_owner_id * owner_id); 544acpi_status acpi_ut_allocate_owner_id(acpi_owner_id *owner_id);
545 545
546void acpi_ut_release_owner_id(acpi_owner_id * owner_id); 546void acpi_ut_release_owner_id(acpi_owner_id *owner_id);
547 547
548/* 548/*
549 * utresrc 549 * utresrc
diff --git a/drivers/acpi/acpica/dbcmds.c b/drivers/acpi/acpica/dbcmds.c
index 772178c96ccf..62bd446535f5 100644
--- a/drivers/acpi/acpica/dbcmds.c
+++ b/drivers/acpi/acpica/dbcmds.c
@@ -738,9 +738,9 @@ acpi_dm_test_resource_conversion(struct acpi_namespace_node *node, char *name)
738 original_aml = return_buffer.pointer; 738 original_aml = return_buffer.pointer;
739 739
740 acpi_dm_compare_aml_resources(original_aml->buffer.pointer, 740 acpi_dm_compare_aml_resources(original_aml->buffer.pointer,
741 (acpi_rsdesc_size) original_aml->buffer. 741 (acpi_rsdesc_size)original_aml->buffer.
742 length, new_aml.pointer, 742 length, new_aml.pointer,
743 (acpi_rsdesc_size) new_aml.length); 743 (acpi_rsdesc_size)new_aml.length);
744 744
745 /* Cleanup and exit */ 745 /* Cleanup and exit */
746 746
diff --git a/drivers/acpi/acpica/dbconvert.c b/drivers/acpi/acpica/dbconvert.c
index c79c5fb23fb6..7cd07b27f758 100644
--- a/drivers/acpi/acpica/dbconvert.c
+++ b/drivers/acpi/acpica/dbconvert.c
@@ -194,7 +194,7 @@ acpi_db_convert_to_buffer(char *string, union acpi_object *object)
194 * 194 *
195 ******************************************************************************/ 195 ******************************************************************************/
196 196
197acpi_status acpi_db_convert_to_package(char *string, union acpi_object * object) 197acpi_status acpi_db_convert_to_package(char *string, union acpi_object *object)
198{ 198{
199 char *this; 199 char *this;
200 char *next; 200 char *next;
@@ -252,7 +252,7 @@ acpi_status acpi_db_convert_to_package(char *string, union acpi_object * object)
252 252
253acpi_status 253acpi_status
254acpi_db_convert_to_object(acpi_object_type type, 254acpi_db_convert_to_object(acpi_object_type type,
255 char *string, union acpi_object * object) 255 char *string, union acpi_object *object)
256{ 256{
257 acpi_status status = AE_OK; 257 acpi_status status = AE_OK;
258 258
diff --git a/drivers/acpi/acpica/dbexec.c b/drivers/acpi/acpica/dbexec.c
index c814855376e2..12df2915ad74 100644
--- a/drivers/acpi/acpica/dbexec.c
+++ b/drivers/acpi/acpica/dbexec.c
@@ -361,7 +361,7 @@ acpi_db_execution_walk(acpi_handle obj_handle,
361 ******************************************************************************/ 361 ******************************************************************************/
362 362
363void 363void
364acpi_db_execute(char *name, char **args, acpi_object_type * types, u32 flags) 364acpi_db_execute(char *name, char **args, acpi_object_type *types, u32 flags)
365{ 365{
366 acpi_status status; 366 acpi_status status;
367 struct acpi_buffer return_obj; 367 struct acpi_buffer return_obj;
diff --git a/drivers/acpi/acpica/dbinput.c b/drivers/acpi/acpica/dbinput.c
index f53cb30e0a09..7cd5d2e022da 100644
--- a/drivers/acpi/acpica/dbinput.c
+++ b/drivers/acpi/acpica/dbinput.c
@@ -466,7 +466,7 @@ static void acpi_db_display_help(char *command)
466 ******************************************************************************/ 466 ******************************************************************************/
467 467
468char *acpi_db_get_next_token(char *string, 468char *acpi_db_get_next_token(char *string,
469 char **next, acpi_object_type * return_type) 469 char **next, acpi_object_type *return_type)
470{ 470{
471 char *start; 471 char *start;
472 u32 depth; 472 u32 depth;
@@ -684,8 +684,8 @@ static u32 acpi_db_match_command(char *user_command)
684 684
685acpi_status 685acpi_status
686acpi_db_command_dispatch(char *input_buffer, 686acpi_db_command_dispatch(char *input_buffer,
687 struct acpi_walk_state * walk_state, 687 struct acpi_walk_state *walk_state,
688 union acpi_parse_object * op) 688 union acpi_parse_object *op)
689{ 689{
690 u32 temp; 690 u32 temp;
691 u32 command_index; 691 u32 command_index;
diff --git a/drivers/acpi/acpica/dbnames.c b/drivers/acpi/acpica/dbnames.c
index 3c23b5a1079b..4c9e59a86db1 100644
--- a/drivers/acpi/acpica/dbnames.c
+++ b/drivers/acpi/acpica/dbnames.c
@@ -285,7 +285,7 @@ void acpi_db_dump_namespace_by_owner(char *owner_arg, char *depth_arg)
285 u32 max_depth = ACPI_UINT32_MAX; 285 u32 max_depth = ACPI_UINT32_MAX;
286 acpi_owner_id owner_id; 286 acpi_owner_id owner_id;
287 287
288 owner_id = (acpi_owner_id) strtoul(owner_arg, NULL, 0); 288 owner_id = (acpi_owner_id)strtoul(owner_arg, NULL, 0);
289 289
290 /* Now we can check for the depth argument */ 290 /* Now we can check for the depth argument */
291 291
diff --git a/drivers/acpi/acpica/dbxface.c b/drivers/acpi/acpica/dbxface.c
index e94e0d80bc7b..124db237775d 100644
--- a/drivers/acpi/acpica/dbxface.c
+++ b/drivers/acpi/acpica/dbxface.c
@@ -162,8 +162,8 @@ void acpi_db_signal_break_point(struct acpi_walk_state *walk_state)
162 ******************************************************************************/ 162 ******************************************************************************/
163 163
164acpi_status 164acpi_status
165acpi_db_single_step(struct acpi_walk_state * walk_state, 165acpi_db_single_step(struct acpi_walk_state *walk_state,
166 union acpi_parse_object * op, u32 opcode_class) 166 union acpi_parse_object *op, u32 opcode_class)
167{ 167{
168 union acpi_parse_object *next; 168 union acpi_parse_object *next;
169 acpi_status status = AE_OK; 169 acpi_status status = AE_OK;
diff --git a/drivers/acpi/acpica/dscontrol.c b/drivers/acpi/acpica/dscontrol.c
index c9a663f21ac8..4ddcbf100234 100644
--- a/drivers/acpi/acpica/dscontrol.c
+++ b/drivers/acpi/acpica/dscontrol.c
@@ -163,8 +163,8 @@ acpi_ds_exec_begin_control_op(struct acpi_walk_state *walk_state,
163 ******************************************************************************/ 163 ******************************************************************************/
164 164
165acpi_status 165acpi_status
166acpi_ds_exec_end_control_op(struct acpi_walk_state * walk_state, 166acpi_ds_exec_end_control_op(struct acpi_walk_state *walk_state,
167 union acpi_parse_object * op) 167 union acpi_parse_object *op)
168{ 168{
169 acpi_status status = AE_OK; 169 acpi_status status = AE_OK;
170 union acpi_generic_state *control_state; 170 union acpi_generic_state *control_state;
diff --git a/drivers/acpi/acpica/dsinit.c b/drivers/acpi/acpica/dsinit.c
index 5aa1c5feee50..f1e6dcc7a827 100644
--- a/drivers/acpi/acpica/dsinit.c
+++ b/drivers/acpi/acpica/dsinit.c
@@ -188,7 +188,7 @@ acpi_ds_init_one_object(acpi_handle obj_handle,
188 188
189acpi_status 189acpi_status
190acpi_ds_initialize_objects(u32 table_index, 190acpi_ds_initialize_objects(u32 table_index,
191 struct acpi_namespace_node * start_node) 191 struct acpi_namespace_node *start_node)
192{ 192{
193 acpi_status status; 193 acpi_status status;
194 struct acpi_init_walk_info info; 194 struct acpi_init_walk_info info;
diff --git a/drivers/acpi/acpica/dsmethod.c b/drivers/acpi/acpica/dsmethod.c
index 1982310e6d83..ddfec05cbb4b 100644
--- a/drivers/acpi/acpica/dsmethod.c
+++ b/drivers/acpi/acpica/dsmethod.c
@@ -209,7 +209,7 @@ acpi_ds_detect_named_opcodes(struct acpi_walk_state *walk_state,
209 ******************************************************************************/ 209 ******************************************************************************/
210 210
211acpi_status 211acpi_status
212acpi_ds_method_error(acpi_status status, struct acpi_walk_state * walk_state) 212acpi_ds_method_error(acpi_status status, struct acpi_walk_state *walk_state)
213{ 213{
214 u32 aml_offset; 214 u32 aml_offset;
215 215
diff --git a/drivers/acpi/acpica/dsutils.c b/drivers/acpi/acpica/dsutils.c
index 8ca9416320e0..f393de9f5887 100644
--- a/drivers/acpi/acpica/dsutils.c
+++ b/drivers/acpi/acpica/dsutils.c
@@ -569,7 +569,7 @@ acpi_ds_create_operand(struct acpi_walk_state *walk_state,
569 /* TBD: May only be temporary */ 569 /* TBD: May only be temporary */
570 570
571 obj_desc = 571 obj_desc =
572 acpi_ut_create_string_object((acpi_size) name_length); 572 acpi_ut_create_string_object((acpi_size)name_length);
573 573
574 strncpy(obj_desc->string.pointer, 574 strncpy(obj_desc->string.pointer,
575 name_string, name_length); 575 name_string, name_length);
diff --git a/drivers/acpi/acpica/dswload.c b/drivers/acpi/acpica/dswload.c
index d1cedcfda1d2..fd34040d4f44 100644
--- a/drivers/acpi/acpica/dswload.c
+++ b/drivers/acpi/acpica/dswload.c
@@ -137,8 +137,8 @@ acpi_ds_init_callbacks(struct acpi_walk_state *walk_state, u32 pass_number)
137 ******************************************************************************/ 137 ******************************************************************************/
138 138
139acpi_status 139acpi_status
140acpi_ds_load1_begin_op(struct acpi_walk_state * walk_state, 140acpi_ds_load1_begin_op(struct acpi_walk_state *walk_state,
141 union acpi_parse_object ** out_op) 141 union acpi_parse_object **out_op)
142{ 142{
143 union acpi_parse_object *op; 143 union acpi_parse_object *op;
144 struct acpi_namespace_node *node; 144 struct acpi_namespace_node *node;
diff --git a/drivers/acpi/acpica/dswload2.c b/drivers/acpi/acpica/dswload2.c
index 0bac6e14170e..762db3fa70e0 100644
--- a/drivers/acpi/acpica/dswload2.c
+++ b/drivers/acpi/acpica/dswload2.c
@@ -490,8 +490,8 @@ acpi_status acpi_ds_load2_end_op(struct acpi_walk_state *walk_state)
490 490
491 status = 491 status =
492 acpi_ds_create_index_field(op, 492 acpi_ds_create_index_field(op,
493 (acpi_handle) arg-> 493 (acpi_handle)arg->common.
494 common.node, walk_state); 494 node, walk_state);
495 break; 495 break;
496 496
497 case AML_BANK_FIELD_OP: 497 case AML_BANK_FIELD_OP:
diff --git a/drivers/acpi/acpica/dswstate.c b/drivers/acpi/acpica/dswstate.c
index 3a26ddbaed6d..e3338698e56b 100644
--- a/drivers/acpi/acpica/dswstate.c
+++ b/drivers/acpi/acpica/dswstate.c
@@ -143,8 +143,8 @@ acpi_ds_result_pop(union acpi_operand_object **object,
143 ******************************************************************************/ 143 ******************************************************************************/
144 144
145acpi_status 145acpi_status
146acpi_ds_result_push(union acpi_operand_object * object, 146acpi_ds_result_push(union acpi_operand_object *object,
147 struct acpi_walk_state * walk_state) 147 struct acpi_walk_state *walk_state)
148{ 148{
149 union acpi_generic_state *state; 149 union acpi_generic_state *state;
150 acpi_status status; 150 acpi_status status;
@@ -307,7 +307,7 @@ static acpi_status acpi_ds_result_stack_pop(struct acpi_walk_state *walk_state)
307 ******************************************************************************/ 307 ******************************************************************************/
308 308
309acpi_status 309acpi_status
310acpi_ds_obj_stack_push(void *object, struct acpi_walk_state * walk_state) 310acpi_ds_obj_stack_push(void *object, struct acpi_walk_state *walk_state)
311{ 311{
312 ACPI_FUNCTION_NAME(ds_obj_stack_push); 312 ACPI_FUNCTION_NAME(ds_obj_stack_push);
313 313
@@ -354,7 +354,7 @@ acpi_ds_obj_stack_push(void *object, struct acpi_walk_state * walk_state)
354 ******************************************************************************/ 354 ******************************************************************************/
355 355
356acpi_status 356acpi_status
357acpi_ds_obj_stack_pop(u32 pop_count, struct acpi_walk_state * walk_state) 357acpi_ds_obj_stack_pop(u32 pop_count, struct acpi_walk_state *walk_state)
358{ 358{
359 u32 i; 359 u32 i;
360 360
@@ -411,7 +411,7 @@ acpi_ds_obj_stack_pop_and_delete(u32 pop_count,
411 return; 411 return;
412 } 412 }
413 413
414 for (i = (s32) pop_count - 1; i >= 0; i--) { 414 for (i = (s32)pop_count - 1; i >= 0; i--) {
415 if (walk_state->num_operands == 0) { 415 if (walk_state->num_operands == 0) {
416 return; 416 return;
417 } 417 }
diff --git a/drivers/acpi/acpica/evgpe.c b/drivers/acpi/acpica/evgpe.c
index b47e62aaf654..4b4949ce05bc 100644
--- a/drivers/acpi/acpica/evgpe.c
+++ b/drivers/acpi/acpica/evgpe.c
@@ -440,7 +440,7 @@ u32 acpi_ev_gpe_detect(struct acpi_gpe_xrupt_info *gpe_xrupt_list)
440 440
441 gpe_event_info = 441 gpe_event_info =
442 &gpe_block-> 442 &gpe_block->
443 event_info[((acpi_size) i * 443 event_info[((acpi_size)i *
444 ACPI_GPE_REGISTER_WIDTH) + j]; 444 ACPI_GPE_REGISTER_WIDTH) + j];
445 gpe_number = 445 gpe_number =
446 j + gpe_register_info->base_gpe_number; 446 j + gpe_register_info->base_gpe_number;
@@ -652,7 +652,7 @@ static void ACPI_SYSTEM_XFACE acpi_ev_asynch_enable_gpe(void *context)
652 * 652 *
653 ******************************************************************************/ 653 ******************************************************************************/
654 654
655acpi_status acpi_ev_finish_gpe(struct acpi_gpe_event_info * gpe_event_info) 655acpi_status acpi_ev_finish_gpe(struct acpi_gpe_event_info *gpe_event_info)
656{ 656{
657 acpi_status status; 657 acpi_status status;
658 658
diff --git a/drivers/acpi/acpica/evgpeblk.c b/drivers/acpi/acpica/evgpeblk.c
index 447fa1cac64f..d54014cab01d 100644
--- a/drivers/acpi/acpica/evgpeblk.c
+++ b/drivers/acpi/acpica/evgpeblk.c
@@ -211,7 +211,7 @@ acpi_ev_create_gpe_info_blocks(struct acpi_gpe_block_info *gpe_block)
211 211
212 /* Allocate the GPE register information block */ 212 /* Allocate the GPE register information block */
213 213
214 gpe_register_info = ACPI_ALLOCATE_ZEROED((acpi_size) gpe_block-> 214 gpe_register_info = ACPI_ALLOCATE_ZEROED((acpi_size)gpe_block->
215 register_count * 215 register_count *
216 sizeof(struct 216 sizeof(struct
217 acpi_gpe_register_info)); 217 acpi_gpe_register_info));
@@ -225,7 +225,7 @@ acpi_ev_create_gpe_info_blocks(struct acpi_gpe_block_info *gpe_block)
225 * Allocate the GPE event_info block. There are eight distinct GPEs 225 * Allocate the GPE event_info block. There are eight distinct GPEs
226 * per register. Initialization to zeros is sufficient. 226 * per register. Initialization to zeros is sufficient.
227 */ 227 */
228 gpe_event_info = ACPI_ALLOCATE_ZEROED((acpi_size) gpe_block->gpe_count * 228 gpe_event_info = ACPI_ALLOCATE_ZEROED((acpi_size)gpe_block->gpe_count *
229 sizeof(struct 229 sizeof(struct
230 acpi_gpe_event_info)); 230 acpi_gpe_event_info));
231 if (!gpe_event_info) { 231 if (!gpe_event_info) {
diff --git a/drivers/acpi/acpica/evgpeutil.c b/drivers/acpi/acpica/evgpeutil.c
index 66c4b5b7cd64..3f150d567e64 100644
--- a/drivers/acpi/acpica/evgpeutil.c
+++ b/drivers/acpi/acpica/evgpeutil.c
@@ -163,7 +163,7 @@ acpi_ev_get_gpe_device(struct acpi_gpe_xrupt_info *gpe_xrupt_info,
163 163
164acpi_status 164acpi_status
165acpi_ev_get_gpe_xrupt_block(u32 interrupt_number, 165acpi_ev_get_gpe_xrupt_block(u32 interrupt_number,
166 struct acpi_gpe_xrupt_info ** gpe_xrupt_block) 166 struct acpi_gpe_xrupt_info **gpe_xrupt_block)
167{ 167{
168 struct acpi_gpe_xrupt_info *next_gpe_xrupt; 168 struct acpi_gpe_xrupt_info *next_gpe_xrupt;
169 struct acpi_gpe_xrupt_info *gpe_xrupt; 169 struct acpi_gpe_xrupt_info *gpe_xrupt;
@@ -320,7 +320,7 @@ acpi_ev_delete_gpe_handlers(struct acpi_gpe_xrupt_info *gpe_xrupt_info,
320 /* Now look at the individual GPEs in this byte register */ 320 /* Now look at the individual GPEs in this byte register */
321 321
322 for (j = 0; j < ACPI_GPE_REGISTER_WIDTH; j++) { 322 for (j = 0; j < ACPI_GPE_REGISTER_WIDTH; j++) {
323 gpe_event_info = &gpe_block->event_info[((acpi_size) i * 323 gpe_event_info = &gpe_block->event_info[((acpi_size)i *
324 ACPI_GPE_REGISTER_WIDTH) 324 ACPI_GPE_REGISTER_WIDTH)
325 + j]; 325 + j];
326 326
diff --git a/drivers/acpi/acpica/evhandler.c b/drivers/acpi/acpica/evhandler.c
index 0f6be8956a99..24768ca03f19 100644
--- a/drivers/acpi/acpica/evhandler.c
+++ b/drivers/acpi/acpica/evhandler.c
@@ -359,7 +359,7 @@ union acpi_operand_object *acpi_ev_find_region_handler(acpi_adr_space_type
359 ******************************************************************************/ 359 ******************************************************************************/
360 360
361acpi_status 361acpi_status
362acpi_ev_install_space_handler(struct acpi_namespace_node * node, 362acpi_ev_install_space_handler(struct acpi_namespace_node *node,
363 acpi_adr_space_type space_id, 363 acpi_adr_space_type space_id,
364 acpi_adr_space_handler handler, 364 acpi_adr_space_handler handler,
365 acpi_adr_space_setup setup, void *context) 365 acpi_adr_space_setup setup, void *context)
diff --git a/drivers/acpi/acpica/evmisc.c b/drivers/acpi/acpica/evmisc.c
index c67d78c5995f..f51d43adb7d1 100644
--- a/drivers/acpi/acpica/evmisc.c
+++ b/drivers/acpi/acpica/evmisc.c
@@ -99,8 +99,7 @@ u8 acpi_ev_is_notify_object(struct acpi_namespace_node *node)
99 ******************************************************************************/ 99 ******************************************************************************/
100 100
101acpi_status 101acpi_status
102acpi_ev_queue_notify_request(struct acpi_namespace_node * node, 102acpi_ev_queue_notify_request(struct acpi_namespace_node *node, u32 notify_value)
103 u32 notify_value)
104{ 103{
105 union acpi_operand_object *obj_desc; 104 union acpi_operand_object *obj_desc;
106 union acpi_operand_object *handler_list_head = NULL; 105 union acpi_operand_object *handler_list_head = NULL;
diff --git a/drivers/acpi/acpica/evrgnini.c b/drivers/acpi/acpica/evrgnini.c
index 6972ab4ddb66..b6ea9c0d0d8c 100644
--- a/drivers/acpi/acpica/evrgnini.c
+++ b/drivers/acpi/acpica/evrgnini.c
@@ -227,7 +227,7 @@ acpi_ev_pci_config_region_setup(acpi_handle handle,
227 227
228 /* Install a handler for this PCI root bridge */ 228 /* Install a handler for this PCI root bridge */
229 229
230 status = acpi_install_address_space_handler((acpi_handle) pci_root_node, ACPI_ADR_SPACE_PCI_CONFIG, ACPI_DEFAULT_HANDLER, NULL, NULL); 230 status = acpi_install_address_space_handler((acpi_handle)pci_root_node, ACPI_ADR_SPACE_PCI_CONFIG, ACPI_DEFAULT_HANDLER, NULL, NULL);
231 if (ACPI_FAILURE(status)) { 231 if (ACPI_FAILURE(status)) {
232 if (status == AE_SAME_HANDLER) { 232 if (status == AE_SAME_HANDLER) {
233 /* 233 /*
diff --git a/drivers/acpi/acpica/evxfgpe.c b/drivers/acpi/acpica/evxfgpe.c
index 90456714821f..17cfef721d00 100644
--- a/drivers/acpi/acpica/evxfgpe.c
+++ b/drivers/acpi/acpica/evxfgpe.c
@@ -917,7 +917,7 @@ ACPI_EXPORT_SYMBOL(acpi_remove_gpe_block)
917 * the FADT-defined gpe blocks. Otherwise, the GPE block device. 917 * the FADT-defined gpe blocks. Otherwise, the GPE block device.
918 * 918 *
919 ******************************************************************************/ 919 ******************************************************************************/
920acpi_status acpi_get_gpe_device(u32 index, acpi_handle * gpe_device) 920acpi_status acpi_get_gpe_device(u32 index, acpi_handle *gpe_device)
921{ 921{
922 struct acpi_gpe_device_info info; 922 struct acpi_gpe_device_info info;
923 acpi_status status; 923 acpi_status status;
diff --git a/drivers/acpi/acpica/exconcat.c b/drivers/acpi/acpica/exconcat.c
index 553e0146338e..2423fe03e879 100644
--- a/drivers/acpi/acpica/exconcat.c
+++ b/drivers/acpi/acpica/exconcat.c
@@ -340,7 +340,7 @@ acpi_ex_convert_to_object_type_string(union acpi_operand_object *obj_desc,
340 340
341 type_string = acpi_ut_get_type_name(obj_desc->common.type); 341 type_string = acpi_ut_get_type_name(obj_desc->common.type);
342 342
343 return_desc = acpi_ut_create_string_object(((acpi_size) strlen(type_string) + 9)); /* 9 For "[ Object]" */ 343 return_desc = acpi_ut_create_string_object(((acpi_size)strlen(type_string) + 9)); /* 9 For "[ Object]" */
344 if (!return_desc) { 344 if (!return_desc) {
345 return (AE_NO_MEMORY); 345 return (AE_NO_MEMORY);
346 } 346 }
@@ -372,7 +372,7 @@ acpi_status
372acpi_ex_concat_template(union acpi_operand_object *operand0, 372acpi_ex_concat_template(union acpi_operand_object *operand0,
373 union acpi_operand_object *operand1, 373 union acpi_operand_object *operand1,
374 union acpi_operand_object **actual_return_desc, 374 union acpi_operand_object **actual_return_desc,
375 struct acpi_walk_state * walk_state) 375 struct acpi_walk_state *walk_state)
376{ 376{
377 acpi_status status; 377 acpi_status status;
378 union acpi_operand_object *return_desc; 378 union acpi_operand_object *return_desc;
diff --git a/drivers/acpi/acpica/exconvrt.c b/drivers/acpi/acpica/exconvrt.c
index d0d16daa7ed5..b7e9b3d803e1 100644
--- a/drivers/acpi/acpica/exconvrt.c
+++ b/drivers/acpi/acpica/exconvrt.c
@@ -441,7 +441,7 @@ acpi_ex_convert_to_string(union acpi_operand_object * obj_desc,
441 * Need enough space for one ASCII integer (plus null terminator) 441 * Need enough space for one ASCII integer (plus null terminator)
442 */ 442 */
443 return_desc = 443 return_desc =
444 acpi_ut_create_string_object((acpi_size) string_length); 444 acpi_ut_create_string_object((acpi_size)string_length);
445 if (!return_desc) { 445 if (!return_desc) {
446 return_ACPI_STATUS(AE_NO_MEMORY); 446 return_ACPI_STATUS(AE_NO_MEMORY);
447 } 447 }
@@ -520,7 +520,7 @@ acpi_ex_convert_to_string(union acpi_operand_object * obj_desc,
520 } 520 }
521 521
522 return_desc = 522 return_desc =
523 acpi_ut_create_string_object((acpi_size) string_length); 523 acpi_ut_create_string_object((acpi_size)string_length);
524 if (!return_desc) { 524 if (!return_desc) {
525 return_ACPI_STATUS(AE_NO_MEMORY); 525 return_ACPI_STATUS(AE_NO_MEMORY);
526 } 526 }
diff --git a/drivers/acpi/acpica/excreate.c b/drivers/acpi/acpica/excreate.c
index bea9612e4720..613ba6eb08bb 100644
--- a/drivers/acpi/acpica/excreate.c
+++ b/drivers/acpi/acpica/excreate.c
@@ -394,7 +394,7 @@ acpi_status acpi_ex_create_processor(struct acpi_walk_state *walk_state)
394 obj_desc->processor.proc_id = (u8) operand[1]->integer.value; 394 obj_desc->processor.proc_id = (u8) operand[1]->integer.value;
395 obj_desc->processor.length = (u8) operand[3]->integer.value; 395 obj_desc->processor.length = (u8) operand[3]->integer.value;
396 obj_desc->processor.address = 396 obj_desc->processor.address =
397 (acpi_io_address) operand[2]->integer.value; 397 (acpi_io_address)operand[2]->integer.value;
398 398
399 /* Install the processor object in the parent Node */ 399 /* Install the processor object in the parent Node */
400 400
diff --git a/drivers/acpi/acpica/exfield.c b/drivers/acpi/acpica/exfield.c
index d5d8020a8523..d7d3ee36338b 100644
--- a/drivers/acpi/acpica/exfield.c
+++ b/drivers/acpi/acpica/exfield.c
@@ -126,7 +126,7 @@ acpi_ex_get_serial_access_length(u32 accessor_type, u32 access_length)
126 ******************************************************************************/ 126 ******************************************************************************/
127 127
128acpi_status 128acpi_status
129acpi_ex_read_data_from_field(struct acpi_walk_state * walk_state, 129acpi_ex_read_data_from_field(struct acpi_walk_state *walk_state,
130 union acpi_operand_object *obj_desc, 130 union acpi_operand_object *obj_desc,
131 union acpi_operand_object **ret_buffer_desc) 131 union acpi_operand_object **ret_buffer_desc)
132{ 132{
@@ -233,7 +233,7 @@ acpi_ex_read_data_from_field(struct acpi_walk_state * walk_state,
233 * Note: Field.length is in bits. 233 * Note: Field.length is in bits.
234 */ 234 */
235 length = 235 length =
236 (acpi_size) ACPI_ROUND_BITS_UP_TO_BYTES(obj_desc->field.bit_length); 236 (acpi_size)ACPI_ROUND_BITS_UP_TO_BYTES(obj_desc->field.bit_length);
237 237
238 if (length > acpi_gbl_integer_byte_width) { 238 if (length > acpi_gbl_integer_byte_width) {
239 239
diff --git a/drivers/acpi/acpica/exfldio.c b/drivers/acpi/acpica/exfldio.c
index f0c5ed0b7db8..72f917618578 100644
--- a/drivers/acpi/acpica/exfldio.c
+++ b/drivers/acpi/acpica/exfldio.c
@@ -164,7 +164,7 @@ acpi_ex_setup_region(union acpi_operand_object *obj_desc,
164 if (ACPI_ROUND_UP(rgn_desc->region.length, 164 if (ACPI_ROUND_UP(rgn_desc->region.length,
165 obj_desc->common_field. 165 obj_desc->common_field.
166 access_byte_width) >= 166 access_byte_width) >=
167 ((acpi_size) obj_desc->common_field. 167 ((acpi_size)obj_desc->common_field.
168 base_byte_offset + 168 base_byte_offset +
169 obj_desc->common_field.access_byte_width + 169 obj_desc->common_field.access_byte_width +
170 field_datum_byte_offset)) { 170 field_datum_byte_offset)) {
diff --git a/drivers/acpi/acpica/exoparg3.c b/drivers/acpi/acpica/exoparg3.c
index 5aa21c4eda1d..69e4e269ad2f 100644
--- a/drivers/acpi/acpica/exoparg3.c
+++ b/drivers/acpi/acpica/exoparg3.c
@@ -184,7 +184,7 @@ acpi_status acpi_ex_opcode_3A_1T_1R(struct acpi_walk_state *walk_state)
184 /* Get the Integer values from the objects */ 184 /* Get the Integer values from the objects */
185 185
186 index = operand[1]->integer.value; 186 index = operand[1]->integer.value;
187 length = (acpi_size) operand[2]->integer.value; 187 length = (acpi_size)operand[2]->integer.value;
188 188
189 /* 189 /*
190 * If the index is beyond the length of the String/Buffer, or if the 190 * If the index is beyond the length of the String/Buffer, or if the
@@ -198,8 +198,8 @@ acpi_status acpi_ex_opcode_3A_1T_1R(struct acpi_walk_state *walk_state)
198 198
199 else if ((index + length) > operand[0]->string.length) { 199 else if ((index + length) > operand[0]->string.length) {
200 length = 200 length =
201 (acpi_size) operand[0]->string.length - 201 (acpi_size)operand[0]->string.length -
202 (acpi_size) index; 202 (acpi_size)index;
203 } 203 }
204 204
205 /* Strings always have a sub-pointer, not so for buffers */ 205 /* Strings always have a sub-pointer, not so for buffers */
@@ -209,7 +209,7 @@ acpi_status acpi_ex_opcode_3A_1T_1R(struct acpi_walk_state *walk_state)
209 209
210 /* Always allocate a new buffer for the String */ 210 /* Always allocate a new buffer for the String */
211 211
212 buffer = ACPI_ALLOCATE_ZEROED((acpi_size) length + 1); 212 buffer = ACPI_ALLOCATE_ZEROED((acpi_size)length + 1);
213 if (!buffer) { 213 if (!buffer) {
214 status = AE_NO_MEMORY; 214 status = AE_NO_MEMORY;
215 goto cleanup; 215 goto cleanup;
diff --git a/drivers/acpi/acpica/exoparg6.c b/drivers/acpi/acpica/exoparg6.c
index e2b63483857f..786d53b0bb37 100644
--- a/drivers/acpi/acpica/exoparg6.c
+++ b/drivers/acpi/acpica/exoparg6.c
@@ -207,7 +207,7 @@ acpi_ex_do_match(u32 match_op,
207 * 207 *
208 ******************************************************************************/ 208 ******************************************************************************/
209 209
210acpi_status acpi_ex_opcode_6A_0T_1R(struct acpi_walk_state * walk_state) 210acpi_status acpi_ex_opcode_6A_0T_1R(struct acpi_walk_state *walk_state)
211{ 211{
212 union acpi_operand_object **operand = &walk_state->operands[0]; 212 union acpi_operand_object **operand = &walk_state->operands[0];
213 union acpi_operand_object *return_desc = NULL; 213 union acpi_operand_object *return_desc = NULL;
diff --git a/drivers/acpi/acpica/exregion.c b/drivers/acpi/acpica/exregion.c
index 076074daf2b6..31b381cae94d 100644
--- a/drivers/acpi/acpica/exregion.c
+++ b/drivers/acpi/acpica/exregion.c
@@ -325,15 +325,15 @@ acpi_ex_system_io_space_handler(u32 function,
325 switch (function) { 325 switch (function) {
326 case ACPI_READ: 326 case ACPI_READ:
327 327
328 status = acpi_hw_read_port((acpi_io_address) address, 328 status = acpi_hw_read_port((acpi_io_address)address,
329 &value32, bit_width); 329 &value32, bit_width);
330 *value = value32; 330 *value = value32;
331 break; 331 break;
332 332
333 case ACPI_WRITE: 333 case ACPI_WRITE:
334 334
335 status = acpi_hw_write_port((acpi_io_address) address, 335 status = acpi_hw_write_port((acpi_io_address)address,
336 (u32) * value, bit_width); 336 (u32)*value, bit_width);
337 break; 337 break;
338 338
339 default: 339 default:
diff --git a/drivers/acpi/acpica/exresnte.c b/drivers/acpi/acpica/exresnte.c
index c1e8bfb0f7f4..a183cb740d24 100644
--- a/drivers/acpi/acpica/exresnte.c
+++ b/drivers/acpi/acpica/exresnte.c
@@ -93,7 +93,7 @@ acpi_ex_resolve_node_to_value(struct acpi_namespace_node **object_ptr,
93 */ 93 */
94 node = *object_ptr; 94 node = *object_ptr;
95 source_desc = acpi_ns_get_attached_object(node); 95 source_desc = acpi_ns_get_attached_object(node);
96 entry_type = acpi_ns_get_type((acpi_handle) node); 96 entry_type = acpi_ns_get_type((acpi_handle)node);
97 97
98 ACPI_DEBUG_PRINT((ACPI_DB_EXEC, "Entry=%p SourceDesc=%p [%s]\n", 98 ACPI_DEBUG_PRINT((ACPI_DB_EXEC, "Entry=%p SourceDesc=%p [%s]\n",
99 node, source_desc, 99 node, source_desc,
@@ -106,7 +106,7 @@ acpi_ex_resolve_node_to_value(struct acpi_namespace_node **object_ptr,
106 106
107 node = ACPI_CAST_PTR(struct acpi_namespace_node, node->object); 107 node = ACPI_CAST_PTR(struct acpi_namespace_node, node->object);
108 source_desc = acpi_ns_get_attached_object(node); 108 source_desc = acpi_ns_get_attached_object(node);
109 entry_type = acpi_ns_get_type((acpi_handle) node); 109 entry_type = acpi_ns_get_type((acpi_handle)node);
110 *object_ptr = node; 110 *object_ptr = node;
111 } 111 }
112 112
diff --git a/drivers/acpi/acpica/exresolv.c b/drivers/acpi/acpica/exresolv.c
index fedacf13dc36..e1d3878be2c6 100644
--- a/drivers/acpi/acpica/exresolv.c
+++ b/drivers/acpi/acpica/exresolv.c
@@ -334,7 +334,7 @@ acpi_ex_resolve_object_to_value(union acpi_operand_object **stack_ptr,
334acpi_status 334acpi_status
335acpi_ex_resolve_multiple(struct acpi_walk_state *walk_state, 335acpi_ex_resolve_multiple(struct acpi_walk_state *walk_state,
336 union acpi_operand_object *operand, 336 union acpi_operand_object *operand,
337 acpi_object_type * return_type, 337 acpi_object_type *return_type,
338 union acpi_operand_object **return_desc) 338 union acpi_operand_object **return_desc)
339{ 339{
340 union acpi_operand_object *obj_desc = ACPI_CAST_PTR(void, operand); 340 union acpi_operand_object *obj_desc = ACPI_CAST_PTR(void, operand);
diff --git a/drivers/acpi/acpica/exresop.c b/drivers/acpi/acpica/exresop.c
index cc2c26c46a6d..27b41fd7542d 100644
--- a/drivers/acpi/acpica/exresop.c
+++ b/drivers/acpi/acpica/exresop.c
@@ -131,8 +131,8 @@ acpi_ex_check_object_type(acpi_object_type type_needed,
131 131
132acpi_status 132acpi_status
133acpi_ex_resolve_operands(u16 opcode, 133acpi_ex_resolve_operands(u16 opcode,
134 union acpi_operand_object ** stack_ptr, 134 union acpi_operand_object **stack_ptr,
135 struct acpi_walk_state * walk_state) 135 struct acpi_walk_state *walk_state)
136{ 136{
137 union acpi_operand_object *obj_desc; 137 union acpi_operand_object *obj_desc;
138 acpi_status status = AE_OK; 138 acpi_status status = AE_OK;
diff --git a/drivers/acpi/acpica/exstorob.c b/drivers/acpi/acpica/exstorob.c
index 28b724827f0f..1dab82746d06 100644
--- a/drivers/acpi/acpica/exstorob.c
+++ b/drivers/acpi/acpica/exstorob.c
@@ -188,7 +188,7 @@ acpi_ex_store_string_to_string(union acpi_operand_object *source_desc,
188 * Clear old string and copy in the new one 188 * Clear old string and copy in the new one
189 */ 189 */
190 memset(target_desc->string.pointer, 0, 190 memset(target_desc->string.pointer, 0,
191 (acpi_size) target_desc->string.length + 1); 191 (acpi_size)target_desc->string.length + 1);
192 memcpy(target_desc->string.pointer, buffer, length); 192 memcpy(target_desc->string.pointer, buffer, length);
193 } else { 193 } else {
194 /* 194 /*
@@ -204,7 +204,7 @@ acpi_ex_store_string_to_string(union acpi_operand_object *source_desc,
204 } 204 }
205 205
206 target_desc->string.pointer = 206 target_desc->string.pointer =
207 ACPI_ALLOCATE_ZEROED((acpi_size) length + 1); 207 ACPI_ALLOCATE_ZEROED((acpi_size)length + 1);
208 208
209 if (!target_desc->string.pointer) { 209 if (!target_desc->string.pointer) {
210 return_ACPI_STATUS(AE_NO_MEMORY); 210 return_ACPI_STATUS(AE_NO_MEMORY);
diff --git a/drivers/acpi/acpica/hwgpe.c b/drivers/acpi/acpica/hwgpe.c
index 1c4f4518611a..bdecd5e76e87 100644
--- a/drivers/acpi/acpica/hwgpe.c
+++ b/drivers/acpi/acpica/hwgpe.c
@@ -166,7 +166,7 @@ acpi_hw_low_set_gpe(struct acpi_gpe_event_info *gpe_event_info, u32 action)
166 * 166 *
167 ******************************************************************************/ 167 ******************************************************************************/
168 168
169acpi_status acpi_hw_clear_gpe(struct acpi_gpe_event_info * gpe_event_info) 169acpi_status acpi_hw_clear_gpe(struct acpi_gpe_event_info *gpe_event_info)
170{ 170{
171 struct acpi_gpe_register_info *gpe_register_info; 171 struct acpi_gpe_register_info *gpe_register_info;
172 acpi_status status; 172 acpi_status status;
@@ -206,7 +206,7 @@ acpi_status acpi_hw_clear_gpe(struct acpi_gpe_event_info * gpe_event_info)
206 ******************************************************************************/ 206 ******************************************************************************/
207 207
208acpi_status 208acpi_status
209acpi_hw_get_gpe_status(struct acpi_gpe_event_info * gpe_event_info, 209acpi_hw_get_gpe_status(struct acpi_gpe_event_info *gpe_event_info,
210 acpi_event_status *event_status) 210 acpi_event_status *event_status)
211{ 211{
212 u32 in_byte; 212 u32 in_byte;
@@ -391,7 +391,7 @@ acpi_hw_clear_gpe_block(struct acpi_gpe_xrupt_info *gpe_xrupt_info,
391 391
392acpi_status 392acpi_status
393acpi_hw_enable_runtime_gpe_block(struct acpi_gpe_xrupt_info *gpe_xrupt_info, 393acpi_hw_enable_runtime_gpe_block(struct acpi_gpe_xrupt_info *gpe_xrupt_info,
394 struct acpi_gpe_block_info * gpe_block, 394 struct acpi_gpe_block_info *gpe_block,
395 void *context) 395 void *context)
396{ 396{
397 u32 i; 397 u32 i;
diff --git a/drivers/acpi/acpica/hwxface.c b/drivers/acpi/acpica/hwxface.c
index 7caaaf3b8787..98c26ff39409 100644
--- a/drivers/acpi/acpica/hwxface.c
+++ b/drivers/acpi/acpica/hwxface.c
@@ -91,10 +91,9 @@ acpi_status acpi_reset(void)
91 * compatibility with other ACPI implementations that have allowed 91 * compatibility with other ACPI implementations that have allowed
92 * BIOS code with bad register width values to go unnoticed. 92 * BIOS code with bad register width values to go unnoticed.
93 */ 93 */
94 status = 94 status = acpi_os_write_port((acpi_io_address)reset_reg->address,
95 acpi_os_write_port((acpi_io_address) reset_reg->address, 95 acpi_gbl_FADT.reset_value,
96 acpi_gbl_FADT.reset_value, 96 ACPI_RESET_REGISTER_WIDTH);
97 ACPI_RESET_REGISTER_WIDTH);
98 } else { 97 } else {
99 /* Write the reset value to the reset register */ 98 /* Write the reset value to the reset register */
100 99
diff --git a/drivers/acpi/acpica/nsconvert.c b/drivers/acpi/acpica/nsconvert.c
index 256f56c583d6..c803bda7915c 100644
--- a/drivers/acpi/acpica/nsconvert.c
+++ b/drivers/acpi/acpica/nsconvert.c
@@ -318,7 +318,7 @@ acpi_ns_convert_to_buffer(union acpi_operand_object *original_object,
318 ******************************************************************************/ 318 ******************************************************************************/
319 319
320acpi_status 320acpi_status
321acpi_ns_convert_to_unicode(struct acpi_namespace_node * scope, 321acpi_ns_convert_to_unicode(struct acpi_namespace_node *scope,
322 union acpi_operand_object *original_object, 322 union acpi_operand_object *original_object,
323 union acpi_operand_object **return_object) 323 union acpi_operand_object **return_object)
324{ 324{
@@ -385,7 +385,7 @@ acpi_ns_convert_to_unicode(struct acpi_namespace_node * scope,
385 ******************************************************************************/ 385 ******************************************************************************/
386 386
387acpi_status 387acpi_status
388acpi_ns_convert_to_resource(struct acpi_namespace_node * scope, 388acpi_ns_convert_to_resource(struct acpi_namespace_node *scope,
389 union acpi_operand_object *original_object, 389 union acpi_operand_object *original_object,
390 union acpi_operand_object **return_object) 390 union acpi_operand_object **return_object)
391{ 391{
@@ -464,7 +464,7 @@ acpi_ns_convert_to_resource(struct acpi_namespace_node * scope,
464 ******************************************************************************/ 464 ******************************************************************************/
465 465
466acpi_status 466acpi_status
467acpi_ns_convert_to_reference(struct acpi_namespace_node * scope, 467acpi_ns_convert_to_reference(struct acpi_namespace_node *scope,
468 union acpi_operand_object *original_object, 468 union acpi_operand_object *original_object,
469 union acpi_operand_object **return_object) 469 union acpi_operand_object **return_object)
470{ 470{
diff --git a/drivers/acpi/acpica/nsnames.c b/drivers/acpi/acpica/nsnames.c
index eb6e1b88a51d..f03dd41e86d0 100644
--- a/drivers/acpi/acpica/nsnames.c
+++ b/drivers/acpi/acpica/nsnames.c
@@ -113,7 +113,7 @@ acpi_size acpi_ns_get_pathname_length(struct acpi_namespace_node *node)
113 113
114acpi_status 114acpi_status
115acpi_ns_handle_to_pathname(acpi_handle target_handle, 115acpi_ns_handle_to_pathname(acpi_handle target_handle,
116 struct acpi_buffer * buffer, u8 no_trailing) 116 struct acpi_buffer *buffer, u8 no_trailing)
117{ 117{
118 acpi_status status; 118 acpi_status status;
119 struct acpi_namespace_node *node; 119 struct acpi_namespace_node *node;
diff --git a/drivers/acpi/acpica/nsobject.c b/drivers/acpi/acpica/nsobject.c
index 051306f0d0d6..cfa2bb7162d8 100644
--- a/drivers/acpi/acpica/nsobject.c
+++ b/drivers/acpi/acpica/nsobject.c
@@ -399,7 +399,7 @@ acpi_ns_attach_data(struct acpi_namespace_node *node,
399 ******************************************************************************/ 399 ******************************************************************************/
400 400
401acpi_status 401acpi_status
402acpi_ns_detach_data(struct acpi_namespace_node * node, 402acpi_ns_detach_data(struct acpi_namespace_node *node,
403 acpi_object_handler handler) 403 acpi_object_handler handler)
404{ 404{
405 union acpi_operand_object *obj_desc; 405 union acpi_operand_object *obj_desc;
@@ -444,7 +444,7 @@ acpi_ns_detach_data(struct acpi_namespace_node * node,
444 ******************************************************************************/ 444 ******************************************************************************/
445 445
446acpi_status 446acpi_status
447acpi_ns_get_attached_data(struct acpi_namespace_node * node, 447acpi_ns_get_attached_data(struct acpi_namespace_node *node,
448 acpi_object_handler handler, void **data) 448 acpi_object_handler handler, void **data)
449{ 449{
450 union acpi_operand_object *obj_desc; 450 union acpi_operand_object *obj_desc;
diff --git a/drivers/acpi/acpica/nsrepair.c b/drivers/acpi/acpica/nsrepair.c
index 805e36de8707..9523d41c7ae9 100644
--- a/drivers/acpi/acpica/nsrepair.c
+++ b/drivers/acpi/acpica/nsrepair.c
@@ -399,7 +399,7 @@ static const struct acpi_simple_repair_info *acpi_ns_match_simple_repair(struct
399 ******************************************************************************/ 399 ******************************************************************************/
400 400
401acpi_status 401acpi_status
402acpi_ns_repair_null_element(struct acpi_evaluate_info * info, 402acpi_ns_repair_null_element(struct acpi_evaluate_info *info,
403 u32 expected_btypes, 403 u32 expected_btypes,
404 u32 package_index, 404 u32 package_index,
405 union acpi_operand_object **return_object_ptr) 405 union acpi_operand_object **return_object_ptr)
diff --git a/drivers/acpi/acpica/nsrepair2.c b/drivers/acpi/acpica/nsrepair2.c
index 63edbbbf9ae4..d5336122486b 100644
--- a/drivers/acpi/acpica/nsrepair2.c
+++ b/drivers/acpi/acpica/nsrepair2.c
@@ -54,9 +54,9 @@ ACPI_MODULE_NAME("nsrepair2")
54 * be repaired on a per-name basis. 54 * be repaired on a per-name basis.
55 */ 55 */
56typedef 56typedef
57acpi_status(*acpi_repair_function) (struct acpi_evaluate_info * info, 57acpi_status (*acpi_repair_function) (struct acpi_evaluate_info * info,
58 union acpi_operand_object 58 union acpi_operand_object **
59 **return_object_ptr); 59 return_object_ptr);
60 60
61typedef struct acpi_repair_info { 61typedef struct acpi_repair_info {
62 char name[ACPI_NAME_SIZE]; 62 char name[ACPI_NAME_SIZE];
diff --git a/drivers/acpi/acpica/nsutils.c b/drivers/acpi/acpica/nsutils.c
index c72cc62b92d0..784a30b76e0f 100644
--- a/drivers/acpi/acpica/nsutils.c
+++ b/drivers/acpi/acpica/nsutils.c
@@ -272,11 +272,11 @@ acpi_status acpi_ns_build_internal_name(struct acpi_namestring_info *info)
272 result = &internal_name[i]; 272 result = &internal_name[i];
273 } else if (num_segments == 2) { 273 } else if (num_segments == 2) {
274 internal_name[i] = AML_DUAL_NAME_PREFIX; 274 internal_name[i] = AML_DUAL_NAME_PREFIX;
275 result = &internal_name[(acpi_size) i + 1]; 275 result = &internal_name[(acpi_size)i + 1];
276 } else { 276 } else {
277 internal_name[i] = AML_MULTI_NAME_PREFIX_OP; 277 internal_name[i] = AML_MULTI_NAME_PREFIX_OP;
278 internal_name[(acpi_size) i + 1] = (char)num_segments; 278 internal_name[(acpi_size)i + 1] = (char)num_segments;
279 result = &internal_name[(acpi_size) i + 2]; 279 result = &internal_name[(acpi_size)i + 2];
280 } 280 }
281 } 281 }
282 282
@@ -456,7 +456,7 @@ acpi_ns_externalize_name(u32 internal_name_length,
456 456
457 names_index = prefix_length + 2; 457 names_index = prefix_length + 2;
458 num_segments = (u8) 458 num_segments = (u8)
459 internal_name[(acpi_size) prefix_length + 1]; 459 internal_name[(acpi_size)prefix_length + 1];
460 break; 460 break;
461 461
462 case AML_DUAL_NAME_PREFIX: 462 case AML_DUAL_NAME_PREFIX:
diff --git a/drivers/acpi/acpica/nsxfeval.c b/drivers/acpi/acpica/nsxfeval.c
index a7deeaa8eddc..614e4baacaf4 100644
--- a/drivers/acpi/acpica/nsxfeval.c
+++ b/drivers/acpi/acpica/nsxfeval.c
@@ -256,7 +256,7 @@ acpi_evaluate_object(acpi_handle handle,
256 * Allocate a new parameter block for the internal objects 256 * Allocate a new parameter block for the internal objects
257 * Add 1 to count to allow for null terminated internal list 257 * Add 1 to count to allow for null terminated internal list
258 */ 258 */
259 info->parameters = ACPI_ALLOCATE_ZEROED(((acpi_size) info-> 259 info->parameters = ACPI_ALLOCATE_ZEROED(((acpi_size)info->
260 param_count + 260 param_count +
261 1) * sizeof(void *)); 261 1) * sizeof(void *));
262 if (!info->parameters) { 262 if (!info->parameters) {
diff --git a/drivers/acpi/acpica/nsxfname.c b/drivers/acpi/acpica/nsxfname.c
index 285b82044e7b..76a1bd4bb070 100644
--- a/drivers/acpi/acpica/nsxfname.c
+++ b/drivers/acpi/acpica/nsxfname.c
@@ -78,7 +78,7 @@ static char *acpi_ns_copy_device_id(struct acpi_pnp_device_id *dest,
78 78
79acpi_status 79acpi_status
80acpi_get_handle(acpi_handle parent, 80acpi_get_handle(acpi_handle parent,
81 acpi_string pathname, acpi_handle * ret_handle) 81 acpi_string pathname, acpi_handle *ret_handle)
82{ 82{
83 acpi_status status; 83 acpi_status status;
84 struct acpi_namespace_node *node = NULL; 84 struct acpi_namespace_node *node = NULL;
@@ -155,7 +155,7 @@ ACPI_EXPORT_SYMBOL(acpi_get_handle)
155 * 155 *
156 ******************************************************************************/ 156 ******************************************************************************/
157acpi_status 157acpi_status
158acpi_get_name(acpi_handle handle, u32 name_type, struct acpi_buffer * buffer) 158acpi_get_name(acpi_handle handle, u32 name_type, struct acpi_buffer *buffer)
159{ 159{
160 acpi_status status; 160 acpi_status status;
161 struct acpi_namespace_node *node; 161 struct acpi_namespace_node *node;
@@ -448,7 +448,7 @@ acpi_get_object_info(acpi_handle handle,
448 /* Point past the CID PNP_DEVICE_ID array */ 448 /* Point past the CID PNP_DEVICE_ID array */
449 449
450 next_id_string += 450 next_id_string +=
451 ((acpi_size) cid_list->count * 451 ((acpi_size)cid_list->count *
452 sizeof(struct acpi_pnp_device_id)); 452 sizeof(struct acpi_pnp_device_id));
453 } 453 }
454 454
diff --git a/drivers/acpi/acpica/nsxfobj.c b/drivers/acpi/acpica/nsxfobj.c
index c312cd490450..32d372b85243 100644
--- a/drivers/acpi/acpica/nsxfobj.c
+++ b/drivers/acpi/acpica/nsxfobj.c
@@ -63,7 +63,7 @@ ACPI_MODULE_NAME("nsxfobj")
63 * DESCRIPTION: This routine returns the type associatd with a particular handle 63 * DESCRIPTION: This routine returns the type associatd with a particular handle
64 * 64 *
65 ******************************************************************************/ 65 ******************************************************************************/
66acpi_status acpi_get_type(acpi_handle handle, acpi_object_type * ret_type) 66acpi_status acpi_get_type(acpi_handle handle, acpi_object_type *ret_type)
67{ 67{
68 struct acpi_namespace_node *node; 68 struct acpi_namespace_node *node;
69 acpi_status status; 69 acpi_status status;
@@ -115,7 +115,7 @@ ACPI_EXPORT_SYMBOL(acpi_get_type)
115 * Handle. 115 * Handle.
116 * 116 *
117 ******************************************************************************/ 117 ******************************************************************************/
118acpi_status acpi_get_parent(acpi_handle handle, acpi_handle * ret_handle) 118acpi_status acpi_get_parent(acpi_handle handle, acpi_handle *ret_handle)
119{ 119{
120 struct acpi_namespace_node *node; 120 struct acpi_namespace_node *node;
121 struct acpi_namespace_node *parent_node; 121 struct acpi_namespace_node *parent_node;
@@ -183,7 +183,7 @@ ACPI_EXPORT_SYMBOL(acpi_get_parent)
183acpi_status 183acpi_status
184acpi_get_next_object(acpi_object_type type, 184acpi_get_next_object(acpi_object_type type,
185 acpi_handle parent, 185 acpi_handle parent,
186 acpi_handle child, acpi_handle * ret_handle) 186 acpi_handle child, acpi_handle *ret_handle)
187{ 187{
188 acpi_status status; 188 acpi_status status;
189 struct acpi_namespace_node *node; 189 struct acpi_namespace_node *node;
diff --git a/drivers/acpi/acpica/psargs.c b/drivers/acpi/acpica/psargs.c
index d48cbed342c1..c29c930ffa08 100644
--- a/drivers/acpi/acpica/psargs.c
+++ b/drivers/acpi/acpica/psargs.c
@@ -87,7 +87,7 @@ acpi_ps_get_next_package_length(struct acpi_parse_state *parser_state)
87 * used to encode the package length, either 0,1,2, or 3 87 * used to encode the package length, either 0,1,2, or 3
88 */ 88 */
89 byte_count = (aml[0] >> 6); 89 byte_count = (aml[0] >> 6);
90 parser_state->aml += ((acpi_size) byte_count + 1); 90 parser_state->aml += ((acpi_size)byte_count + 1);
91 91
92 /* Get bytes 3, 2, 1 as needed */ 92 /* Get bytes 3, 2, 1 as needed */
93 93
diff --git a/drivers/acpi/acpica/psparse.c b/drivers/acpi/acpica/psparse.c
index 8038ed2aca05..0a23897d8adf 100644
--- a/drivers/acpi/acpica/psparse.c
+++ b/drivers/acpi/acpica/psparse.c
@@ -130,8 +130,8 @@ u16 acpi_ps_peek_opcode(struct acpi_parse_state * parser_state)
130 ******************************************************************************/ 130 ******************************************************************************/
131 131
132acpi_status 132acpi_status
133acpi_ps_complete_this_op(struct acpi_walk_state * walk_state, 133acpi_ps_complete_this_op(struct acpi_walk_state *walk_state,
134 union acpi_parse_object * op) 134 union acpi_parse_object *op)
135{ 135{
136 union acpi_parse_object *prev; 136 union acpi_parse_object *prev;
137 union acpi_parse_object *next; 137 union acpi_parse_object *next;
diff --git a/drivers/acpi/acpica/psxface.c b/drivers/acpi/acpica/psxface.c
index 04b37fcca684..cf30cd821f5e 100644
--- a/drivers/acpi/acpica/psxface.c
+++ b/drivers/acpi/acpica/psxface.c
@@ -115,7 +115,7 @@ acpi_debug_trace(const char *name, u32 debug_level, u32 debug_layer, u32 flags)
115 * 115 *
116 ******************************************************************************/ 116 ******************************************************************************/
117 117
118acpi_status acpi_ps_execute_method(struct acpi_evaluate_info * info) 118acpi_status acpi_ps_execute_method(struct acpi_evaluate_info *info)
119{ 119{
120 acpi_status status; 120 acpi_status status;
121 union acpi_parse_object *op; 121 union acpi_parse_object *op;
diff --git a/drivers/acpi/acpica/rscalc.c b/drivers/acpi/acpica/rscalc.c
index 2b1209d73e44..f1e83addd5b4 100644
--- a/drivers/acpi/acpica/rscalc.c
+++ b/drivers/acpi/acpica/rscalc.c
@@ -112,7 +112,7 @@ acpi_rs_struct_option_length(struct acpi_resource_source *resource_source)
112 * resource_source_index (1). 112 * resource_source_index (1).
113 */ 113 */
114 if (resource_source->string_ptr) { 114 if (resource_source->string_ptr) {
115 return ((acpi_rs_length) (resource_source->string_length + 1)); 115 return ((acpi_rs_length)(resource_source->string_length + 1));
116 } 116 }
117 117
118 return (0); 118 return (0);
@@ -188,7 +188,7 @@ acpi_rs_stream_option_length(u32 resource_length,
188 188
189acpi_status 189acpi_status
190acpi_rs_get_aml_length(struct acpi_resource *resource, 190acpi_rs_get_aml_length(struct acpi_resource *resource,
191 acpi_size resource_list_size, acpi_size * size_needed) 191 acpi_size resource_list_size, acpi_size *size_needed)
192{ 192{
193 acpi_size aml_size_needed = 0; 193 acpi_size aml_size_needed = 0;
194 struct acpi_resource *resource_end; 194 struct acpi_resource *resource_end;
@@ -278,11 +278,11 @@ acpi_rs_get_aml_length(struct acpi_resource *resource,
278 * 16-Bit Address Resource: 278 * 16-Bit Address Resource:
279 * Add the size of the optional resource_source info 279 * Add the size of the optional resource_source info
280 */ 280 */
281 total_size = (acpi_rs_length) (total_size + 281 total_size = (acpi_rs_length)(total_size +
282 acpi_rs_struct_option_length 282 acpi_rs_struct_option_length
283 (&resource->data. 283 (&resource->data.
284 address16. 284 address16.
285 resource_source)); 285 resource_source));
286 break; 286 break;
287 287
288 case ACPI_RESOURCE_TYPE_ADDRESS32: 288 case ACPI_RESOURCE_TYPE_ADDRESS32:
@@ -290,11 +290,11 @@ acpi_rs_get_aml_length(struct acpi_resource *resource,
290 * 32-Bit Address Resource: 290 * 32-Bit Address Resource:
291 * Add the size of the optional resource_source info 291 * Add the size of the optional resource_source info
292 */ 292 */
293 total_size = (acpi_rs_length) (total_size + 293 total_size = (acpi_rs_length)(total_size +
294 acpi_rs_struct_option_length 294 acpi_rs_struct_option_length
295 (&resource->data. 295 (&resource->data.
296 address32. 296 address32.
297 resource_source)); 297 resource_source));
298 break; 298 break;
299 299
300 case ACPI_RESOURCE_TYPE_ADDRESS64: 300 case ACPI_RESOURCE_TYPE_ADDRESS64:
@@ -302,11 +302,11 @@ acpi_rs_get_aml_length(struct acpi_resource *resource,
302 * 64-Bit Address Resource: 302 * 64-Bit Address Resource:
303 * Add the size of the optional resource_source info 303 * Add the size of the optional resource_source info
304 */ 304 */
305 total_size = (acpi_rs_length) (total_size + 305 total_size = (acpi_rs_length)(total_size +
306 acpi_rs_struct_option_length 306 acpi_rs_struct_option_length
307 (&resource->data. 307 (&resource->data.
308 address64. 308 address64.
309 resource_source)); 309 resource_source));
310 break; 310 break;
311 311
312 case ACPI_RESOURCE_TYPE_EXTENDED_IRQ: 312 case ACPI_RESOURCE_TYPE_EXTENDED_IRQ:
@@ -315,28 +315,28 @@ acpi_rs_get_aml_length(struct acpi_resource *resource,
315 * Add the size of each additional optional interrupt beyond the 315 * Add the size of each additional optional interrupt beyond the
316 * required 1 (4 bytes for each u32 interrupt number) 316 * required 1 (4 bytes for each u32 interrupt number)
317 */ 317 */
318 total_size = (acpi_rs_length) (total_size + 318 total_size = (acpi_rs_length)(total_size +
319 ((resource->data. 319 ((resource->data.
320 extended_irq.
321 interrupt_count -
322 1) * 4) +
323 /* Add the size of the optional resource_source info */
324 acpi_rs_struct_option_length
325 (&resource->data.
326 extended_irq. 320 extended_irq.
327 resource_source)); 321 interrupt_count -
322 1) * 4) +
323 /* Add the size of the optional resource_source info */
324 acpi_rs_struct_option_length
325 (&resource->data.
326 extended_irq.
327 resource_source));
328 break; 328 break;
329 329
330 case ACPI_RESOURCE_TYPE_GPIO: 330 case ACPI_RESOURCE_TYPE_GPIO:
331 331
332 total_size = (acpi_rs_length) (total_size + 332 total_size = (acpi_rs_length)(total_size +
333 (resource->data.gpio. 333 (resource->data.gpio.
334 pin_table_length * 2) + 334 pin_table_length * 2) +
335 resource->data.gpio. 335 resource->data.gpio.
336 resource_source. 336 resource_source.
337 string_length + 337 string_length +
338 resource->data.gpio. 338 resource->data.gpio.
339 vendor_length); 339 vendor_length);
340 340
341 break; 341 break;
342 342
@@ -348,14 +348,14 @@ acpi_rs_get_aml_length(struct acpi_resource *resource,
348 common_serial_bus. 348 common_serial_bus.
349 type]; 349 type];
350 350
351 total_size = (acpi_rs_length) (total_size + 351 total_size = (acpi_rs_length)(total_size +
352 resource->data. 352 resource->data.
353 i2c_serial_bus. 353 i2c_serial_bus.
354 resource_source. 354 resource_source.
355 string_length + 355 string_length +
356 resource->data. 356 resource->data.
357 i2c_serial_bus. 357 i2c_serial_bus.
358 vendor_length); 358 vendor_length);
359 359
360 break; 360 break;
361 361
@@ -397,8 +397,8 @@ acpi_rs_get_aml_length(struct acpi_resource *resource,
397 ******************************************************************************/ 397 ******************************************************************************/
398 398
399acpi_status 399acpi_status
400acpi_rs_get_list_length(u8 * aml_buffer, 400acpi_rs_get_list_length(u8 *aml_buffer,
401 u32 aml_buffer_length, acpi_size * size_needed) 401 u32 aml_buffer_length, acpi_size *size_needed)
402{ 402{
403 acpi_status status; 403 acpi_status status;
404 u8 *end_aml; 404 u8 *end_aml;
@@ -610,7 +610,7 @@ acpi_rs_get_list_length(u8 * aml_buffer,
610 610
611acpi_status 611acpi_status
612acpi_rs_get_pci_routing_table_length(union acpi_operand_object *package_object, 612acpi_rs_get_pci_routing_table_length(union acpi_operand_object *package_object,
613 acpi_size * buffer_size_needed) 613 acpi_size *buffer_size_needed)
614{ 614{
615 u32 number_of_elements; 615 u32 number_of_elements;
616 acpi_size temp_size_needed = 0; 616 acpi_size temp_size_needed = 0;
diff --git a/drivers/acpi/acpica/rscreate.c b/drivers/acpi/acpica/rscreate.c
index 12978891e842..809b61c114fe 100644
--- a/drivers/acpi/acpica/rscreate.c
+++ b/drivers/acpi/acpica/rscreate.c
@@ -347,7 +347,7 @@ acpi_rs_create_pci_routing_table(union acpi_operand_object *package_object,
347 (u8 *) output_buffer->pointer); 347 (u8 *) output_buffer->pointer);
348 path_buffer.pointer = user_prt->source; 348 path_buffer.pointer = user_prt->source;
349 349
350 status = acpi_ns_handle_to_pathname((acpi_handle) node, &path_buffer, FALSE); 350 status = acpi_ns_handle_to_pathname((acpi_handle)node, &path_buffer, FALSE);
351 351
352 /* +1 to include null terminator */ 352 /* +1 to include null terminator */
353 353
diff --git a/drivers/acpi/acpica/rsmisc.c b/drivers/acpi/acpica/rsmisc.c
index ce3d0b77ec89..25165ca42051 100644
--- a/drivers/acpi/acpica/rsmisc.c
+++ b/drivers/acpi/acpica/rsmisc.c
@@ -87,7 +87,7 @@ acpi_rs_convert_aml_to_resource(struct acpi_resource *resource,
87 return_ACPI_STATUS(AE_BAD_PARAMETER); 87 return_ACPI_STATUS(AE_BAD_PARAMETER);
88 } 88 }
89 89
90 if (((acpi_size) resource) & 0x3) { 90 if (((acpi_size)resource) & 0x3) {
91 91
92 /* Each internal resource struct is expected to be 32-bit aligned */ 92 /* Each internal resource struct is expected to be 32-bit aligned */
93 93
diff --git a/drivers/acpi/acpica/rsutils.c b/drivers/acpi/acpica/rsutils.c
index e0d60239d6ff..fa491c64c040 100644
--- a/drivers/acpi/acpica/rsutils.c
+++ b/drivers/acpi/acpica/rsutils.c
@@ -338,7 +338,7 @@ acpi_rs_get_resource_source(acpi_rs_length resource_length,
338 * Note: Some resource descriptors will have an additional null, so 338 * Note: Some resource descriptors will have an additional null, so
339 * we add 1 to the minimum length. 339 * we add 1 to the minimum length.
340 */ 340 */
341 if (total_length > (acpi_rsdesc_size) (minimum_length + 1)) { 341 if (total_length > (acpi_rsdesc_size)(minimum_length + 1)) {
342 342
343 /* Get the resource_source_index */ 343 /* Get the resource_source_index */
344 344
@@ -377,7 +377,7 @@ acpi_rs_get_resource_source(acpi_rs_length resource_length,
377 ACPI_CAST_PTR(char, 377 ACPI_CAST_PTR(char,
378 &aml_resource_source[1])); 378 &aml_resource_source[1]));
379 379
380 return ((acpi_rs_length) total_length); 380 return ((acpi_rs_length)total_length);
381 } 381 }
382 382
383 /* resource_source is not present */ 383 /* resource_source is not present */
@@ -406,9 +406,9 @@ acpi_rs_get_resource_source(acpi_rs_length resource_length,
406 ******************************************************************************/ 406 ******************************************************************************/
407 407
408acpi_rsdesc_size 408acpi_rsdesc_size
409acpi_rs_set_resource_source(union aml_resource * aml, 409acpi_rs_set_resource_source(union aml_resource *aml,
410 acpi_rs_length minimum_length, 410 acpi_rs_length minimum_length,
411 struct acpi_resource_source * resource_source) 411 struct acpi_resource_source *resource_source)
412{ 412{
413 u8 *aml_resource_source; 413 u8 *aml_resource_source;
414 acpi_rsdesc_size descriptor_length; 414 acpi_rsdesc_size descriptor_length;
@@ -466,8 +466,8 @@ acpi_rs_set_resource_source(union aml_resource * aml,
466 ******************************************************************************/ 466 ******************************************************************************/
467 467
468acpi_status 468acpi_status
469acpi_rs_get_prt_method_data(struct acpi_namespace_node * node, 469acpi_rs_get_prt_method_data(struct acpi_namespace_node *node,
470 struct acpi_buffer * ret_buffer) 470 struct acpi_buffer *ret_buffer)
471{ 471{
472 union acpi_operand_object *obj_desc; 472 union acpi_operand_object *obj_desc;
473 acpi_status status; 473 acpi_status status;
diff --git a/drivers/acpi/acpica/rsxface.c b/drivers/acpi/acpica/rsxface.c
index 900933be9909..465ed8137167 100644
--- a/drivers/acpi/acpica/rsxface.c
+++ b/drivers/acpi/acpica/rsxface.c
@@ -433,8 +433,8 @@ ACPI_EXPORT_SYMBOL(acpi_resource_to_address64)
433acpi_status 433acpi_status
434acpi_get_vendor_resource(acpi_handle device_handle, 434acpi_get_vendor_resource(acpi_handle device_handle,
435 char *name, 435 char *name,
436 struct acpi_vendor_uuid * uuid, 436 struct acpi_vendor_uuid *uuid,
437 struct acpi_buffer * ret_buffer) 437 struct acpi_buffer *ret_buffer)
438{ 438{
439 struct acpi_vendor_walk_info info; 439 struct acpi_vendor_walk_info info;
440 acpi_status status; 440 acpi_status status;
@@ -539,7 +539,7 @@ acpi_rs_match_vendor_resource(struct acpi_resource *resource, void *context)
539 ******************************************************************************/ 539 ******************************************************************************/
540 540
541acpi_status 541acpi_status
542acpi_walk_resource_buffer(struct acpi_buffer * buffer, 542acpi_walk_resource_buffer(struct acpi_buffer *buffer,
543 acpi_walk_resource_callback user_function, 543 acpi_walk_resource_callback user_function,
544 void *context) 544 void *context)
545{ 545{
diff --git a/drivers/acpi/acpica/tbdata.c b/drivers/acpi/acpica/tbdata.c
index 7da79ce74080..d471df3988bb 100644
--- a/drivers/acpi/acpica/tbdata.c
+++ b/drivers/acpi/acpica/tbdata.c
@@ -368,7 +368,7 @@ acpi_status acpi_tb_validate_temp_table(struct acpi_table_desc *table_desc)
368 *****************************************************************************/ 368 *****************************************************************************/
369 369
370acpi_status 370acpi_status
371acpi_tb_verify_temp_table(struct acpi_table_desc * table_desc, char *signature) 371acpi_tb_verify_temp_table(struct acpi_table_desc *table_desc, char *signature)
372{ 372{
373 acpi_status status = AE_OK; 373 acpi_status status = AE_OK;
374 374
@@ -454,7 +454,7 @@ acpi_status acpi_tb_resize_root_table_list(void)
454 table_count = acpi_gbl_root_table_list.current_table_count; 454 table_count = acpi_gbl_root_table_list.current_table_count;
455 } 455 }
456 456
457 tables = ACPI_ALLOCATE_ZEROED(((acpi_size) table_count + 457 tables = ACPI_ALLOCATE_ZEROED(((acpi_size)table_count +
458 ACPI_ROOT_TABLE_SIZE_INCREMENT) * 458 ACPI_ROOT_TABLE_SIZE_INCREMENT) *
459 sizeof(struct acpi_table_desc)); 459 sizeof(struct acpi_table_desc));
460 if (!tables) { 460 if (!tables) {
@@ -467,8 +467,7 @@ acpi_status acpi_tb_resize_root_table_list(void)
467 467
468 if (acpi_gbl_root_table_list.tables) { 468 if (acpi_gbl_root_table_list.tables) {
469 memcpy(tables, acpi_gbl_root_table_list.tables, 469 memcpy(tables, acpi_gbl_root_table_list.tables,
470 (acpi_size) table_count * 470 (acpi_size)table_count * sizeof(struct acpi_table_desc));
471 sizeof(struct acpi_table_desc));
472 471
473 if (acpi_gbl_root_table_list.flags & ACPI_ROOT_ORIGIN_ALLOCATED) { 472 if (acpi_gbl_root_table_list.flags & ACPI_ROOT_ORIGIN_ALLOCATED) {
474 ACPI_FREE(acpi_gbl_root_table_list.tables); 473 ACPI_FREE(acpi_gbl_root_table_list.tables);
@@ -701,7 +700,7 @@ acpi_status acpi_tb_release_owner_id(u32 table_index)
701 * 700 *
702 ******************************************************************************/ 701 ******************************************************************************/
703 702
704acpi_status acpi_tb_get_owner_id(u32 table_index, acpi_owner_id * owner_id) 703acpi_status acpi_tb_get_owner_id(u32 table_index, acpi_owner_id *owner_id)
705{ 704{
706 acpi_status status = AE_BAD_PARAMETER; 705 acpi_status status = AE_BAD_PARAMETER;
707 706
diff --git a/drivers/acpi/acpica/tbfadt.c b/drivers/acpi/acpica/tbfadt.c
index 635d9513994d..620806965243 100644
--- a/drivers/acpi/acpica/tbfadt.c
+++ b/drivers/acpi/acpica/tbfadt.c
@@ -344,7 +344,7 @@ void acpi_tb_parse_fadt(void)
344 344
345 /* Obtain the DSDT and FACS tables via their addresses within the FADT */ 345 /* Obtain the DSDT and FACS tables via their addresses within the FADT */
346 346
347 acpi_tb_install_fixed_table((acpi_physical_address) acpi_gbl_FADT.Xdsdt, 347 acpi_tb_install_fixed_table((acpi_physical_address)acpi_gbl_FADT.Xdsdt,
348 ACPI_SIG_DSDT, &acpi_gbl_dsdt_index); 348 ACPI_SIG_DSDT, &acpi_gbl_dsdt_index);
349 349
350 /* If Hardware Reduced flag is set, there is no FACS */ 350 /* If Hardware Reduced flag is set, there is no FACS */
diff --git a/drivers/acpi/acpica/tbutils.c b/drivers/acpi/acpica/tbutils.c
index 9240c76d2823..a962a85b1d02 100644
--- a/drivers/acpi/acpica/tbutils.c
+++ b/drivers/acpi/acpica/tbutils.c
@@ -231,7 +231,7 @@ acpi_tb_get_root_table_entry(u8 *table_entry, u32 table_entry_size)
231 ACPI_FORMAT_UINT64(address64))); 231 ACPI_FORMAT_UINT64(address64)));
232 } 232 }
233#endif 233#endif
234 return ((acpi_physical_address) (address64)); 234 return ((acpi_physical_address)(address64));
235 } 235 }
236} 236}
237 237
@@ -287,12 +287,12 @@ acpi_status __init acpi_tb_parse_root_table(acpi_physical_address rsdp_address)
287 * the XSDT if the revision is > 1 and the XSDT pointer is present, 287 * the XSDT if the revision is > 1 and the XSDT pointer is present,
288 * as per the ACPI specification. 288 * as per the ACPI specification.
289 */ 289 */
290 address = (acpi_physical_address) rsdp->xsdt_physical_address; 290 address = (acpi_physical_address)rsdp->xsdt_physical_address;
291 table_entry_size = ACPI_XSDT_ENTRY_SIZE; 291 table_entry_size = ACPI_XSDT_ENTRY_SIZE;
292 } else { 292 } else {
293 /* Root table is an RSDT (32-bit physical addresses) */ 293 /* Root table is an RSDT (32-bit physical addresses) */
294 294
295 address = (acpi_physical_address) rsdp->rsdt_physical_address; 295 address = (acpi_physical_address)rsdp->rsdt_physical_address;
296 table_entry_size = ACPI_RSDT_ENTRY_SIZE; 296 table_entry_size = ACPI_RSDT_ENTRY_SIZE;
297 } 297 }
298 298
diff --git a/drivers/acpi/acpica/tbxface.c b/drivers/acpi/acpica/tbxface.c
index 326df65decef..3ecec937e8c9 100644
--- a/drivers/acpi/acpica/tbxface.c
+++ b/drivers/acpi/acpica/tbxface.c
@@ -99,7 +99,7 @@ acpi_status acpi_allocate_root_table(u32 initial_table_count)
99 ******************************************************************************/ 99 ******************************************************************************/
100 100
101acpi_status __init 101acpi_status __init
102acpi_initialize_tables(struct acpi_table_desc * initial_table_array, 102acpi_initialize_tables(struct acpi_table_desc *initial_table_array,
103 u32 initial_table_count, u8 allow_resize) 103 u32 initial_table_count, u8 allow_resize)
104{ 104{
105 acpi_physical_address rsdp_address; 105 acpi_physical_address rsdp_address;
@@ -120,7 +120,7 @@ acpi_initialize_tables(struct acpi_table_desc * initial_table_array,
120 /* Root Table Array has been statically allocated by the host */ 120 /* Root Table Array has been statically allocated by the host */
121 121
122 memset(initial_table_array, 0, 122 memset(initial_table_array, 0,
123 (acpi_size) initial_table_count * 123 (acpi_size)initial_table_count *
124 sizeof(struct acpi_table_desc)); 124 sizeof(struct acpi_table_desc));
125 125
126 acpi_gbl_root_table_list.tables = initial_table_array; 126 acpi_gbl_root_table_list.tables = initial_table_array;
@@ -352,7 +352,7 @@ ACPI_EXPORT_SYMBOL(acpi_get_table)
352 * 352 *
353 ******************************************************************************/ 353 ******************************************************************************/
354acpi_status 354acpi_status
355acpi_get_table_by_index(u32 table_index, struct acpi_table_header ** table) 355acpi_get_table_by_index(u32 table_index, struct acpi_table_header **table)
356{ 356{
357 acpi_status status; 357 acpi_status status;
358 358
diff --git a/drivers/acpi/acpica/tbxfroot.c b/drivers/acpi/acpica/tbxfroot.c
index b9a78e457d19..adb6cfc54661 100644
--- a/drivers/acpi/acpica/tbxfroot.c
+++ b/drivers/acpi/acpica/tbxfroot.c
@@ -90,7 +90,7 @@ u32 acpi_tb_get_rsdp_length(struct acpi_table_rsdp *rsdp)
90 * 90 *
91 ******************************************************************************/ 91 ******************************************************************************/
92 92
93acpi_status acpi_tb_validate_rsdp(struct acpi_table_rsdp * rsdp) 93acpi_status acpi_tb_validate_rsdp(struct acpi_table_rsdp *rsdp)
94{ 94{
95 95
96 /* 96 /*
@@ -142,7 +142,7 @@ acpi_status acpi_tb_validate_rsdp(struct acpi_table_rsdp * rsdp)
142 * 142 *
143 ******************************************************************************/ 143 ******************************************************************************/
144 144
145acpi_status __init acpi_find_root_pointer(acpi_physical_address * table_address) 145acpi_status __init acpi_find_root_pointer(acpi_physical_address *table_address)
146{ 146{
147 u8 *table_ptr; 147 u8 *table_ptr;
148 u8 *mem_rover; 148 u8 *mem_rover;
@@ -201,7 +201,7 @@ acpi_status __init acpi_find_root_pointer(acpi_physical_address * table_address)
201 (u32) ACPI_PTR_DIFF(mem_rover, table_ptr); 201 (u32) ACPI_PTR_DIFF(mem_rover, table_ptr);
202 202
203 *table_address = 203 *table_address =
204 (acpi_physical_address) physical_address; 204 (acpi_physical_address)physical_address;
205 return_ACPI_STATUS(AE_OK); 205 return_ACPI_STATUS(AE_OK);
206 } 206 }
207 } 207 }
@@ -234,7 +234,7 @@ acpi_status __init acpi_find_root_pointer(acpi_physical_address * table_address)
234 (ACPI_HI_RSDP_WINDOW_BASE + 234 (ACPI_HI_RSDP_WINDOW_BASE +
235 ACPI_PTR_DIFF(mem_rover, table_ptr)); 235 ACPI_PTR_DIFF(mem_rover, table_ptr));
236 236
237 *table_address = (acpi_physical_address) physical_address; 237 *table_address = (acpi_physical_address)physical_address;
238 return_ACPI_STATUS(AE_OK); 238 return_ACPI_STATUS(AE_OK);
239 } 239 }
240 240
diff --git a/drivers/acpi/acpica/utalloc.c b/drivers/acpi/acpica/utalloc.c
index 3dbdc3ab8b78..13324a27b99b 100644
--- a/drivers/acpi/acpica/utalloc.c
+++ b/drivers/acpi/acpica/utalloc.c
@@ -231,7 +231,7 @@ acpi_status acpi_ut_delete_caches(void)
231 * 231 *
232 ******************************************************************************/ 232 ******************************************************************************/
233 233
234acpi_status acpi_ut_validate_buffer(struct acpi_buffer * buffer) 234acpi_status acpi_ut_validate_buffer(struct acpi_buffer *buffer)
235{ 235{
236 236
237 /* Obviously, the structure pointer must be valid */ 237 /* Obviously, the structure pointer must be valid */
@@ -272,8 +272,7 @@ acpi_status acpi_ut_validate_buffer(struct acpi_buffer * buffer)
272 ******************************************************************************/ 272 ******************************************************************************/
273 273
274acpi_status 274acpi_status
275acpi_ut_initialize_buffer(struct acpi_buffer * buffer, 275acpi_ut_initialize_buffer(struct acpi_buffer *buffer, acpi_size required_length)
276 acpi_size required_length)
277{ 276{
278 acpi_size input_buffer_length; 277 acpi_size input_buffer_length;
279 278
diff --git a/drivers/acpi/acpica/utbuffer.c b/drivers/acpi/acpica/utbuffer.c
index 0cfb2b8edad5..bd31faf5da7c 100644
--- a/drivers/acpi/acpica/utbuffer.c
+++ b/drivers/acpi/acpica/utbuffer.c
@@ -106,31 +106,31 @@ void acpi_ut_dump_buffer(u8 *buffer, u32 count, u32 display, u32 base_offset)
106 default: /* Default is BYTE display */ 106 default: /* Default is BYTE display */
107 107
108 acpi_os_printf("%02X ", 108 acpi_os_printf("%02X ",
109 buffer[(acpi_size) i + j]); 109 buffer[(acpi_size)i + j]);
110 break; 110 break;
111 111
112 case DB_WORD_DISPLAY: 112 case DB_WORD_DISPLAY:
113 113
114 ACPI_MOVE_16_TO_32(&temp32, 114 ACPI_MOVE_16_TO_32(&temp32,
115 &buffer[(acpi_size) i + j]); 115 &buffer[(acpi_size)i + j]);
116 acpi_os_printf("%04X ", temp32); 116 acpi_os_printf("%04X ", temp32);
117 break; 117 break;
118 118
119 case DB_DWORD_DISPLAY: 119 case DB_DWORD_DISPLAY:
120 120
121 ACPI_MOVE_32_TO_32(&temp32, 121 ACPI_MOVE_32_TO_32(&temp32,
122 &buffer[(acpi_size) i + j]); 122 &buffer[(acpi_size)i + j]);
123 acpi_os_printf("%08X ", temp32); 123 acpi_os_printf("%08X ", temp32);
124 break; 124 break;
125 125
126 case DB_QWORD_DISPLAY: 126 case DB_QWORD_DISPLAY:
127 127
128 ACPI_MOVE_32_TO_32(&temp32, 128 ACPI_MOVE_32_TO_32(&temp32,
129 &buffer[(acpi_size) i + j]); 129 &buffer[(acpi_size)i + j]);
130 acpi_os_printf("%08X", temp32); 130 acpi_os_printf("%08X", temp32);
131 131
132 ACPI_MOVE_32_TO_32(&temp32, 132 ACPI_MOVE_32_TO_32(&temp32,
133 &buffer[(acpi_size) i + j + 133 &buffer[(acpi_size)i + j +
134 4]); 134 4]);
135 acpi_os_printf("%08X ", temp32); 135 acpi_os_printf("%08X ", temp32);
136 break; 136 break;
@@ -158,7 +158,7 @@ void acpi_ut_dump_buffer(u8 *buffer, u32 count, u32 display, u32 base_offset)
158 acpi_os_printf("// "); 158 acpi_os_printf("// ");
159 } 159 }
160 160
161 buf_char = buffer[(acpi_size) i + j]; 161 buf_char = buffer[(acpi_size)i + j];
162 if (isprint(buf_char)) { 162 if (isprint(buf_char)) {
163 acpi_os_printf("%c", buf_char); 163 acpi_os_printf("%c", buf_char);
164 } else { 164 } else {
@@ -274,31 +274,31 @@ acpi_ut_dump_buffer_to_file(ACPI_FILE file,
274 default: /* Default is BYTE display */ 274 default: /* Default is BYTE display */
275 275
276 acpi_ut_file_printf(file, "%02X ", 276 acpi_ut_file_printf(file, "%02X ",
277 buffer[(acpi_size) i + j]); 277 buffer[(acpi_size)i + j]);
278 break; 278 break;
279 279
280 case DB_WORD_DISPLAY: 280 case DB_WORD_DISPLAY:
281 281
282 ACPI_MOVE_16_TO_32(&temp32, 282 ACPI_MOVE_16_TO_32(&temp32,
283 &buffer[(acpi_size) i + j]); 283 &buffer[(acpi_size)i + j]);
284 acpi_ut_file_printf(file, "%04X ", temp32); 284 acpi_ut_file_printf(file, "%04X ", temp32);
285 break; 285 break;
286 286
287 case DB_DWORD_DISPLAY: 287 case DB_DWORD_DISPLAY:
288 288
289 ACPI_MOVE_32_TO_32(&temp32, 289 ACPI_MOVE_32_TO_32(&temp32,
290 &buffer[(acpi_size) i + j]); 290 &buffer[(acpi_size)i + j]);
291 acpi_ut_file_printf(file, "%08X ", temp32); 291 acpi_ut_file_printf(file, "%08X ", temp32);
292 break; 292 break;
293 293
294 case DB_QWORD_DISPLAY: 294 case DB_QWORD_DISPLAY:
295 295
296 ACPI_MOVE_32_TO_32(&temp32, 296 ACPI_MOVE_32_TO_32(&temp32,
297 &buffer[(acpi_size) i + j]); 297 &buffer[(acpi_size)i + j]);
298 acpi_ut_file_printf(file, "%08X", temp32); 298 acpi_ut_file_printf(file, "%08X", temp32);
299 299
300 ACPI_MOVE_32_TO_32(&temp32, 300 ACPI_MOVE_32_TO_32(&temp32,
301 &buffer[(acpi_size) i + j + 301 &buffer[(acpi_size)i + j +
302 4]); 302 4]);
303 acpi_ut_file_printf(file, "%08X ", temp32); 303 acpi_ut_file_printf(file, "%08X ", temp32);
304 break; 304 break;
@@ -318,7 +318,7 @@ acpi_ut_dump_buffer_to_file(ACPI_FILE file,
318 return; 318 return;
319 } 319 }
320 320
321 buf_char = buffer[(acpi_size) i + j]; 321 buf_char = buffer[(acpi_size)i + j];
322 if (isprint(buf_char)) { 322 if (isprint(buf_char)) {
323 acpi_ut_file_printf(file, "%c", buf_char); 323 acpi_ut_file_printf(file, "%c", buf_char);
324 } else { 324 } else {
diff --git a/drivers/acpi/acpica/utcache.c b/drivers/acpi/acpica/utcache.c
index f8e9978888e1..3b8d23ef351f 100644
--- a/drivers/acpi/acpica/utcache.c
+++ b/drivers/acpi/acpica/utcache.c
@@ -105,7 +105,7 @@ acpi_os_create_cache(char *cache_name,
105 * 105 *
106 ******************************************************************************/ 106 ******************************************************************************/
107 107
108acpi_status acpi_os_purge_cache(struct acpi_memory_list * cache) 108acpi_status acpi_os_purge_cache(struct acpi_memory_list *cache)
109{ 109{
110 void *next; 110 void *next;
111 acpi_status status; 111 acpi_status status;
@@ -151,7 +151,7 @@ acpi_status acpi_os_purge_cache(struct acpi_memory_list * cache)
151 * 151 *
152 ******************************************************************************/ 152 ******************************************************************************/
153 153
154acpi_status acpi_os_delete_cache(struct acpi_memory_list * cache) 154acpi_status acpi_os_delete_cache(struct acpi_memory_list *cache)
155{ 155{
156 acpi_status status; 156 acpi_status status;
157 157
@@ -184,8 +184,7 @@ acpi_status acpi_os_delete_cache(struct acpi_memory_list * cache)
184 * 184 *
185 ******************************************************************************/ 185 ******************************************************************************/
186 186
187acpi_status 187acpi_status acpi_os_release_object(struct acpi_memory_list *cache, void *object)
188acpi_os_release_object(struct acpi_memory_list * cache, void *object)
189{ 188{
190 acpi_status status; 189 acpi_status status;
191 190
diff --git a/drivers/acpi/acpica/utcopy.c b/drivers/acpi/acpica/utcopy.c
index 98d53e59ce55..82f971402d85 100644
--- a/drivers/acpi/acpica/utcopy.c
+++ b/drivers/acpi/acpica/utcopy.c
@@ -53,7 +53,7 @@ ACPI_MODULE_NAME("utcopy")
53static acpi_status 53static acpi_status
54acpi_ut_copy_isimple_to_esimple(union acpi_operand_object *internal_object, 54acpi_ut_copy_isimple_to_esimple(union acpi_operand_object *internal_object,
55 union acpi_object *external_object, 55 union acpi_object *external_object,
56 u8 * data_space, acpi_size * buffer_space_used); 56 u8 *data_space, acpi_size *buffer_space_used);
57 57
58static acpi_status 58static acpi_status
59acpi_ut_copy_ielement_to_ielement(u8 object_type, 59acpi_ut_copy_ielement_to_ielement(u8 object_type,
@@ -63,7 +63,7 @@ acpi_ut_copy_ielement_to_ielement(u8 object_type,
63 63
64static acpi_status 64static acpi_status
65acpi_ut_copy_ipackage_to_epackage(union acpi_operand_object *internal_object, 65acpi_ut_copy_ipackage_to_epackage(union acpi_operand_object *internal_object,
66 u8 * buffer, acpi_size * space_used); 66 u8 *buffer, acpi_size *space_used);
67 67
68static acpi_status 68static acpi_status
69acpi_ut_copy_esimple_to_isimple(union acpi_object *user_obj, 69acpi_ut_copy_esimple_to_isimple(union acpi_object *user_obj,
@@ -111,7 +111,7 @@ acpi_ut_copy_ipackage_to_ipackage(union acpi_operand_object *source_obj,
111static acpi_status 111static acpi_status
112acpi_ut_copy_isimple_to_esimple(union acpi_operand_object *internal_object, 112acpi_ut_copy_isimple_to_esimple(union acpi_operand_object *internal_object,
113 union acpi_object *external_object, 113 union acpi_object *external_object,
114 u8 * data_space, acpi_size * buffer_space_used) 114 u8 *data_space, acpi_size *buffer_space_used)
115{ 115{
116 acpi_status status = AE_OK; 116 acpi_status status = AE_OK;
117 117
@@ -151,7 +151,7 @@ acpi_ut_copy_isimple_to_esimple(union acpi_operand_object *internal_object,
151 151
152 memcpy((void *)data_space, 152 memcpy((void *)data_space,
153 (void *)internal_object->string.pointer, 153 (void *)internal_object->string.pointer,
154 (acpi_size) internal_object->string.length + 1); 154 (acpi_size)internal_object->string.length + 1);
155 break; 155 break;
156 156
157 case ACPI_TYPE_BUFFER: 157 case ACPI_TYPE_BUFFER:
@@ -331,7 +331,7 @@ acpi_ut_copy_ielement_to_eelement(u8 object_type,
331 331
332static acpi_status 332static acpi_status
333acpi_ut_copy_ipackage_to_epackage(union acpi_operand_object *internal_object, 333acpi_ut_copy_ipackage_to_epackage(union acpi_operand_object *internal_object,
334 u8 * buffer, acpi_size * space_used) 334 u8 *buffer, acpi_size *space_used)
335{ 335{
336 union acpi_object *external_object; 336 union acpi_object *external_object;
337 acpi_status status; 337 acpi_status status;
@@ -362,7 +362,7 @@ acpi_ut_copy_ipackage_to_epackage(union acpi_operand_object *internal_object,
362 * Leave room for an array of ACPI_OBJECTS in the buffer 362 * Leave room for an array of ACPI_OBJECTS in the buffer
363 * and move the free space past it 363 * and move the free space past it
364 */ 364 */
365 info.length += (acpi_size) external_object->package.count * 365 info.length += (acpi_size)external_object->package.count *
366 ACPI_ROUND_UP_TO_NATIVE_WORD(sizeof(union acpi_object)); 366 ACPI_ROUND_UP_TO_NATIVE_WORD(sizeof(union acpi_object));
367 info.free_space += external_object->package.count * 367 info.free_space += external_object->package.count *
368 ACPI_ROUND_UP_TO_NATIVE_WORD(sizeof(union acpi_object)); 368 ACPI_ROUND_UP_TO_NATIVE_WORD(sizeof(union acpi_object));
@@ -738,7 +738,7 @@ acpi_ut_copy_simple_object(union acpi_operand_object *source_desc,
738 */ 738 */
739 if (source_desc->string.pointer) { 739 if (source_desc->string.pointer) {
740 dest_desc->string.pointer = 740 dest_desc->string.pointer =
741 ACPI_ALLOCATE((acpi_size) source_desc->string. 741 ACPI_ALLOCATE((acpi_size)source_desc->string.
742 length + 1); 742 length + 1);
743 if (!dest_desc->string.pointer) { 743 if (!dest_desc->string.pointer) {
744 return (AE_NO_MEMORY); 744 return (AE_NO_MEMORY);
@@ -748,7 +748,7 @@ acpi_ut_copy_simple_object(union acpi_operand_object *source_desc,
748 748
749 memcpy(dest_desc->string.pointer, 749 memcpy(dest_desc->string.pointer,
750 source_desc->string.pointer, 750 source_desc->string.pointer,
751 (acpi_size) source_desc->string.length + 1); 751 (acpi_size)source_desc->string.length + 1);
752 } 752 }
753 break; 753 break;
754 754
diff --git a/drivers/acpi/acpica/utids.c b/drivers/acpi/acpica/utids.c
index 6fb4ec365272..f7cd2d52643b 100644
--- a/drivers/acpi/acpica/utids.c
+++ b/drivers/acpi/acpica/utids.c
@@ -95,7 +95,7 @@ acpi_ut_execute_HID(struct acpi_namespace_node *device_node,
95 95
96 hid = 96 hid =
97 ACPI_ALLOCATE_ZEROED(sizeof(struct acpi_pnp_device_id) + 97 ACPI_ALLOCATE_ZEROED(sizeof(struct acpi_pnp_device_id) +
98 (acpi_size) length); 98 (acpi_size)length);
99 if (!hid) { 99 if (!hid) {
100 status = AE_NO_MEMORY; 100 status = AE_NO_MEMORY;
101 goto cleanup; 101 goto cleanup;
@@ -173,7 +173,7 @@ acpi_ut_execute_UID(struct acpi_namespace_node *device_node,
173 173
174 uid = 174 uid =
175 ACPI_ALLOCATE_ZEROED(sizeof(struct acpi_pnp_device_id) + 175 ACPI_ALLOCATE_ZEROED(sizeof(struct acpi_pnp_device_id) +
176 (acpi_size) length); 176 (acpi_size)length);
177 if (!uid) { 177 if (!uid) {
178 status = AE_NO_MEMORY; 178 status = AE_NO_MEMORY;
179 goto cleanup; 179 goto cleanup;
@@ -309,7 +309,7 @@ acpi_ut_execute_CID(struct acpi_namespace_node *device_node,
309 /* Area for CID strings starts after the CID PNP_DEVICE_ID array */ 309 /* Area for CID strings starts after the CID PNP_DEVICE_ID array */
310 310
311 next_id_string = ACPI_CAST_PTR(char, cid_list->ids) + 311 next_id_string = ACPI_CAST_PTR(char, cid_list->ids) +
312 ((acpi_size) count * sizeof(struct acpi_pnp_device_id)); 312 ((acpi_size)count * sizeof(struct acpi_pnp_device_id));
313 313
314 /* Copy/convert the CIDs to the return buffer */ 314 /* Copy/convert the CIDs to the return buffer */
315 315
@@ -413,7 +413,7 @@ acpi_ut_execute_CLS(struct acpi_namespace_node *device_node,
413 413
414 cls = 414 cls =
415 ACPI_ALLOCATE_ZEROED(sizeof(struct acpi_pnp_device_id) + 415 ACPI_ALLOCATE_ZEROED(sizeof(struct acpi_pnp_device_id) +
416 (acpi_size) length); 416 (acpi_size)length);
417 if (!cls) { 417 if (!cls) {
418 status = AE_NO_MEMORY; 418 status = AE_NO_MEMORY;
419 goto cleanup; 419 goto cleanup;
diff --git a/drivers/acpi/acpica/utmath.c b/drivers/acpi/acpica/utmath.c
index 667372093de1..2d6530ee7e51 100644
--- a/drivers/acpi/acpica/utmath.c
+++ b/drivers/acpi/acpica/utmath.c
@@ -236,8 +236,8 @@ acpi_ut_divide(u64 in_dividend,
236 } 236 }
237 237
238 remainder.full = remainder.full - dividend.full; 238 remainder.full = remainder.full - dividend.full;
239 remainder.part.hi = (u32) - ((s32) remainder.part.hi); 239 remainder.part.hi = (u32)-((s32)remainder.part.hi);
240 remainder.part.lo = (u32) - ((s32) remainder.part.lo); 240 remainder.part.lo = (u32)-((s32)remainder.part.lo);
241 241
242 if (remainder.part.lo) { 242 if (remainder.part.lo) {
243 remainder.part.hi--; 243 remainder.part.hi--;
diff --git a/drivers/acpi/acpica/utobject.c b/drivers/acpi/acpica/utobject.c
index edad3f043ab9..72b9a062bbab 100644
--- a/drivers/acpi/acpica/utobject.c
+++ b/drivers/acpi/acpica/utobject.c
@@ -51,11 +51,11 @@ ACPI_MODULE_NAME("utobject")
51/* Local prototypes */ 51/* Local prototypes */
52static acpi_status 52static acpi_status
53acpi_ut_get_simple_object_size(union acpi_operand_object *obj, 53acpi_ut_get_simple_object_size(union acpi_operand_object *obj,
54 acpi_size * obj_length); 54 acpi_size *obj_length);
55 55
56static acpi_status 56static acpi_status
57acpi_ut_get_package_object_size(union acpi_operand_object *obj, 57acpi_ut_get_package_object_size(union acpi_operand_object *obj,
58 acpi_size * obj_length); 58 acpi_size *obj_length);
59 59
60static acpi_status 60static acpi_status
61acpi_ut_get_element_length(u8 object_type, 61acpi_ut_get_element_length(u8 object_type,
@@ -177,7 +177,7 @@ union acpi_operand_object *acpi_ut_create_package_object(u32 count)
177 * Create the element array. Count+1 allows the array to be null 177 * Create the element array. Count+1 allows the array to be null
178 * terminated. 178 * terminated.
179 */ 179 */
180 package_elements = ACPI_ALLOCATE_ZEROED(((acpi_size) count + 180 package_elements = ACPI_ALLOCATE_ZEROED(((acpi_size)count +
181 1) * sizeof(void *)); 181 1) * sizeof(void *));
182 if (!package_elements) { 182 if (!package_elements) {
183 ACPI_FREE(package_desc); 183 ACPI_FREE(package_desc);
@@ -454,7 +454,7 @@ void acpi_ut_delete_object_desc(union acpi_operand_object *object)
454 454
455static acpi_status 455static acpi_status
456acpi_ut_get_simple_object_size(union acpi_operand_object *internal_object, 456acpi_ut_get_simple_object_size(union acpi_operand_object *internal_object,
457 acpi_size * obj_length) 457 acpi_size *obj_length)
458{ 458{
459 acpi_size length; 459 acpi_size length;
460 acpi_size size; 460 acpi_size size;
@@ -495,12 +495,12 @@ acpi_ut_get_simple_object_size(union acpi_operand_object *internal_object,
495 switch (internal_object->common.type) { 495 switch (internal_object->common.type) {
496 case ACPI_TYPE_STRING: 496 case ACPI_TYPE_STRING:
497 497
498 length += (acpi_size) internal_object->string.length + 1; 498 length += (acpi_size)internal_object->string.length + 1;
499 break; 499 break;
500 500
501 case ACPI_TYPE_BUFFER: 501 case ACPI_TYPE_BUFFER:
502 502
503 length += (acpi_size) internal_object->buffer.length; 503 length += (acpi_size)internal_object->buffer.length;
504 break; 504 break;
505 505
506 case ACPI_TYPE_INTEGER: 506 case ACPI_TYPE_INTEGER:
@@ -640,7 +640,7 @@ acpi_ut_get_element_length(u8 object_type,
640 640
641static acpi_status 641static acpi_status
642acpi_ut_get_package_object_size(union acpi_operand_object *internal_object, 642acpi_ut_get_package_object_size(union acpi_operand_object *internal_object,
643 acpi_size * obj_length) 643 acpi_size *obj_length)
644{ 644{
645 acpi_status status; 645 acpi_status status;
646 struct acpi_pkg_info info; 646 struct acpi_pkg_info info;
@@ -665,7 +665,7 @@ acpi_ut_get_package_object_size(union acpi_operand_object *internal_object,
665 */ 665 */
666 info.length += 666 info.length +=
667 ACPI_ROUND_UP_TO_NATIVE_WORD(sizeof(union acpi_object)) * 667 ACPI_ROUND_UP_TO_NATIVE_WORD(sizeof(union acpi_object)) *
668 (acpi_size) info.num_packages; 668 (acpi_size)info.num_packages;
669 669
670 /* Return the total package length */ 670 /* Return the total package length */
671 671
@@ -689,7 +689,7 @@ acpi_ut_get_package_object_size(union acpi_operand_object *internal_object,
689 689
690acpi_status 690acpi_status
691acpi_ut_get_object_size(union acpi_operand_object *internal_object, 691acpi_ut_get_object_size(union acpi_operand_object *internal_object,
692 acpi_size * obj_length) 692 acpi_size *obj_length)
693{ 693{
694 acpi_status status; 694 acpi_status status;
695 695
diff --git a/drivers/acpi/acpica/utosi.c b/drivers/acpi/acpica/utosi.c
index b5cfe577fabf..3f5fed670271 100644
--- a/drivers/acpi/acpica/utosi.c
+++ b/drivers/acpi/acpica/utosi.c
@@ -150,7 +150,7 @@ acpi_status acpi_ut_initialize_interfaces(void)
150 i < (ACPI_ARRAY_LENGTH(acpi_default_supported_interfaces) - 1); 150 i < (ACPI_ARRAY_LENGTH(acpi_default_supported_interfaces) - 1);
151 i++) { 151 i++) {
152 acpi_default_supported_interfaces[i].next = 152 acpi_default_supported_interfaces[i].next =
153 &acpi_default_supported_interfaces[(acpi_size) i + 1]; 153 &acpi_default_supported_interfaces[(acpi_size)i + 1];
154 } 154 }
155 155
156 acpi_os_release_mutex(acpi_gbl_osi_mutex); 156 acpi_os_release_mutex(acpi_gbl_osi_mutex);
@@ -397,7 +397,7 @@ struct acpi_interface_info *acpi_ut_get_interface(acpi_string interface_name)
397 * 397 *
398 ******************************************************************************/ 398 ******************************************************************************/
399 399
400acpi_status acpi_ut_osi_implementation(struct acpi_walk_state * walk_state) 400acpi_status acpi_ut_osi_implementation(struct acpi_walk_state *walk_state)
401{ 401{
402 union acpi_operand_object *string_desc; 402 union acpi_operand_object *string_desc;
403 union acpi_operand_object *return_desc; 403 union acpi_operand_object *return_desc;
diff --git a/drivers/acpi/acpica/utownerid.c b/drivers/acpi/acpica/utownerid.c
index 813520ab8ca4..3cd573c5f7f9 100644
--- a/drivers/acpi/acpica/utownerid.c
+++ b/drivers/acpi/acpica/utownerid.c
@@ -61,7 +61,7 @@ ACPI_MODULE_NAME("utownerid")
61 * when the method exits or the table is unloaded. 61 * when the method exits or the table is unloaded.
62 * 62 *
63 ******************************************************************************/ 63 ******************************************************************************/
64acpi_status acpi_ut_allocate_owner_id(acpi_owner_id * owner_id) 64acpi_status acpi_ut_allocate_owner_id(acpi_owner_id *owner_id)
65{ 65{
66 u32 i; 66 u32 i;
67 u32 j; 67 u32 j;
@@ -122,7 +122,7 @@ acpi_status acpi_ut_allocate_owner_id(acpi_owner_id * owner_id)
122 * permanently allocated (prevents +1 overflow) 122 * permanently allocated (prevents +1 overflow)
123 */ 123 */
124 *owner_id = 124 *owner_id =
125 (acpi_owner_id) ((k + 1) + ACPI_MUL_32(j)); 125 (acpi_owner_id)((k + 1) + ACPI_MUL_32(j));
126 126
127 ACPI_DEBUG_PRINT((ACPI_DB_VALUES, 127 ACPI_DEBUG_PRINT((ACPI_DB_VALUES,
128 "Allocated OwnerId: %2.2X\n", 128 "Allocated OwnerId: %2.2X\n",
@@ -167,7 +167,7 @@ exit:
167 * 167 *
168 ******************************************************************************/ 168 ******************************************************************************/
169 169
170void acpi_ut_release_owner_id(acpi_owner_id * owner_id_ptr) 170void acpi_ut_release_owner_id(acpi_owner_id *owner_id_ptr)
171{ 171{
172 acpi_owner_id owner_id = *owner_id_ptr; 172 acpi_owner_id owner_id = *owner_id_ptr;
173 acpi_status status; 173 acpi_status status;
diff --git a/drivers/acpi/acpica/utprint.c b/drivers/acpi/acpica/utprint.c
index 208d71aa9f50..dd084cf52502 100644
--- a/drivers/acpi/acpica/utprint.c
+++ b/drivers/acpi/acpica/utprint.c
@@ -264,9 +264,9 @@ static char *acpi_ut_format_number(char *string,
264 264
265 sign = '\0'; 265 sign = '\0';
266 if (type & ACPI_FORMAT_SIGN) { 266 if (type & ACPI_FORMAT_SIGN) {
267 if ((s64) number < 0) { 267 if ((s64)number < 0) {
268 sign = '-'; 268 sign = '-';
269 number = -(s64) number; 269 number = -(s64)number;
270 width--; 270 width--;
271 } else if (type & ACPI_FORMAT_SIGN_PLUS) { 271 } else if (type & ACPI_FORMAT_SIGN_PLUS) {
272 sign = '+'; 272 sign = '+';
@@ -404,7 +404,7 @@ acpi_ut_vsnprintf(char *string,
404 width = -1; 404 width = -1;
405 if (isdigit((int)*format)) { 405 if (isdigit((int)*format)) {
406 format = acpi_ut_scan_number(format, &number); 406 format = acpi_ut_scan_number(format, &number);
407 width = (s32) number; 407 width = (s32)number;
408 } else if (*format == '*') { 408 } else if (*format == '*') {
409 ++format; 409 ++format;
410 width = va_arg(args, int); 410 width = va_arg(args, int);
@@ -421,7 +421,7 @@ acpi_ut_vsnprintf(char *string,
421 ++format; 421 ++format;
422 if (isdigit((int)*format)) { 422 if (isdigit((int)*format)) {
423 format = acpi_ut_scan_number(format, &number); 423 format = acpi_ut_scan_number(format, &number);
424 precision = (s32) number; 424 precision = (s32)number;
425 } else if (*format == '*') { 425 } else if (*format == '*') {
426 ++format; 426 ++format;
427 precision = va_arg(args, int); 427 precision = va_arg(args, int);
@@ -550,17 +550,17 @@ acpi_ut_vsnprintf(char *string,
550 if (qualifier == 'L') { 550 if (qualifier == 'L') {
551 number = va_arg(args, u64); 551 number = va_arg(args, u64);
552 if (type & ACPI_FORMAT_SIGN) { 552 if (type & ACPI_FORMAT_SIGN) {
553 number = (s64) number; 553 number = (s64)number;
554 } 554 }
555 } else if (qualifier == 'l') { 555 } else if (qualifier == 'l') {
556 number = va_arg(args, unsigned long); 556 number = va_arg(args, unsigned long);
557 if (type & ACPI_FORMAT_SIGN) { 557 if (type & ACPI_FORMAT_SIGN) {
558 number = (s32) number; 558 number = (s32)number;
559 } 559 }
560 } else if (qualifier == 'h') { 560 } else if (qualifier == 'h') {
561 number = (u16)va_arg(args, int); 561 number = (u16)va_arg(args, int);
562 if (type & ACPI_FORMAT_SIGN) { 562 if (type & ACPI_FORMAT_SIGN) {
563 number = (s16) number; 563 number = (s16)number;
564 } 564 }
565 } else { 565 } else {
566 number = va_arg(args, unsigned int); 566 number = va_arg(args, unsigned int);
diff --git a/drivers/acpi/acpica/utstring.c b/drivers/acpi/acpica/utstring.c
index 0b005728db4e..241259bfed64 100644
--- a/drivers/acpi/acpica/utstring.c
+++ b/drivers/acpi/acpica/utstring.c
@@ -130,7 +130,7 @@ void acpi_ut_print_string(char *string, u16 max_length)
130 } else { 130 } else {
131 /* All others will be Hex escapes */ 131 /* All others will be Hex escapes */
132 132
133 acpi_os_printf("\\x%2.2X", (s32) string[i]); 133 acpi_os_printf("\\x%2.2X", (s32)string[i]);
134 } 134 }
135 break; 135 break;
136 } 136 }
diff --git a/drivers/acpi/acpica/utxface.c b/drivers/acpi/acpica/utxface.c
index 68d4673f62e6..d9e6aac7dc83 100644
--- a/drivers/acpi/acpica/utxface.c
+++ b/drivers/acpi/acpica/utxface.c
@@ -127,7 +127,7 @@ ACPI_EXPORT_SYMBOL(acpi_subsystem_status)
127 * and the value of out_buffer is undefined. 127 * and the value of out_buffer is undefined.
128 * 128 *
129 ******************************************************************************/ 129 ******************************************************************************/
130acpi_status acpi_get_system_info(struct acpi_buffer * out_buffer) 130acpi_status acpi_get_system_info(struct acpi_buffer *out_buffer)
131{ 131{
132 struct acpi_system_info *info_ptr; 132 struct acpi_system_info *info_ptr;
133 acpi_status status; 133 acpi_status status;
@@ -483,7 +483,7 @@ ACPI_EXPORT_SYMBOL(acpi_check_address_range)
483 ******************************************************************************/ 483 ******************************************************************************/
484acpi_status 484acpi_status
485acpi_decode_pld_buffer(u8 *in_buffer, 485acpi_decode_pld_buffer(u8 *in_buffer,
486 acpi_size length, struct acpi_pld_info ** return_buffer) 486 acpi_size length, struct acpi_pld_info **return_buffer)
487{ 487{
488 struct acpi_pld_info *pld_info; 488 struct acpi_pld_info *pld_info;
489 u32 *buffer = ACPI_CAST_PTR(u32, in_buffer); 489 u32 *buffer = ACPI_CAST_PTR(u32, in_buffer);
diff --git a/include/acpi/acpiosxf.h b/include/acpi/acpiosxf.h
index 6026308f5b26..562603d7aabe 100644
--- a/include/acpi/acpiosxf.h
+++ b/include/acpi/acpiosxf.h
@@ -108,7 +108,7 @@ acpi_os_table_override(struct acpi_table_header *existing_table,
108#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_physical_table_override 108#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_physical_table_override
109acpi_status 109acpi_status
110acpi_os_physical_table_override(struct acpi_table_header *existing_table, 110acpi_os_physical_table_override(struct acpi_table_header *existing_table,
111 acpi_physical_address * new_address, 111 acpi_physical_address *new_address,
112 u32 *new_table_length); 112 u32 *new_table_length);
113#endif 113#endif
114 114
@@ -203,7 +203,7 @@ void acpi_os_unmap_memory(void *logical_address, acpi_size size);
203#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_get_physical_address 203#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_get_physical_address
204acpi_status 204acpi_status
205acpi_os_get_physical_address(void *logical_address, 205acpi_os_get_physical_address(void *logical_address,
206 acpi_physical_address * physical_address); 206 acpi_physical_address *physical_address);
207#endif 207#endif
208 208
209/* 209/*
@@ -379,14 +379,14 @@ acpi_status
379acpi_os_get_table_by_name(char *signature, 379acpi_os_get_table_by_name(char *signature,
380 u32 instance, 380 u32 instance,
381 struct acpi_table_header **table, 381 struct acpi_table_header **table,
382 acpi_physical_address * address); 382 acpi_physical_address *address);
383#endif 383#endif
384 384
385#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_get_table_by_index 385#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_get_table_by_index
386acpi_status 386acpi_status
387acpi_os_get_table_by_index(u32 index, 387acpi_os_get_table_by_index(u32 index,
388 struct acpi_table_header **table, 388 struct acpi_table_header **table,
389 u32 *instance, acpi_physical_address * address); 389 u32 *instance, acpi_physical_address *address);
390#endif 390#endif
391 391
392#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_get_table_by_address 392#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_get_table_by_address
diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h
index 83583a251e72..fcd8119547bc 100644
--- a/include/acpi/acpixf.h
+++ b/include/acpi/acpixf.h
@@ -484,8 +484,8 @@ ACPI_EXTERNAL_RETURN_STATUS(acpi_status __init acpi_load_tables(void))
484ACPI_EXTERNAL_RETURN_STATUS(acpi_status __init acpi_reallocate_root_table(void)) 484ACPI_EXTERNAL_RETURN_STATUS(acpi_status __init acpi_reallocate_root_table(void))
485 485
486ACPI_EXTERNAL_RETURN_STATUS(acpi_status __init 486ACPI_EXTERNAL_RETURN_STATUS(acpi_status __init
487 acpi_find_root_pointer(acpi_physical_address * 487 acpi_find_root_pointer(acpi_physical_address
488 rsdp_address)) 488 *rsdp_address))
489ACPI_EXTERNAL_RETURN_STATUS(acpi_status 489ACPI_EXTERNAL_RETURN_STATUS(acpi_status
490 acpi_get_table_header(acpi_string signature, 490 acpi_get_table_header(acpi_string signature,
491 u32 instance, 491 u32 instance,
@@ -530,7 +530,7 @@ ACPI_EXTERNAL_RETURN_STATUS(acpi_status
530ACPI_EXTERNAL_RETURN_STATUS(acpi_status 530ACPI_EXTERNAL_RETURN_STATUS(acpi_status
531 acpi_get_handle(acpi_handle parent, 531 acpi_get_handle(acpi_handle parent,
532 acpi_string pathname, 532 acpi_string pathname,
533 acpi_handle * ret_handle)) 533 acpi_handle *ret_handle))
534ACPI_EXTERNAL_RETURN_STATUS(acpi_status 534ACPI_EXTERNAL_RETURN_STATUS(acpi_status
535 acpi_attach_data(acpi_handle object, 535 acpi_attach_data(acpi_handle object,
536 acpi_object_handler handler, 536 acpi_object_handler handler,
@@ -575,15 +575,15 @@ ACPI_EXTERNAL_RETURN_STATUS(acpi_status
575 acpi_get_next_object(acpi_object_type type, 575 acpi_get_next_object(acpi_object_type type,
576 acpi_handle parent, 576 acpi_handle parent,
577 acpi_handle child, 577 acpi_handle child,
578 acpi_handle * out_handle)) 578 acpi_handle *out_handle))
579 579
580ACPI_EXTERNAL_RETURN_STATUS(acpi_status 580ACPI_EXTERNAL_RETURN_STATUS(acpi_status
581 acpi_get_type(acpi_handle object, 581 acpi_get_type(acpi_handle object,
582 acpi_object_type * out_type)) 582 acpi_object_type *out_type))
583 583
584ACPI_EXTERNAL_RETURN_STATUS(acpi_status 584ACPI_EXTERNAL_RETURN_STATUS(acpi_status
585 acpi_get_parent(acpi_handle object, 585 acpi_get_parent(acpi_handle object,
586 acpi_handle * out_handle)) 586 acpi_handle *out_handle))
587 587
588/* 588/*
589 * Handler interfaces 589 * Handler interfaces
@@ -755,7 +755,7 @@ ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_enable_all_wakeup_gpes(void))
755 755
756ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status 756ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
757 acpi_get_gpe_device(u32 gpe_index, 757 acpi_get_gpe_device(u32 gpe_index,
758 acpi_handle * gpe_device)) 758 acpi_handle *gpe_device))
759 759
760ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status 760ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
761 acpi_install_gpe_block(acpi_handle gpe_device, 761 acpi_install_gpe_block(acpi_handle gpe_device,
@@ -771,8 +771,8 @@ ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
771 * Resource interfaces 771 * Resource interfaces
772 */ 772 */
773typedef 773typedef
774acpi_status(*acpi_walk_resource_callback) (struct acpi_resource * resource, 774acpi_status (*acpi_walk_resource_callback) (struct acpi_resource * resource,
775 void *context); 775 void *context);
776 776
777ACPI_EXTERNAL_RETURN_STATUS(acpi_status 777ACPI_EXTERNAL_RETURN_STATUS(acpi_status
778 acpi_get_vendor_resource(acpi_handle device, 778 acpi_get_vendor_resource(acpi_handle device,
@@ -938,7 +938,8 @@ ACPI_DBG_DEPENDENT_RETURN_VOID(void
938ACPI_APP_DEPENDENT_RETURN_VOID(ACPI_PRINTF_LIKE(1) 938ACPI_APP_DEPENDENT_RETURN_VOID(ACPI_PRINTF_LIKE(1)
939 void ACPI_INTERNAL_VAR_XFACE 939 void ACPI_INTERNAL_VAR_XFACE
940 acpi_log_error(const char *format, ...)) 940 acpi_log_error(const char *format, ...))
941 acpi_status acpi_initialize_debugger(void); 941
942acpi_status acpi_initialize_debugger(void);
942 943
943void acpi_terminate_debugger(void); 944void acpi_terminate_debugger(void);
944 945
diff --git a/include/acpi/actypes.h b/include/acpi/actypes.h
index b9a8b72e297c..cb389efd321c 100644
--- a/include/acpi/actypes.h
+++ b/include/acpi/actypes.h
@@ -893,7 +893,7 @@ typedef u8 acpi_adr_space_type;
893 893
894/* Sleep function dispatch */ 894/* Sleep function dispatch */
895 895
896typedef acpi_status(*acpi_sleep_function) (u8 sleep_state); 896typedef acpi_status (*acpi_sleep_function) (u8 sleep_state);
897 897
898struct acpi_sleep_functions { 898struct acpi_sleep_functions {
899 acpi_sleep_function legacy_function; 899 acpi_sleep_function legacy_function;
@@ -1072,20 +1072,21 @@ void (*acpi_notify_handler) (acpi_handle device, u32 value, void *context);
1072typedef 1072typedef
1073void (*acpi_object_handler) (acpi_handle object, void *data); 1073void (*acpi_object_handler) (acpi_handle object, void *data);
1074 1074
1075typedef acpi_status(*acpi_init_handler) (acpi_handle object, u32 function); 1075typedef
1076acpi_status (*acpi_init_handler) (acpi_handle object, u32 function);
1076 1077
1077#define ACPI_INIT_DEVICE_INI 1 1078#define ACPI_INIT_DEVICE_INI 1
1078 1079
1079typedef 1080typedef
1080acpi_status(*acpi_exception_handler) (acpi_status aml_status, 1081acpi_status (*acpi_exception_handler) (acpi_status aml_status,
1081 acpi_name name, 1082 acpi_name name,
1082 u16 opcode, 1083 u16 opcode,
1083 u32 aml_offset, void *context); 1084 u32 aml_offset, void *context);
1084 1085
1085/* Table Event handler (Load, load_table, etc.) and types */ 1086/* Table Event handler (Load, load_table, etc.) and types */
1086 1087
1087typedef 1088typedef
1088acpi_status(*acpi_table_handler) (u32 event, void *table, void *context); 1089acpi_status (*acpi_table_handler) (u32 event, void *table, void *context);
1089 1090
1090#define ACPI_TABLE_LOAD 0x0 1091#define ACPI_TABLE_LOAD 0x0
1091#define ACPI_TABLE_UNLOAD 0x1 1092#define ACPI_TABLE_UNLOAD 0x1
@@ -1094,12 +1095,12 @@ acpi_status(*acpi_table_handler) (u32 event, void *table, void *context);
1094/* Address Spaces (For Operation Regions) */ 1095/* Address Spaces (For Operation Regions) */
1095 1096
1096typedef 1097typedef
1097acpi_status(*acpi_adr_space_handler) (u32 function, 1098acpi_status (*acpi_adr_space_handler) (u32 function,
1098 acpi_physical_address address, 1099 acpi_physical_address address,
1099 u32 bit_width, 1100 u32 bit_width,
1100 u64 *value, 1101 u64 *value,
1101 void *handler_context, 1102 void *handler_context,
1102 void *region_context); 1103 void *region_context);
1103 1104
1104#define ACPI_DEFAULT_HANDLER NULL 1105#define ACPI_DEFAULT_HANDLER NULL
1105 1106
@@ -1112,18 +1113,18 @@ struct acpi_connection_info {
1112}; 1113};
1113 1114
1114typedef 1115typedef
1115acpi_status(*acpi_adr_space_setup) (acpi_handle region_handle, 1116acpi_status (*acpi_adr_space_setup) (acpi_handle region_handle,
1116 u32 function, 1117 u32 function,
1117 void *handler_context, 1118 void *handler_context,
1118 void **region_context); 1119 void **region_context);
1119 1120
1120#define ACPI_REGION_ACTIVATE 0 1121#define ACPI_REGION_ACTIVATE 0
1121#define ACPI_REGION_DEACTIVATE 1 1122#define ACPI_REGION_DEACTIVATE 1
1122 1123
1123typedef 1124typedef
1124acpi_status(*acpi_walk_callback) (acpi_handle object, 1125acpi_status (*acpi_walk_callback) (acpi_handle object,
1125 u32 nesting_level, 1126 u32 nesting_level,
1126 void *context, void **return_value); 1127 void *context, void **return_value);
1127 1128
1128typedef 1129typedef
1129u32 (*acpi_interface_handler) (acpi_string interface_name, u32 supported); 1130u32 (*acpi_interface_handler) (acpi_string interface_name, u32 supported);
diff --git a/tools/power/acpi/os_specific/service_layers/oslinuxtbl.c b/tools/power/acpi/os_specific/service_layers/oslinuxtbl.c
index d0e6b857d8d1..546cf4a503b7 100644
--- a/tools/power/acpi/os_specific/service_layers/oslinuxtbl.c
+++ b/tools/power/acpi/os_specific/service_layers/oslinuxtbl.c
@@ -91,7 +91,7 @@ osl_get_customized_table(char *pathname,
91 char *signature, 91 char *signature,
92 u32 instance, 92 u32 instance,
93 struct acpi_table_header **table, 93 struct acpi_table_header **table,
94 acpi_physical_address * address); 94 acpi_physical_address *address);
95 95
96static acpi_status osl_list_bios_tables(void); 96static acpi_status osl_list_bios_tables(void);
97 97
@@ -99,7 +99,7 @@ static acpi_status
99osl_get_bios_table(char *signature, 99osl_get_bios_table(char *signature,
100 u32 instance, 100 u32 instance,
101 struct acpi_table_header **table, 101 struct acpi_table_header **table,
102 acpi_physical_address * address); 102 acpi_physical_address *address);
103 103
104static acpi_status osl_get_last_status(acpi_status default_status); 104static acpi_status osl_get_last_status(acpi_status default_status);
105 105
@@ -187,7 +187,7 @@ static acpi_status osl_get_last_status(acpi_status default_status)
187 187
188acpi_status 188acpi_status
189acpi_os_get_table_by_address(acpi_physical_address address, 189acpi_os_get_table_by_address(acpi_physical_address address,
190 struct acpi_table_header ** table) 190 struct acpi_table_header **table)
191{ 191{
192 u32 table_length; 192 u32 table_length;
193 struct acpi_table_header *mapped_table; 193 struct acpi_table_header *mapped_table;
@@ -252,8 +252,8 @@ exit:
252acpi_status 252acpi_status
253acpi_os_get_table_by_name(char *signature, 253acpi_os_get_table_by_name(char *signature,
254 u32 instance, 254 u32 instance,
255 struct acpi_table_header ** table, 255 struct acpi_table_header **table,
256 acpi_physical_address * address) 256 acpi_physical_address *address)
257{ 257{
258 acpi_status status; 258 acpi_status status;
259 259
@@ -380,8 +380,8 @@ static acpi_status osl_add_table_to_list(char *signature, u32 instance)
380 380
381acpi_status 381acpi_status
382acpi_os_get_table_by_index(u32 index, 382acpi_os_get_table_by_index(u32 index,
383 struct acpi_table_header ** table, 383 struct acpi_table_header **table,
384 u32 *instance, acpi_physical_address * address) 384 u32 *instance, acpi_physical_address *address)
385{ 385{
386 struct osl_table_info *info; 386 struct osl_table_info *info;
387 acpi_status status; 387 acpi_status status;
@@ -447,7 +447,7 @@ osl_find_rsdp_via_efi_by_keyword(FILE * file, const char *keyword)
447 } 447 }
448 } 448 }
449 449
450 return ((acpi_physical_address) (address)); 450 return ((acpi_physical_address)(address));
451} 451}
452 452
453/****************************************************************************** 453/******************************************************************************
@@ -751,10 +751,10 @@ static acpi_status osl_list_bios_tables(void)
751 for (i = 0; i < number_of_tables; ++i, table_data += item_size) { 751 for (i = 0; i < number_of_tables; ++i, table_data += item_size) {
752 if (osl_can_use_xsdt()) { 752 if (osl_can_use_xsdt()) {
753 table_address = 753 table_address =
754 (acpi_physical_address) (*ACPI_CAST64(table_data)); 754 (acpi_physical_address)(*ACPI_CAST64(table_data));
755 } else { 755 } else {
756 table_address = 756 table_address =
757 (acpi_physical_address) (*ACPI_CAST32(table_data)); 757 (acpi_physical_address)(*ACPI_CAST32(table_data));
758 } 758 }
759 759
760 /* Skip NULL entries in RSDT/XSDT */ 760 /* Skip NULL entries in RSDT/XSDT */
@@ -800,7 +800,7 @@ static acpi_status
800osl_get_bios_table(char *signature, 800osl_get_bios_table(char *signature,
801 u32 instance, 801 u32 instance,
802 struct acpi_table_header **table, 802 struct acpi_table_header **table,
803 acpi_physical_address * address) 803 acpi_physical_address *address)
804{ 804{
805 struct acpi_table_header *local_table = NULL; 805 struct acpi_table_header *local_table = NULL;
806 struct acpi_table_header *mapped_table = NULL; 806 struct acpi_table_header *mapped_table = NULL;
@@ -833,38 +833,37 @@ osl_get_bios_table(char *signature,
833 if ((gbl_fadt->header.length >= MIN_FADT_FOR_XDSDT) && 833 if ((gbl_fadt->header.length >= MIN_FADT_FOR_XDSDT) &&
834 gbl_fadt->Xdsdt) { 834 gbl_fadt->Xdsdt) {
835 table_address = 835 table_address =
836 (acpi_physical_address) gbl_fadt->Xdsdt; 836 (acpi_physical_address)gbl_fadt->Xdsdt;
837 } else 837 } else
838 if ((gbl_fadt->header.length >= MIN_FADT_FOR_DSDT) 838 if ((gbl_fadt->header.length >= MIN_FADT_FOR_DSDT)
839 && gbl_fadt->dsdt) { 839 && gbl_fadt->dsdt) {
840 table_address = 840 table_address =
841 (acpi_physical_address) gbl_fadt->dsdt; 841 (acpi_physical_address)gbl_fadt->dsdt;
842 } 842 }
843 } else if (ACPI_COMPARE_NAME(signature, ACPI_SIG_FACS)) { 843 } else if (ACPI_COMPARE_NAME(signature, ACPI_SIG_FACS)) {
844 if ((gbl_fadt->header.length >= MIN_FADT_FOR_XFACS) && 844 if ((gbl_fadt->header.length >= MIN_FADT_FOR_XFACS) &&
845 gbl_fadt->Xfacs) { 845 gbl_fadt->Xfacs) {
846 table_address = 846 table_address =
847 (acpi_physical_address) gbl_fadt->Xfacs; 847 (acpi_physical_address)gbl_fadt->Xfacs;
848 } else 848 } else
849 if ((gbl_fadt->header.length >= MIN_FADT_FOR_FACS) 849 if ((gbl_fadt->header.length >= MIN_FADT_FOR_FACS)
850 && gbl_fadt->facs) { 850 && gbl_fadt->facs) {
851 table_address = 851 table_address =
852 (acpi_physical_address) gbl_fadt->facs; 852 (acpi_physical_address)gbl_fadt->facs;
853 } 853 }
854 } else if (ACPI_COMPARE_NAME(signature, ACPI_SIG_XSDT)) { 854 } else if (ACPI_COMPARE_NAME(signature, ACPI_SIG_XSDT)) {
855 if (!gbl_revision) { 855 if (!gbl_revision) {
856 return (AE_BAD_SIGNATURE); 856 return (AE_BAD_SIGNATURE);
857 } 857 }
858 table_address = 858 table_address =
859 (acpi_physical_address) gbl_rsdp. 859 (acpi_physical_address)gbl_rsdp.
860 xsdt_physical_address; 860 xsdt_physical_address;
861 } else if (ACPI_COMPARE_NAME(signature, ACPI_SIG_RSDT)) { 861 } else if (ACPI_COMPARE_NAME(signature, ACPI_SIG_RSDT)) {
862 table_address = 862 table_address =
863 (acpi_physical_address) gbl_rsdp. 863 (acpi_physical_address)gbl_rsdp.
864 rsdt_physical_address; 864 rsdt_physical_address;
865 } else { 865 } else {
866 table_address = 866 table_address = (acpi_physical_address)gbl_rsdp_address;
867 (acpi_physical_address) gbl_rsdp_address;
868 signature = ACPI_SIG_RSDP; 867 signature = ACPI_SIG_RSDP;
869 } 868 }
870 869
@@ -904,12 +903,12 @@ osl_get_bios_table(char *signature,
904 for (i = 0; i < number_of_tables; ++i, table_data += item_size) { 903 for (i = 0; i < number_of_tables; ++i, table_data += item_size) {
905 if (osl_can_use_xsdt()) { 904 if (osl_can_use_xsdt()) {
906 table_address = 905 table_address =
907 (acpi_physical_address) (*ACPI_CAST64 906 (acpi_physical_address)(*ACPI_CAST64
908 (table_data)); 907 (table_data));
909 } else { 908 } else {
910 table_address = 909 table_address =
911 (acpi_physical_address) (*ACPI_CAST32 910 (acpi_physical_address)(*ACPI_CAST32
912 (table_data)); 911 (table_data));
913 } 912 }
914 913
915 /* Skip NULL entries in RSDT/XSDT */ 914 /* Skip NULL entries in RSDT/XSDT */
@@ -1301,7 +1300,7 @@ osl_get_customized_table(char *pathname,
1301 char *signature, 1300 char *signature,
1302 u32 instance, 1301 u32 instance,
1303 struct acpi_table_header **table, 1302 struct acpi_table_header **table,
1304 acpi_physical_address * address) 1303 acpi_physical_address *address)
1305{ 1304{
1306 void *table_dir; 1305 void *table_dir;
1307 u32 current_instance = 0; 1306 u32 current_instance = 0;
diff --git a/tools/power/acpi/os_specific/service_layers/osunixxf.c b/tools/power/acpi/os_specific/service_layers/osunixxf.c
index 08cb8b2035f2..88aa66ef4ad5 100644
--- a/tools/power/acpi/os_specific/service_layers/osunixxf.c
+++ b/tools/power/acpi/os_specific/service_layers/osunixxf.c
@@ -246,8 +246,8 @@ acpi_physical_address acpi_os_get_root_pointer(void)
246 *****************************************************************************/ 246 *****************************************************************************/
247 247
248acpi_status 248acpi_status
249acpi_os_predefined_override(const struct acpi_predefined_names * init_val, 249acpi_os_predefined_override(const struct acpi_predefined_names *init_val,
250 acpi_string * new_val) 250 acpi_string *new_val)
251{ 251{
252 252
253 if (!init_val || !new_val) { 253 if (!init_val || !new_val) {
@@ -274,8 +274,8 @@ acpi_os_predefined_override(const struct acpi_predefined_names * init_val,
274 *****************************************************************************/ 274 *****************************************************************************/
275 275
276acpi_status 276acpi_status
277acpi_os_table_override(struct acpi_table_header * existing_table, 277acpi_os_table_override(struct acpi_table_header *existing_table,
278 struct acpi_table_header ** new_table) 278 struct acpi_table_header **new_table)
279{ 279{
280 280
281 if (!existing_table || !new_table) { 281 if (!existing_table || !new_table) {
@@ -311,8 +311,8 @@ acpi_os_table_override(struct acpi_table_header * existing_table,
311 *****************************************************************************/ 311 *****************************************************************************/
312 312
313acpi_status 313acpi_status
314acpi_os_physical_table_override(struct acpi_table_header * existing_table, 314acpi_os_physical_table_override(struct acpi_table_header *existing_table,
315 acpi_physical_address * new_address, 315 acpi_physical_address *new_address,
316 u32 *new_table_length) 316 u32 *new_table_length)
317{ 317{
318 318
@@ -506,7 +506,7 @@ acpi_status acpi_os_get_line(char *buffer, u32 buffer_length, u32 *bytes_read)
506void *acpi_os_map_memory(acpi_physical_address where, acpi_size length) 506void *acpi_os_map_memory(acpi_physical_address where, acpi_size length)
507{ 507{
508 508
509 return (ACPI_TO_POINTER((acpi_size) where)); 509 return (ACPI_TO_POINTER((acpi_size)where));
510} 510}
511 511
512/****************************************************************************** 512/******************************************************************************
@@ -603,9 +603,9 @@ void acpi_os_free(void *mem)
603 603
604acpi_status 604acpi_status
605acpi_os_create_semaphore(u32 max_units, 605acpi_os_create_semaphore(u32 max_units,
606 u32 initial_units, acpi_handle * out_handle) 606 u32 initial_units, acpi_handle *out_handle)
607{ 607{
608 *out_handle = (acpi_handle) 1; 608 *out_handle = (acpi_handle)1;
609 return (AE_OK); 609 return (AE_OK);
610} 610}
611 611
@@ -640,7 +640,7 @@ acpi_status acpi_os_signal_semaphore(acpi_handle handle, u32 units)
640 640
641acpi_status 641acpi_status
642acpi_os_create_semaphore(u32 max_units, 642acpi_os_create_semaphore(u32 max_units,
643 u32 initial_units, acpi_handle * out_handle) 643 u32 initial_units, acpi_handle *out_handle)
644{ 644{
645 sem_t *sem; 645 sem_t *sem;
646 646
@@ -672,7 +672,7 @@ acpi_os_create_semaphore(u32 max_units,
672 } 672 }
673#endif 673#endif
674 674
675 *out_handle = (acpi_handle) sem; 675 *out_handle = (acpi_handle)sem;
676 return (AE_OK); 676 return (AE_OK);
677} 677}
678 678
@@ -1035,7 +1035,7 @@ acpi_os_read_pci_configuration(struct acpi_pci_id *pci_id,
1035 *****************************************************************************/ 1035 *****************************************************************************/
1036 1036
1037acpi_status 1037acpi_status
1038acpi_os_write_pci_configuration(struct acpi_pci_id * pci_id, 1038acpi_os_write_pci_configuration(struct acpi_pci_id *pci_id,
1039 u32 pci_register, u64 value, u32 width) 1039 u32 pci_register, u64 value, u32 width)
1040{ 1040{
1041 1041
diff --git a/tools/power/acpi/tools/acpidump/apdump.c b/tools/power/acpi/tools/acpidump/apdump.c
index 9c2db0eb467f..a39e44533369 100644
--- a/tools/power/acpi/tools/acpidump/apdump.c
+++ b/tools/power/acpi/tools/acpidump/apdump.c
@@ -294,7 +294,7 @@ int ap_dump_table_by_address(char *ascii_address)
294 return (-1); 294 return (-1);
295 } 295 }
296 296
297 address = (acpi_physical_address) long_address; 297 address = (acpi_physical_address)long_address;
298 status = acpi_os_get_table_by_address(address, &table); 298 status = acpi_os_get_table_by_address(address, &table);
299 if (ACPI_FAILURE(status)) { 299 if (ACPI_FAILURE(status)) {
300 acpi_log_error("Could not get table at 0x%8.8X%8.8X, %s\n", 300 acpi_log_error("Could not get table at 0x%8.8X%8.8X, %s\n",