diff options
author | Bob Moore <robert.moore@intel.com> | 2012-12-30 19:06:16 -0500 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-01-10 06:36:20 -0500 |
commit | 7b891693091166123307f6e3023533c8d1d46f99 (patch) | |
tree | ea14a134fedd6caf3a6084dea7ee471f79118f19 | |
parent | db38bf5a57a955975986b514c6bbd7cb324fddc3 (diff) |
ACPICA: Eliminate superfluous return_UINT8 and return_UINT32 macros.
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>
-rw-r--r-- | drivers/acpi/acpica/acmacros.h | 7 | ||||
-rw-r--r-- | drivers/acpi/acpica/dsutils.c | 10 | ||||
-rw-r--r-- | drivers/acpi/acpica/evgpe.c | 6 | ||||
-rw-r--r-- | drivers/acpi/acpica/evsci.c | 4 | ||||
-rw-r--r-- | drivers/acpi/acpica/exprep.c | 4 | ||||
-rw-r--r-- | drivers/acpi/acpica/exutils.c | 4 | ||||
-rw-r--r-- | drivers/acpi/acpica/hwacpi.c | 8 | ||||
-rw-r--r-- | drivers/acpi/acpica/nsutils.c | 8 | ||||
-rw-r--r-- | drivers/acpi/acpica/psargs.c | 2 | ||||
-rw-r--r-- | drivers/acpi/acpica/utaddress.c | 4 |
10 files changed, 25 insertions, 32 deletions
diff --git a/drivers/acpi/acpica/acmacros.h b/drivers/acpi/acpica/acmacros.h index cd96135c96b4..81f3cf7a4a59 100644 --- a/drivers/acpi/acpica/acmacros.h +++ b/drivers/acpi/acpica/acmacros.h | |||
@@ -469,11 +469,6 @@ | |||
469 | #define return_VALUE(value) \ | 469 | #define return_VALUE(value) \ |
470 | ACPI_TRACE_EXIT (acpi_ut_value_exit, (u64), value) | 470 | ACPI_TRACE_EXIT (acpi_ut_value_exit, (u64), value) |
471 | 471 | ||
472 | /* These exit macros are superfluous and should be removed entirely */ | ||
473 | |||
474 | #define return_UINT8 return_VALUE | ||
475 | #define return_UINT32 return_VALUE | ||
476 | |||
477 | /* Conditional execution */ | 472 | /* Conditional execution */ |
478 | 473 | ||
479 | #define ACPI_DEBUG_EXEC(a) a | 474 | #define ACPI_DEBUG_EXEC(a) a |
@@ -515,8 +510,6 @@ | |||
515 | #define return_VOID return | 510 | #define return_VOID return |
516 | #define return_ACPI_STATUS(s) return(s) | 511 | #define return_ACPI_STATUS(s) return(s) |
517 | #define return_VALUE(s) return(s) | 512 | #define return_VALUE(s) return(s) |
518 | #define return_UINT8(s) return(s) | ||
519 | #define return_UINT32(s) return(s) | ||
520 | #define return_PTR(s) return(s) | 513 | #define return_PTR(s) return(s) |
521 | 514 | ||
522 | #endif /* ACPI_DEBUG_OUTPUT */ | 515 | #endif /* ACPI_DEBUG_OUTPUT */ |
diff --git a/drivers/acpi/acpica/dsutils.c b/drivers/acpi/acpica/dsutils.c index afeb99f49482..466f5f2e69ba 100644 --- a/drivers/acpi/acpica/dsutils.c +++ b/drivers/acpi/acpica/dsutils.c | |||
@@ -178,7 +178,7 @@ acpi_ds_is_result_used(union acpi_parse_object * op, | |||
178 | 178 | ||
179 | if (!op) { | 179 | if (!op) { |
180 | ACPI_ERROR((AE_INFO, "Null Op")); | 180 | ACPI_ERROR((AE_INFO, "Null Op")); |
181 | return_UINT8(TRUE); | 181 | return_VALUE(TRUE); |
182 | } | 182 | } |
183 | 183 | ||
184 | /* | 184 | /* |
@@ -210,7 +210,7 @@ acpi_ds_is_result_used(union acpi_parse_object * op, | |||
210 | "At Method level, result of [%s] not used\n", | 210 | "At Method level, result of [%s] not used\n", |
211 | acpi_ps_get_opcode_name(op->common. | 211 | acpi_ps_get_opcode_name(op->common. |
212 | aml_opcode))); | 212 | aml_opcode))); |
213 | return_UINT8(FALSE); | 213 | return_VALUE(FALSE); |
214 | } | 214 | } |
215 | 215 | ||
216 | /* Get info on the parent. The root_op is AML_SCOPE */ | 216 | /* 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, | |||
219 | acpi_ps_get_opcode_info(op->common.parent->common.aml_opcode); | 219 | acpi_ps_get_opcode_info(op->common.parent->common.aml_opcode); |
220 | if (parent_info->class == AML_CLASS_UNKNOWN) { | 220 | if (parent_info->class == AML_CLASS_UNKNOWN) { |
221 | ACPI_ERROR((AE_INFO, "Unknown parent opcode Op=%p", op)); | 221 | ACPI_ERROR((AE_INFO, "Unknown parent opcode Op=%p", op)); |
222 | return_UINT8(FALSE); | 222 | return_VALUE(FALSE); |
223 | } | 223 | } |
224 | 224 | ||
225 | /* | 225 | /* |
@@ -307,7 +307,7 @@ acpi_ds_is_result_used(union acpi_parse_object * op, | |||
307 | acpi_ps_get_opcode_name(op->common.parent->common. | 307 | acpi_ps_get_opcode_name(op->common.parent->common. |
308 | aml_opcode), op)); | 308 | aml_opcode), op)); |
309 | 309 | ||
310 | return_UINT8(TRUE); | 310 | return_VALUE(TRUE); |
311 | 311 | ||
312 | result_not_used: | 312 | result_not_used: |
313 | ACPI_DEBUG_PRINT((ACPI_DB_DISPATCH, | 313 | ACPI_DEBUG_PRINT((ACPI_DB_DISPATCH, |
@@ -316,7 +316,7 @@ acpi_ds_is_result_used(union acpi_parse_object * op, | |||
316 | acpi_ps_get_opcode_name(op->common.parent->common. | 316 | acpi_ps_get_opcode_name(op->common.parent->common. |
317 | aml_opcode), op)); | 317 | aml_opcode), op)); |
318 | 318 | ||
319 | return_UINT8(FALSE); | 319 | return_VALUE(FALSE); |
320 | } | 320 | } |
321 | 321 | ||
322 | /******************************************************************************* | 322 | /******************************************************************************* |
diff --git a/drivers/acpi/acpica/evgpe.c b/drivers/acpi/acpica/evgpe.c index 4cbb6007068e..052d4c847012 100644 --- a/drivers/acpi/acpica/evgpe.c +++ b/drivers/acpi/acpica/evgpe.c | |||
@@ -707,7 +707,7 @@ acpi_ev_gpe_dispatch(struct acpi_namespace_node *gpe_device, | |||
707 | if (ACPI_FAILURE(status)) { | 707 | if (ACPI_FAILURE(status)) { |
708 | ACPI_EXCEPTION((AE_INFO, status, | 708 | ACPI_EXCEPTION((AE_INFO, status, |
709 | "Unable to clear GPE%02X", gpe_number)); | 709 | "Unable to clear GPE%02X", gpe_number)); |
710 | return_UINT32(ACPI_INTERRUPT_NOT_HANDLED); | 710 | return_VALUE(ACPI_INTERRUPT_NOT_HANDLED); |
711 | } | 711 | } |
712 | } | 712 | } |
713 | 713 | ||
@@ -724,7 +724,7 @@ acpi_ev_gpe_dispatch(struct acpi_namespace_node *gpe_device, | |||
724 | if (ACPI_FAILURE(status)) { | 724 | if (ACPI_FAILURE(status)) { |
725 | ACPI_EXCEPTION((AE_INFO, status, | 725 | ACPI_EXCEPTION((AE_INFO, status, |
726 | "Unable to disable GPE%02X", gpe_number)); | 726 | "Unable to disable GPE%02X", gpe_number)); |
727 | return_UINT32(ACPI_INTERRUPT_NOT_HANDLED); | 727 | return_VALUE(ACPI_INTERRUPT_NOT_HANDLED); |
728 | } | 728 | } |
729 | 729 | ||
730 | /* | 730 | /* |
@@ -784,7 +784,7 @@ acpi_ev_gpe_dispatch(struct acpi_namespace_node *gpe_device, | |||
784 | break; | 784 | break; |
785 | } | 785 | } |
786 | 786 | ||
787 | return_UINT32(ACPI_INTERRUPT_HANDLED); | 787 | return_VALUE(ACPI_INTERRUPT_HANDLED); |
788 | } | 788 | } |
789 | 789 | ||
790 | #endif /* !ACPI_REDUCED_HARDWARE */ | 790 | #endif /* !ACPI_REDUCED_HARDWARE */ |
diff --git a/drivers/acpi/acpica/evsci.c b/drivers/acpi/acpica/evsci.c index f9661e2b46a9..6c90f15460b0 100644 --- a/drivers/acpi/acpica/evsci.c +++ b/drivers/acpi/acpica/evsci.c | |||
@@ -89,7 +89,7 @@ static u32 ACPI_SYSTEM_XFACE acpi_ev_sci_xrupt_handler(void *context) | |||
89 | */ | 89 | */ |
90 | interrupt_handled |= acpi_ev_gpe_detect(gpe_xrupt_list); | 90 | interrupt_handled |= acpi_ev_gpe_detect(gpe_xrupt_list); |
91 | 91 | ||
92 | return_UINT32(interrupt_handled); | 92 | return_VALUE(interrupt_handled); |
93 | } | 93 | } |
94 | 94 | ||
95 | /******************************************************************************* | 95 | /******************************************************************************* |
@@ -120,7 +120,7 @@ u32 ACPI_SYSTEM_XFACE acpi_ev_gpe_xrupt_handler(void *context) | |||
120 | 120 | ||
121 | interrupt_handled |= acpi_ev_gpe_detect(gpe_xrupt_list); | 121 | interrupt_handled |= acpi_ev_gpe_detect(gpe_xrupt_list); |
122 | 122 | ||
123 | return_UINT32(interrupt_handled); | 123 | return_VALUE(interrupt_handled); |
124 | } | 124 | } |
125 | 125 | ||
126 | /****************************************************************************** | 126 | /****************************************************************************** |
diff --git a/drivers/acpi/acpica/exprep.c b/drivers/acpi/acpica/exprep.c index ba9db4de7c89..60ee5e906ed4 100644 --- a/drivers/acpi/acpica/exprep.c +++ b/drivers/acpi/acpica/exprep.c | |||
@@ -276,7 +276,7 @@ acpi_ex_decode_field_access(union acpi_operand_object *obj_desc, | |||
276 | /* Invalid field access type */ | 276 | /* Invalid field access type */ |
277 | 277 | ||
278 | ACPI_ERROR((AE_INFO, "Unknown field access type 0x%X", access)); | 278 | ACPI_ERROR((AE_INFO, "Unknown field access type 0x%X", access)); |
279 | return_UINT32(0); | 279 | return_VALUE(0); |
280 | } | 280 | } |
281 | 281 | ||
282 | if (obj_desc->common.type == ACPI_TYPE_BUFFER_FIELD) { | 282 | if (obj_desc->common.type == ACPI_TYPE_BUFFER_FIELD) { |
@@ -289,7 +289,7 @@ acpi_ex_decode_field_access(union acpi_operand_object *obj_desc, | |||
289 | } | 289 | } |
290 | 290 | ||
291 | *return_byte_alignment = byte_alignment; | 291 | *return_byte_alignment = byte_alignment; |
292 | return_UINT32(bit_length); | 292 | return_VALUE(bit_length); |
293 | } | 293 | } |
294 | 294 | ||
295 | /******************************************************************************* | 295 | /******************************************************************************* |
diff --git a/drivers/acpi/acpica/exutils.c b/drivers/acpi/acpica/exutils.c index 264d22d8018c..02ddc4ceca37 100644 --- a/drivers/acpi/acpica/exutils.c +++ b/drivers/acpi/acpica/exutils.c | |||
@@ -336,7 +336,7 @@ static u32 acpi_ex_digits_needed(u64 value, u32 base) | |||
336 | /* u64 is unsigned, so we don't worry about a '-' prefix */ | 336 | /* u64 is unsigned, so we don't worry about a '-' prefix */ |
337 | 337 | ||
338 | if (value == 0) { | 338 | if (value == 0) { |
339 | return_UINT32(1); | 339 | return_VALUE(1); |
340 | } | 340 | } |
341 | 341 | ||
342 | current_value = value; | 342 | current_value = value; |
@@ -350,7 +350,7 @@ static u32 acpi_ex_digits_needed(u64 value, u32 base) | |||
350 | num_digits++; | 350 | num_digits++; |
351 | } | 351 | } |
352 | 352 | ||
353 | return_UINT32(num_digits); | 353 | return_VALUE(num_digits); |
354 | } | 354 | } |
355 | 355 | ||
356 | /******************************************************************************* | 356 | /******************************************************************************* |
diff --git a/drivers/acpi/acpica/hwacpi.c b/drivers/acpi/acpica/hwacpi.c index effa2b0a5932..2613e2945af3 100644 --- a/drivers/acpi/acpica/hwacpi.c +++ b/drivers/acpi/acpica/hwacpi.c | |||
@@ -151,18 +151,18 @@ u32 acpi_hw_get_mode(void) | |||
151 | * system does not support mode transition. | 151 | * system does not support mode transition. |
152 | */ | 152 | */ |
153 | if (!acpi_gbl_FADT.smi_command) { | 153 | if (!acpi_gbl_FADT.smi_command) { |
154 | return_UINT32(ACPI_SYS_MODE_ACPI); | 154 | return_VALUE(ACPI_SYS_MODE_ACPI); |
155 | } | 155 | } |
156 | 156 | ||
157 | status = acpi_read_bit_register(ACPI_BITREG_SCI_ENABLE, &value); | 157 | status = acpi_read_bit_register(ACPI_BITREG_SCI_ENABLE, &value); |
158 | if (ACPI_FAILURE(status)) { | 158 | if (ACPI_FAILURE(status)) { |
159 | return_UINT32(ACPI_SYS_MODE_LEGACY); | 159 | return_VALUE(ACPI_SYS_MODE_LEGACY); |
160 | } | 160 | } |
161 | 161 | ||
162 | if (value) { | 162 | if (value) { |
163 | return_UINT32(ACPI_SYS_MODE_ACPI); | 163 | return_VALUE(ACPI_SYS_MODE_ACPI); |
164 | } else { | 164 | } else { |
165 | return_UINT32(ACPI_SYS_MODE_LEGACY); | 165 | return_VALUE(ACPI_SYS_MODE_LEGACY); |
166 | } | 166 | } |
167 | } | 167 | } |
168 | 168 | ||
diff --git a/drivers/acpi/acpica/nsutils.c b/drivers/acpi/acpica/nsutils.c index 596d4ccc963f..a771c8cd0e7c 100644 --- a/drivers/acpi/acpica/nsutils.c +++ b/drivers/acpi/acpica/nsutils.c | |||
@@ -112,10 +112,10 @@ acpi_object_type acpi_ns_get_type(struct acpi_namespace_node * node) | |||
112 | 112 | ||
113 | if (!node) { | 113 | if (!node) { |
114 | ACPI_WARNING((AE_INFO, "Null Node parameter")); | 114 | ACPI_WARNING((AE_INFO, "Null Node parameter")); |
115 | return_UINT32(ACPI_TYPE_ANY); | 115 | return_VALUE(ACPI_TYPE_ANY); |
116 | } | 116 | } |
117 | 117 | ||
118 | return_UINT32((acpi_object_type) node->type); | 118 | return_VALUE(node->type); |
119 | } | 119 | } |
120 | 120 | ||
121 | /******************************************************************************* | 121 | /******************************************************************************* |
@@ -140,10 +140,10 @@ u32 acpi_ns_local(acpi_object_type type) | |||
140 | /* Type code out of range */ | 140 | /* Type code out of range */ |
141 | 141 | ||
142 | ACPI_WARNING((AE_INFO, "Invalid Object Type 0x%X", type)); | 142 | ACPI_WARNING((AE_INFO, "Invalid Object Type 0x%X", type)); |
143 | return_UINT32(ACPI_NS_NORMAL); | 143 | return_VALUE(ACPI_NS_NORMAL); |
144 | } | 144 | } |
145 | 145 | ||
146 | return_UINT32((u32) acpi_gbl_ns_properties[type] & ACPI_NS_LOCAL); | 146 | return_VALUE(acpi_gbl_ns_properties[type] & ACPI_NS_LOCAL); |
147 | } | 147 | } |
148 | 148 | ||
149 | /******************************************************************************* | 149 | /******************************************************************************* |
diff --git a/drivers/acpi/acpica/psargs.c b/drivers/acpi/acpica/psargs.c index 9f3189395f3a..92565131cdda 100644 --- a/drivers/acpi/acpica/psargs.c +++ b/drivers/acpi/acpica/psargs.c | |||
@@ -108,7 +108,7 @@ acpi_ps_get_next_package_length(struct acpi_parse_state *parser_state) | |||
108 | /* Byte 0 is a special case, either bits [0:3] or [0:5] are used */ | 108 | /* Byte 0 is a special case, either bits [0:3] or [0:5] are used */ |
109 | 109 | ||
110 | package_length |= (aml[0] & byte_zero_mask); | 110 | package_length |= (aml[0] & byte_zero_mask); |
111 | return_UINT32(package_length); | 111 | return_VALUE(package_length); |
112 | } | 112 | } |
113 | 113 | ||
114 | /******************************************************************************* | 114 | /******************************************************************************* |
diff --git a/drivers/acpi/acpica/utaddress.c b/drivers/acpi/acpica/utaddress.c index 64880306133d..b86ef850097e 100644 --- a/drivers/acpi/acpica/utaddress.c +++ b/drivers/acpi/acpica/utaddress.c | |||
@@ -214,7 +214,7 @@ acpi_ut_check_address_range(acpi_adr_space_type space_id, | |||
214 | 214 | ||
215 | if ((space_id != ACPI_ADR_SPACE_SYSTEM_MEMORY) && | 215 | if ((space_id != ACPI_ADR_SPACE_SYSTEM_MEMORY) && |
216 | (space_id != ACPI_ADR_SPACE_SYSTEM_IO)) { | 216 | (space_id != ACPI_ADR_SPACE_SYSTEM_IO)) { |
217 | return_UINT32(0); | 217 | return_VALUE(0); |
218 | } | 218 | } |
219 | 219 | ||
220 | range_info = acpi_gbl_address_range_list[space_id]; | 220 | range_info = acpi_gbl_address_range_list[space_id]; |
@@ -256,7 +256,7 @@ acpi_ut_check_address_range(acpi_adr_space_type space_id, | |||
256 | range_info = range_info->next; | 256 | range_info = range_info->next; |
257 | } | 257 | } |
258 | 258 | ||
259 | return_UINT32(overlap_count); | 259 | return_VALUE(overlap_count); |
260 | } | 260 | } |
261 | 261 | ||
262 | /******************************************************************************* | 262 | /******************************************************************************* |