]> err.no Git - linux-2.6/commitdiff
ACPICA: Cosmetic changes only, no functional changes
authorBob Moore <robert.moore@intel.com>
Thu, 10 Apr 2008 15:06:40 +0000 (19:06 +0400)
committerLen Brown <len.brown@intel.com>
Tue, 22 Apr 2008 18:29:27 +0000 (14:29 -0400)
Lint changes, fix compiler warnings, etc.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Signed-off-by: Len Brown <len.brown@intel.com>
13 files changed:
drivers/acpi/events/evmisc.c
drivers/acpi/events/evregion.c
drivers/acpi/hardware/hwsleep.c
drivers/acpi/namespace/nsdump.c
drivers/acpi/namespace/nsload.c
drivers/acpi/namespace/nsnames.c
drivers/acpi/namespace/nsparse.c
drivers/acpi/resources/rscalc.c
drivers/acpi/resources/rsutils.c
drivers/acpi/utilities/utalloc.c
drivers/acpi/utilities/utcopy.c
drivers/acpi/utilities/utdebug.c
drivers/acpi/utilities/utglobal.c

index d075062f5b89ee35727c57dd94617aab7c6db4a7..4e7a13afe80c49c28d4f6929570cd1e8f380d276 100644 (file)
@@ -349,9 +349,10 @@ acpi_status acpi_ev_init_global_lock_handler(void)
 
        ACPI_FUNCTION_TRACE(ev_init_global_lock_handler);
 
-       status =
-           acpi_get_table_by_index(ACPI_TABLE_INDEX_FACS,
-                                   (struct acpi_table_header **)&facs);
+       status = acpi_get_table_by_index(ACPI_TABLE_INDEX_FACS,
+                                        ACPI_CAST_INDIRECT_PTR(struct
+                                                               acpi_table_header,
+                                                               &facs));
        if (ACPI_FAILURE(status)) {
                return_ACPI_STATUS(status);
        }
index 58ad09725dd2a69dcac8f1f45fa3226041981bf3..03624e94778e646d250842778f108fcb0c03e8ce 100644 (file)
@@ -394,7 +394,7 @@ acpi_ev_address_space_dispatch(union acpi_operand_object *region_obj,
        ACPI_DEBUG_PRINT((ACPI_DB_OPREGION,
                          "Handler %p (@%p) Address %8.8X%8.8X [%s]\n",
                          &region_obj->region.handler->address_space, handler,
-                         ACPI_FORMAT_UINT64(address),
+                         ACPI_FORMAT_NATIVE_UINT(address),
                          acpi_ut_get_region_name(region_obj->region.
                                                  space_id)));
 
index 4290e0193097d28fd2405b814ac0352a0cf5fb93..202f11af36899b49f18b66baf3f93902e487af5a 100644 (file)
@@ -70,9 +70,10 @@ acpi_set_firmware_waking_vector(acpi_physical_address physical_address)
 
        /* Get the FACS */
 
-       status =
-           acpi_get_table_by_index(ACPI_TABLE_INDEX_FACS,
-                                   (struct acpi_table_header **)&facs);
+       status = acpi_get_table_by_index(ACPI_TABLE_INDEX_FACS,
+                                        ACPI_CAST_INDIRECT_PTR(struct
+                                                               acpi_table_header,
+                                                               &facs));
        if (ACPI_FAILURE(status)) {
                return_ACPI_STATUS(status);
        }
@@ -124,9 +125,10 @@ acpi_get_firmware_waking_vector(acpi_physical_address * physical_address)
 
        /* Get the FACS */
 
-       status =
-           acpi_get_table_by_index(ACPI_TABLE_INDEX_FACS,
-                                   (struct acpi_table_header **)&facs);
+       status = acpi_get_table_by_index(ACPI_TABLE_INDEX_FACS,
+                                        ACPI_CAST_INDIRECT_PTR(struct
+                                                               acpi_table_header,
+                                                               &facs));
        if (ACPI_FAILURE(status)) {
                return_ACPI_STATUS(status);
        }
index 1fc4f86676e1969b5981ef6ffae26a853ad74606..3068e20911f4cf5ad2ff2d831b5f5ec846d1d8c2 100644 (file)
@@ -249,7 +249,9 @@ acpi_ns_dump_one_object(acpi_handle obj_handle,
                        acpi_os_printf("ID %X Len %.4X Addr %p\n",
                                       obj_desc->processor.proc_id,
                                       obj_desc->processor.length,
-                                      (char *)obj_desc->processor.address);
+                                      ACPI_CAST_PTR(void,
+                                                    obj_desc->processor.
+                                                    address));
                        break;
 
                case ACPI_TYPE_DEVICE:
@@ -320,9 +322,8 @@ acpi_ns_dump_one_object(acpi_handle obj_handle,
                                                               space_id));
                        if (obj_desc->region.flags & AOPOBJ_DATA_VALID) {
                                acpi_os_printf(" Addr %8.8X%8.8X Len %.4X\n",
-                                              ACPI_FORMAT_UINT64(obj_desc->
-                                                                 region.
-                                                                 address),
+                                              ACPI_FORMAT_NATIVE_UINT
+                                              (obj_desc->region.address),
                                               obj_desc->region.length);
                        } else {
                                acpi_os_printf
index 545010dfd8357b38b2f16f5d62c3471629095bf1..1bfcb6f3f44f15e699fd0009d55ef4622ee2edb4 100644 (file)
@@ -111,7 +111,7 @@ acpi_ns_load_table(acpi_native_uint table_index,
        if (ACPI_SUCCESS(status)) {
                acpi_tb_set_table_loaded_flag(table_index, TRUE);
        } else {
-               acpi_tb_release_owner_id(table_index);
+               (void)acpi_tb_release_owner_id(table_index);
        }
 
       unlock:
index e14a1412656b7a42396f70f88d4800a083372c2e..ba1a4f00ba125070b059a1f1ca03ba76ed4f836b 100644 (file)
@@ -182,7 +182,7 @@ acpi_size acpi_ns_get_pathname_length(struct acpi_namespace_node *node)
        while (next_node && (next_node != acpi_gbl_root_node)) {
                if (ACPI_GET_DESCRIPTOR_TYPE(next_node) != ACPI_DESC_TYPE_NAMED) {
                        ACPI_ERROR((AE_INFO,
-                                   "Invalid NS Node (%X) while traversing path",
+                                   "Invalid NS Node (%p) while traversing path",
                                    next_node));
                        return 0;
                }
index 86bd6e5920c7baa1165e8d2e0da8024ea24a3468..f260b6941c139d1019a90fe35f6eae12f71028c6 100644 (file)
@@ -112,21 +112,25 @@ acpi_ns_one_complete_parse(acpi_native_uint pass_number,
                aml_start = (u8 *) table + sizeof(struct acpi_table_header);
                aml_length = table->length - sizeof(struct acpi_table_header);
                status = acpi_ds_init_aml_walk(walk_state, parse_root, NULL,
-                                              aml_start, aml_length, NULL,
-                                              (u8) pass_number);
+                                              aml_start, (u32) aml_length,
+                                              NULL, (u8) pass_number);
        }
 
        if (ACPI_FAILURE(status)) {
                acpi_ds_delete_walk_state(walk_state);
-               acpi_ps_delete_parse_tree(parse_root);
-               return_ACPI_STATUS(status);
+               goto cleanup;
        }
 
        /* start_node is the default location to load the table */
 
        if (start_node && start_node != acpi_gbl_root_node) {
-               acpi_ds_scope_stack_push(start_node, ACPI_TYPE_METHOD,
-                                        walk_state);
+               status =
+                   acpi_ds_scope_stack_push(start_node, ACPI_TYPE_METHOD,
+                                            walk_state);
+               if (ACPI_FAILURE(status)) {
+                       acpi_ds_delete_walk_state(walk_state);
+                       goto cleanup;
+               }
        }
 
        /* Parse the AML */
@@ -135,6 +139,7 @@ acpi_ns_one_complete_parse(acpi_native_uint pass_number,
                          (unsigned)pass_number));
        status = acpi_ps_parse_aml(walk_state);
 
+      cleanup:
        acpi_ps_delete_parse_tree(parse_root);
        return_ACPI_STATUS(status);
 }
index 0dd2ce8a3475d4c062a0a67941805fb29a3063ec..dcc51e92ac92c418f66d8a31e0a8d6da211d1edc 100644 (file)
@@ -73,7 +73,7 @@ acpi_rs_stream_option_length(u32 resource_length, u32 minimum_total_length);
 
 static u8 acpi_rs_count_set_bits(u16 bit_field)
 {
-       u8 bits_set;
+       acpi_native_uint bits_set;
 
        ACPI_FUNCTION_ENTRY();
 
@@ -81,10 +81,10 @@ static u8 acpi_rs_count_set_bits(u16 bit_field)
 
                /* Zero the least significant bit that is set */
 
-               bit_field &= (bit_field - 1);
+               bit_field &= (u16) (bit_field - 1);
        }
 
-       return (bits_set);
+       return ((u8) bits_set);
 }
 
 /*******************************************************************************
index 11c0bd7b9cfdea8272f374f51d127654586f0a0c..935a4827e7ab0c22f47d5cc0c95e274bdf2ed0f1 100644 (file)
@@ -97,17 +97,17 @@ u8 acpi_rs_decode_bitmask(u16 mask, u8 * list)
 u16 acpi_rs_encode_bitmask(u8 * list, u8 count)
 {
        acpi_native_uint i;
-       u16 mask;
+       acpi_native_uint mask;
 
        ACPI_FUNCTION_ENTRY();
 
        /* Encode the list into a single bitmask */
 
        for (i = 0, mask = 0; i < count; i++) {
-               mask |= (0x0001 << list[i]);
+               mask |= (0x1 << list[i]);
        }
 
-       return (mask);
+       return ((u16) mask);
 }
 
 /*******************************************************************************
index 6e56d5f7c43a05a9e4c1f9d90d16e3cd2c0111a6..181e66986fa9a6dbde3c444727e565c443f74256 100644 (file)
@@ -147,7 +147,7 @@ acpi_status acpi_ut_delete_caches(void)
 
        if (acpi_gbl_display_final_mem_stats) {
                ACPI_STRCPY(buffer, "MEMORY");
-               acpi_db_display_statistics(buffer);
+               (void)acpi_db_display_statistics(buffer);
        }
 #endif
 
index 879eaa10d3ae77cf92777f4198dc60eb1b4c7058..b56953d2b59efeee235b4702127b2a92dedb4754 100644 (file)
@@ -570,7 +570,7 @@ acpi_ut_copy_epackage_to_ipackage(union acpi_object *external_object,
 
                        /* Truncate package and delete it */
 
-                       package_object->package.count = i;
+                       package_object->package.count = (u32) i;
                        package_elements[i] = NULL;
                        acpi_ut_remove_reference(package_object);
                        return_ACPI_STATUS(status);
index a9148677f037e919cd1f77a33331a1fd9a19e847..2d6a78fb01cf63055baab9516a657570347cc174 100644 (file)
@@ -68,9 +68,9 @@ static const char *acpi_ut_trim_function_name(const char *function_name);
 
 void acpi_ut_init_stack_ptr_trace(void)
 {
-       u32 current_sp;
+       acpi_size current_sp;
 
-       acpi_gbl_entry_stack_pointer = ACPI_PTR_DIFF(&current_sp, NULL);
+       acpi_gbl_entry_stack_pointer = &current_sp;
 }
 
 /*******************************************************************************
@@ -89,10 +89,8 @@ void acpi_ut_track_stack_ptr(void)
 {
        acpi_size current_sp;
 
-       current_sp = ACPI_PTR_DIFF(&current_sp, NULL);
-
-       if (current_sp < acpi_gbl_lowest_stack_pointer) {
-               acpi_gbl_lowest_stack_pointer = current_sp;
+       if (&current_sp < acpi_gbl_lowest_stack_pointer) {
+               acpi_gbl_lowest_stack_pointer = &current_sp;
        }
 
        if (acpi_gbl_nesting_level > acpi_gbl_deepest_nesting) {
index 44425433075a72d72c2ff2f3d745b6d3e2f31ac1..d2097ded262db36f92a38bc776138bd09cf26365 100644 (file)
@@ -723,7 +723,7 @@ void acpi_ut_init_globals(void)
        acpi_gbl_root_node_struct.flags = ANOBJ_END_OF_PEER_LIST;
 
 #ifdef ACPI_DEBUG_OUTPUT
-       acpi_gbl_lowest_stack_pointer = ACPI_SIZE_MAX;
+       acpi_gbl_lowest_stack_pointer = ACPI_CAST_PTR(acpi_size, ACPI_SIZE_MAX);
 #endif
 
 #ifdef ACPI_DBG_TRACK_ALLOCATIONS