RE: [PATCH 1/1 linux-next] ACPICA: use swap() in acpi_ns_sort_list()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I don't think this is portable across operating systems. Which is a requirement for ACPICA.



> -----Original Message-----
> From: Fabian Frederick [mailto:fabf@xxxxxxxxx]
> Sent: Wednesday, June 10, 2015 9:33 AM
> To: linux-kernel@xxxxxxxxxxxxxxx
> Cc: Julia Lawall; Fabian Frederick; Moore, Robert; Zheng, Lv; Wysocki,
> Rafael J; Len Brown; linux-acpi@xxxxxxxxxxxxxxx; devel@xxxxxxxxxx
> Subject: [PATCH 1/1 linux-next] ACPICA: use swap() in acpi_ns_sort_list()
> 
> Use kernel.h macro definition.
> 
> Thanks to Julia Lawall for Coccinelle scripting support.
> 
> Signed-off-by: Fabian Frederick <fabf@xxxxxxxxx>
> ---
>  drivers/acpi/acpica/nsrepair2.c | 8 ++------
>  1 file changed, 2 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/acpi/acpica/nsrepair2.c
> b/drivers/acpi/acpica/nsrepair2.c index c30672d..7513799 100644
> --- a/drivers/acpi/acpica/nsrepair2.c
> +++ b/drivers/acpi/acpica/nsrepair2.c
> @@ -904,7 +904,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;
> 
> @@ -920,11 +919,8 @@ acpi_ns_sort_list(union acpi_operand_object
> **elements,
>  			      obj_desc2->integer.value))
>  			    || ((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;
> -			}
> +				    obj_desc2->integer.value)))
> +				swap(elements[j - 1], elements[j]);
>  		}
>  	}
>  }
> --
> 2.4.2

--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux