lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <453e4f5e-fd04-5aa4-3e2f-f9296e11abab@intel.com>
Date:   Mon, 4 Jul 2022 21:16:49 +0200
From:   "Rafael J. Wysocki" <rafael.j.wysocki@...el.com>
To:     Tan Zhongjun <tanzhongjun@...lpad.com>, <robert.moore@...el.com>,
        <lenb@...nel.org>
CC:     <linux-acpi@...r.kernel.org>, <devel@...ica.org>,
        <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] ACPICA: Use swap() instead of open coding it

On 7/4/2022 4:06 PM, Tan Zhongjun wrote:
> Use swap() instead of open coding it
>
> Signed-off-by: Tan Zhongjun <tanzhongjun@...lpad.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]);
>   			}
>   		}
>   	}


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ