]> git.karo-electronics.de Git - linux-beck.git/commitdiff
ACPICA: Eliminate superfluous return_UINT8 and return_UINT32 macros.
authorBob Moore <robert.moore@intel.com>
Mon, 31 Dec 2012 00:06:16 +0000 (00:06 +0000)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 10 Jan 2013 11:36:20 +0000 (12:36 +0100)
These macros were implemented the same as return_VALUE and thus
they were not needed.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/acpica/acmacros.h
drivers/acpi/acpica/dsutils.c
drivers/acpi/acpica/evgpe.c
drivers/acpi/acpica/evsci.c
drivers/acpi/acpica/exprep.c
drivers/acpi/acpica/exutils.c
drivers/acpi/acpica/hwacpi.c
drivers/acpi/acpica/nsutils.c
drivers/acpi/acpica/psargs.c
drivers/acpi/acpica/utaddress.c

index cd96135c96b46a1559413bb3104e27d725e121e0..81f3cf7a4a596d908ca9e568fdbd0f3fc7b58daf 100644 (file)
 #define return_VALUE(value) \
        ACPI_TRACE_EXIT (acpi_ut_value_exit, (u64), value)
 
-/* These exit macros are superfluous and should be removed entirely */
-
-#define return_UINT8        return_VALUE
-#define return_UINT32       return_VALUE
-
 /* Conditional execution */
 
 #define ACPI_DEBUG_EXEC(a)              a
 #define return_VOID                     return
 #define return_ACPI_STATUS(s)           return(s)
 #define return_VALUE(s)                 return(s)
-#define return_UINT8(s)                 return(s)
-#define return_UINT32(s)                return(s)
 #define return_PTR(s)                   return(s)
 
 #endif                         /* ACPI_DEBUG_OUTPUT */
index afeb99f494827a66c0a72d201962dbcd0189fe22..466f5f2e69ba097bac3bf365ac67bcdb9018ad95 100644 (file)
@@ -178,7 +178,7 @@ acpi_ds_is_result_used(union acpi_parse_object * op,
 
        if (!op) {
                ACPI_ERROR((AE_INFO, "Null Op"));
-               return_UINT8(TRUE);
+               return_VALUE(TRUE);
        }
 
        /*
@@ -210,7 +210,7 @@ acpi_ds_is_result_used(union acpi_parse_object * op,
                                  "At Method level, result of [%s] not used\n",
                                  acpi_ps_get_opcode_name(op->common.
                                                          aml_opcode)));
-               return_UINT8(FALSE);
+               return_VALUE(FALSE);
        }
 
        /* Get info on the parent. The root_op is AML_SCOPE */
@@ -219,7 +219,7 @@ acpi_ds_is_result_used(union acpi_parse_object * op,
            acpi_ps_get_opcode_info(op->common.parent->common.aml_opcode);
        if (parent_info->class == AML_CLASS_UNKNOWN) {
                ACPI_ERROR((AE_INFO, "Unknown parent opcode Op=%p", op));
-               return_UINT8(FALSE);
+               return_VALUE(FALSE);
        }
 
        /*
@@ -307,7 +307,7 @@ acpi_ds_is_result_used(union acpi_parse_object * op,
                          acpi_ps_get_opcode_name(op->common.parent->common.
                                                  aml_opcode), op));
 
-       return_UINT8(TRUE);
+       return_VALUE(TRUE);
 
       result_not_used:
        ACPI_DEBUG_PRINT((ACPI_DB_DISPATCH,
@@ -316,7 +316,7 @@ acpi_ds_is_result_used(union acpi_parse_object * op,
                          acpi_ps_get_opcode_name(op->common.parent->common.
                                                  aml_opcode), op));
 
-       return_UINT8(FALSE);
+       return_VALUE(FALSE);
 }
 
 /*******************************************************************************
index 4cbb6007068ea37ba36ef89139445a0081ee039b..052d4c847012d7db26c762b9d461d4e021a50bc2 100644 (file)
@@ -707,7 +707,7 @@ acpi_ev_gpe_dispatch(struct acpi_namespace_node *gpe_device,
                if (ACPI_FAILURE(status)) {
                        ACPI_EXCEPTION((AE_INFO, status,
                                        "Unable to clear GPE%02X", gpe_number));
-                       return_UINT32(ACPI_INTERRUPT_NOT_HANDLED);
+                       return_VALUE(ACPI_INTERRUPT_NOT_HANDLED);
                }
        }
 
@@ -724,7 +724,7 @@ acpi_ev_gpe_dispatch(struct acpi_namespace_node *gpe_device,
        if (ACPI_FAILURE(status)) {
                ACPI_EXCEPTION((AE_INFO, status,
                                "Unable to disable GPE%02X", gpe_number));
-               return_UINT32(ACPI_INTERRUPT_NOT_HANDLED);
+               return_VALUE(ACPI_INTERRUPT_NOT_HANDLED);
        }
 
        /*
@@ -784,7 +784,7 @@ acpi_ev_gpe_dispatch(struct acpi_namespace_node *gpe_device,
                break;
        }
 
-       return_UINT32(ACPI_INTERRUPT_HANDLED);
+       return_VALUE(ACPI_INTERRUPT_HANDLED);
 }
 
 #endif                         /* !ACPI_REDUCED_HARDWARE */
index f9661e2b46a981d8a53dca19425cfbd2b046ffbb..6c90f15460b0c9a74ec094d8edc9551ef09e3e50 100644 (file)
@@ -89,7 +89,7 @@ static u32 ACPI_SYSTEM_XFACE acpi_ev_sci_xrupt_handler(void *context)
         */
        interrupt_handled |= acpi_ev_gpe_detect(gpe_xrupt_list);
 
-       return_UINT32(interrupt_handled);
+       return_VALUE(interrupt_handled);
 }
 
 /*******************************************************************************
@@ -120,7 +120,7 @@ u32 ACPI_SYSTEM_XFACE acpi_ev_gpe_xrupt_handler(void *context)
 
        interrupt_handled |= acpi_ev_gpe_detect(gpe_xrupt_list);
 
-       return_UINT32(interrupt_handled);
+       return_VALUE(interrupt_handled);
 }
 
 /******************************************************************************
index ba9db4de7c892509d0eda4862e2ca03e3ba1c395..60ee5e906ed466b404008c1a855f25fe4099f29a 100644 (file)
@@ -276,7 +276,7 @@ acpi_ex_decode_field_access(union acpi_operand_object *obj_desc,
                /* Invalid field access type */
 
                ACPI_ERROR((AE_INFO, "Unknown field access type 0x%X", access));
-               return_UINT32(0);
+               return_VALUE(0);
        }
 
        if (obj_desc->common.type == ACPI_TYPE_BUFFER_FIELD) {
@@ -289,7 +289,7 @@ acpi_ex_decode_field_access(union acpi_operand_object *obj_desc,
        }
 
        *return_byte_alignment = byte_alignment;
-       return_UINT32(bit_length);
+       return_VALUE(bit_length);
 }
 
 /*******************************************************************************
index 264d22d8018c14f50fd7cf338339247692be136d..02ddc4ceca37a45ace9b0bdd544da57beb328da9 100644 (file)
@@ -336,7 +336,7 @@ static u32 acpi_ex_digits_needed(u64 value, u32 base)
        /* u64 is unsigned, so we don't worry about a '-' prefix */
 
        if (value == 0) {
-               return_UINT32(1);
+               return_VALUE(1);
        }
 
        current_value = value;
@@ -350,7 +350,7 @@ static u32 acpi_ex_digits_needed(u64 value, u32 base)
                num_digits++;
        }
 
-       return_UINT32(num_digits);
+       return_VALUE(num_digits);
 }
 
 /*******************************************************************************
index effa2b0a5932c1dfeb0668a69cbcd660880d5ba6..2613e2945af3ac931ed50079fd4a27ade0147daf 100644 (file)
@@ -151,18 +151,18 @@ u32 acpi_hw_get_mode(void)
         * system does not support mode transition.
         */
        if (!acpi_gbl_FADT.smi_command) {
-               return_UINT32(ACPI_SYS_MODE_ACPI);
+               return_VALUE(ACPI_SYS_MODE_ACPI);
        }
 
        status = acpi_read_bit_register(ACPI_BITREG_SCI_ENABLE, &value);
        if (ACPI_FAILURE(status)) {
-               return_UINT32(ACPI_SYS_MODE_LEGACY);
+               return_VALUE(ACPI_SYS_MODE_LEGACY);
        }
 
        if (value) {
-               return_UINT32(ACPI_SYS_MODE_ACPI);
+               return_VALUE(ACPI_SYS_MODE_ACPI);
        } else {
-               return_UINT32(ACPI_SYS_MODE_LEGACY);
+               return_VALUE(ACPI_SYS_MODE_LEGACY);
        }
 }
 
index 596d4ccc963f32c7fe6ad484ca6a605c4ad61e06..a771c8cd0e7c3d4e7fd97d146b2674d3f33fcc59 100644 (file)
@@ -112,10 +112,10 @@ acpi_object_type acpi_ns_get_type(struct acpi_namespace_node * node)
 
        if (!node) {
                ACPI_WARNING((AE_INFO, "Null Node parameter"));
-               return_UINT32(ACPI_TYPE_ANY);
+               return_VALUE(ACPI_TYPE_ANY);
        }
 
-       return_UINT32((acpi_object_type) node->type);
+       return_VALUE(node->type);
 }
 
 /*******************************************************************************
@@ -140,10 +140,10 @@ u32 acpi_ns_local(acpi_object_type type)
                /* Type code out of range  */
 
                ACPI_WARNING((AE_INFO, "Invalid Object Type 0x%X", type));
-               return_UINT32(ACPI_NS_NORMAL);
+               return_VALUE(ACPI_NS_NORMAL);
        }
 
-       return_UINT32((u32) acpi_gbl_ns_properties[type] & ACPI_NS_LOCAL);
+       return_VALUE(acpi_gbl_ns_properties[type] & ACPI_NS_LOCAL);
 }
 
 /*******************************************************************************
index 9f3189395f3a825230391149a4cb77e2a8bfa240..92565131cddaf6f0dfd7aef16d953d9ab8b0f1fe 100644 (file)
@@ -108,7 +108,7 @@ acpi_ps_get_next_package_length(struct acpi_parse_state *parser_state)
        /* Byte 0 is a special case, either bits [0:3] or [0:5] are used */
 
        package_length |= (aml[0] & byte_zero_mask);
-       return_UINT32(package_length);
+       return_VALUE(package_length);
 }
 
 /*******************************************************************************
index 64880306133d9156b5862812b12ff018ef48a59d..b86ef850097e44a525b3cb50b2689631bfdc6114 100644 (file)
@@ -214,7 +214,7 @@ acpi_ut_check_address_range(acpi_adr_space_type space_id,
 
        if ((space_id != ACPI_ADR_SPACE_SYSTEM_MEMORY) &&
            (space_id != ACPI_ADR_SPACE_SYSTEM_IO)) {
-               return_UINT32(0);
+               return_VALUE(0);
        }
 
        range_info = acpi_gbl_address_range_list[space_id];
@@ -256,7 +256,7 @@ acpi_ut_check_address_range(acpi_adr_space_type space_id,
                range_info = range_info->next;
        }
 
-       return_UINT32(overlap_count);
+       return_VALUE(overlap_count);
 }
 
 /*******************************************************************************