]> git.karo-electronics.de Git - linux-beck.git/commitdiff
ACPICA: Fix compiler warnings for casting issues (only some compilers)
authorJung-uk Kim <jkim@FreeBSD.org>
Wed, 17 Jul 2013 01:48:58 +0000 (09:48 +0800)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 22 Jul 2013 23:06:50 +0000 (01:06 +0200)
Fixes compiler warnings from GCC 4.2 and perhaps other compilers.
Jung-uk Kim <jkim@FreeBSD.org>

Signed-off-by: Jung-uk Kim <jkim@FreeBSD.org>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Acked-by: Len Brown <len.brown@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/acpica/exdump.c
drivers/acpi/acpica/nsxfname.c

index c740f24e3101069af922a5e5842a77fb60d34710..4d046faac48cbb09b2c0aa6c4a0c5e8550333ec5 100644 (file)
@@ -338,6 +338,7 @@ acpi_ex_dump_object(union acpi_operand_object *obj_desc,
 {
        u8 *target;
        char *name;
+       const char *reference_name;
        u8 count;
 
        if (!info) {
@@ -426,10 +427,9 @@ acpi_ex_dump_object(union acpi_operand_object *obj_desc,
 
                case ACPI_EXD_REFERENCE:
 
+                       reference_name = acpi_ut_get_reference_name(obj_desc);
                        acpi_ex_out_string("Class Name",
-                                          ACPI_CAST_PTR(char,
-                                                        acpi_ut_get_reference_name
-                                                        (obj_desc)));
+                                          ACPI_CAST_PTR(char, reference_name));
                        acpi_ex_dump_reference_obj(obj_desc);
                        break;
 
index 21a2ef363ad47c7988a974a3be6a26cb28be6c9f..83c164434580d3bd12229be0278d6e7e70e0e6b8 100644 (file)
@@ -158,6 +158,7 @@ acpi_get_name(acpi_handle handle, u32 name_type, struct acpi_buffer * buffer)
 {
        acpi_status status;
        struct acpi_namespace_node *node;
+       char *node_name;
 
        /* Parameter validation */
 
@@ -202,7 +203,8 @@ acpi_get_name(acpi_handle handle, u32 name_type, struct acpi_buffer * buffer)
 
        /* Just copy the ACPI name from the Node and zero terminate it */
 
-       ACPI_MOVE_NAME(buffer->pointer, acpi_ut_get_node_name(node));
+       node_name = acpi_ut_get_node_name(node);
+       ACPI_MOVE_NAME(buffer->pointer, node_name);
        ((char *)buffer->pointer)[ACPI_NAME_SIZE] = 0;
        status = AE_OK;