ACPICA: Use swap() instead of open coding it
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 3 lines · Tan Zhongjun
Use
swap()instead of open coding itSigned-off-by Tan Zhongjun <[email protected]>
Changes in the ACPICA files need to be routed through the upstream ACPICA project at github.
Please submit a pull request in there.
Quoted 27 lines
--- drivers/acpi/acpica/nsrepair2.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)drivers/acpi/acpica/nsrepair2.c +1
-4@@ -875,7 +875,6 @@ acpi_ns_sort_list(union acpi_operand_object **elements, {union acpi_operand_object *obj_desc1;union acpi_operand_object *obj_desc2; -union acpi_operand_object *temp_obj;u32 i;u32 j;@@ -892,9 +891,7 @@ acpi_ns_sort_list(union acpi_operand_object **elements, || ((sort_direction == ACPI_SORT_DESCENDING) && (obj_desc1->integer.value < obj_desc2->integer.value))) { - temp_obj = elements[j -1 ]; - elements[j -1 ] = elements[j]; - elements[j] = temp_obj; +swap (elements[j -1 ], elements[j]); } } }