From: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
To: Tan Zhongjun <tanzhongjun@coolpad.com>, <robert.moore@intel.com>,
<lenb@kernel.org>
Cc: <linux-acpi@vger.kernel.org>, <devel@acpica.org>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] ACPICA: Use swap() instead of open coding it
Date: Mon, 4 Jul 2022 21:16:49 +0200 [thread overview]
Message-ID: <453e4f5e-fd04-5aa4-3e2f-f9296e11abab@intel.com> (raw)
In-Reply-To: <20220704140614.39763-1-tanzhongjun@coolpad.com>
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]);
> }
> }
> }
next parent reply other threads:[~2022-07-04 19:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20220704140614.39763-1-tanzhongjun@coolpad.com>
2022-07-04 19:16 ` Rafael J. Wysocki [this message]
2024-02-02 8:14 Jiapeng Chong
2024-02-02 16:04 ` Rafael J. Wysocki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=453e4f5e-fd04-5aa4-3e2f-f9296e11abab@intel.com \
--to=rafael.j.wysocki@intel.com \
--cc=devel@acpica.org \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robert.moore@intel.com \
--cc=tanzhongjun@coolpad.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®