aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/acpica/nsrepair2.c
diff options
context:
space:
mode:
authorBob Moore <robert.moore@intel.com>2010-01-20 20:08:31 -0500
committerLen Brown <len.brown@intel.com>2010-01-22 12:30:02 -0500
commit2147d3f00f85c9e993786863d8138694672da01b (patch)
tree446fe7d97ded336fbc5c8d8cad9ad87b959a6588 /drivers/acpi/acpica/nsrepair2.c
parent92dcffb916d309aa01778bf8963a6932e4014d07 (diff)
ACPICA: Update for new gcc-4 warning options
Added several new options for the gcc-4 generation, and updated the source accordingly. This includes some code restructuring to eliminate unreachable code, elimination of some gotos, elimination of unused return values, and some additional casting. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/acpica/nsrepair2.c')
-rw-r--r--drivers/acpi/acpica/nsrepair2.c24
1 files changed, 9 insertions, 15 deletions
diff --git a/drivers/acpi/acpica/nsrepair2.c b/drivers/acpi/acpica/nsrepair2.c
index f13691c1cca5..6d6926466a08 100644
--- a/drivers/acpi/acpica/nsrepair2.c
+++ b/drivers/acpi/acpica/nsrepair2.c
@@ -93,7 +93,7 @@ acpi_ns_check_sorted_list(struct acpi_predefined_data *data,
93 u32 sort_index, 93 u32 sort_index,
94 u8 sort_direction, char *sort_key_name); 94 u8 sort_direction, char *sort_key_name);
95 95
96static acpi_status 96static void
97acpi_ns_sort_list(union acpi_operand_object **elements, 97acpi_ns_sort_list(union acpi_operand_object **elements,
98 u32 count, u32 index, u8 sort_direction); 98 u32 count, u32 index, u8 sort_direction);
99 99
@@ -443,7 +443,6 @@ acpi_ns_check_sorted_list(struct acpi_predefined_data *data,
443 union acpi_operand_object *obj_desc; 443 union acpi_operand_object *obj_desc;
444 u32 i; 444 u32 i;
445 u32 previous_value; 445 u32 previous_value;
446 acpi_status status;
447 446
448 ACPI_FUNCTION_NAME(ns_check_sorted_list); 447 ACPI_FUNCTION_NAME(ns_check_sorted_list);
449 448
@@ -494,19 +493,15 @@ acpi_ns_check_sorted_list(struct acpi_predefined_data *data,
494 493
495 /* 494 /*
496 * The list must be sorted in the specified order. If we detect a 495 * The list must be sorted in the specified order. If we detect a
497 * discrepancy, issue a warning and sort the entire list 496 * discrepancy, sort the entire list.
498 */ 497 */
499 if (((sort_direction == ACPI_SORT_ASCENDING) && 498 if (((sort_direction == ACPI_SORT_ASCENDING) &&
500 (obj_desc->integer.value < previous_value)) || 499 (obj_desc->integer.value < previous_value)) ||
501 ((sort_direction == ACPI_SORT_DESCENDING) && 500 ((sort_direction == ACPI_SORT_DESCENDING) &&
502 (obj_desc->integer.value > previous_value))) { 501 (obj_desc->integer.value > previous_value))) {
503 status = 502 acpi_ns_sort_list(return_object->package.elements,
504 acpi_ns_sort_list(return_object->package.elements, 503 outer_element_count, sort_index,
505 outer_element_count, sort_index, 504 sort_direction);
506 sort_direction);
507 if (ACPI_FAILURE(status)) {
508 return (status);
509 }
510 505
511 data->flags |= ACPI_OBJECT_REPAIRED; 506 data->flags |= ACPI_OBJECT_REPAIRED;
512 507
@@ -615,15 +610,16 @@ acpi_ns_remove_null_elements(struct acpi_predefined_data *data,
615 * Index - Sort by which package element 610 * Index - Sort by which package element
616 * sort_direction - Ascending or Descending sort 611 * sort_direction - Ascending or Descending sort
617 * 612 *
618 * RETURN: Status 613 * RETURN: None
619 * 614 *
620 * DESCRIPTION: Sort the objects that are in a package element list. 615 * DESCRIPTION: Sort the objects that are in a package element list.
621 * 616 *
622 * NOTE: Assumes that all NULL elements have been removed from the package. 617 * NOTE: Assumes that all NULL elements have been removed from the package,
618 * and that all elements have been verified to be of type Integer.
623 * 619 *
624 *****************************************************************************/ 620 *****************************************************************************/
625 621
626static acpi_status 622static void
627acpi_ns_sort_list(union acpi_operand_object **elements, 623acpi_ns_sort_list(union acpi_operand_object **elements,
628 u32 count, u32 index, u8 sort_direction) 624 u32 count, u32 index, u8 sort_direction)
629{ 625{
@@ -652,6 +648,4 @@ acpi_ns_sort_list(union acpi_operand_object **elements,
652 } 648 }
653 } 649 }
654 } 650 }
655
656 return (AE_OK);
657} 651}