lkml.org 
[lkml]   [2022]   [Jul]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] ACPICA: Use swap() instead of open coding it
From
On 7/4/2022 4:06 PM, Tan Zhongjun wrote:
> Use swap() instead of open coding it
>
> Signed-off-by: Tan Zhongjun <tanzhongjun@coolpad.com>

Changes in the ACPICA files need to be routed through the upstream
ACPICA project at github.

Please submit a pull request in there.


> ---
> drivers/acpi/acpica/nsrepair2.c | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/drivers/acpi/acpica/nsrepair2.c b/drivers/acpi/acpica/nsrepair2.c
> index dd533c887e3a..3735ba06ea16 100644
> --- a/drivers/acpi/acpica/nsrepair2.c
> +++ b/drivers/acpi/acpica/nsrepair2.c
> @@ -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]);
> }
> }
> }


\
 
 \ /
  Last update: 2022-07-04 21:18    [W:0.139 / U:0.056 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site