mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Guo Zhengkui <guozhengkui@vivo.com>
To: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: Robert Moore <robert.moore@intel.com>,
	"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>,
	Len Brown <lenb@kernel.org>,
	ACPI Devel Maling List <linux-acpi@vger.kernel.org>,
	"open list:ACPI COMPONENT ARCHITECTURE (ACPICA)"
	<devel@acpica.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	kernel <kernel@vivo.com>
Subject: Re: [PATCH] ACPICA: fix swap.cocci warning
Date: Fri, 19 Nov 2021 14:30:52 +0800	[thread overview]
Message-ID: <db9c50a4-dab7-4aba-1ebb-e38fda08cfe1@vivo.com> (raw)
In-Reply-To: <AIwACwDlE6oYbcAnsFaroKpJ.9.1637246783998.Hmail.guozhengkui@vivo.com.@PENBSlo1djBpeHR2ek5pQXd3THRYWGdHLThGZHZ0V1l5N1JVaDBwRno2NXNqY215dU5kUUBtYWlsLmdtYWlsLmNvbT4=>

On 2021/11/18 22:46, Rafael J. Wysocki wrote:
> On Tue, Nov 9, 2021 at 2:47 PM Guo Zhengkui <guozhengkui@vivo.com> wrote:
>>
>> Fix following swap.cocci warning:
>> ./drivers/acpi/acpica/nsrepair2.c:896:33-34: WARNING
>> opportunity for swap()
>>
>> Signed-off-by: Guo Zhengkui <guozhengkui@vivo.com>
> 
> This change needs to be submitted to the upstream ACPICA project via
> https://github.com/acpica/acpica/
> 
> Thanks!

So it means I need to submit this patch to upstream ACPICA project, not 
linux-next?

> 
>> ---
>>   drivers/acpi/acpica/nsrepair2.c | 6 ++----
>>   1 file changed, 2 insertions(+), 4 deletions(-)
>>
>> diff --git a/drivers/acpi/acpica/nsrepair2.c b/drivers/acpi/acpica/nsrepair2.c
>> index 14b71b41e845..02a904ca4caf 100644
>> --- a/drivers/acpi/acpica/nsrepair2.c
>> +++ b/drivers/acpi/acpica/nsrepair2.c
>> @@ -8,6 +8,7 @@
>>    *
>>    *****************************************************************************/
>>
>> +#include <linux/minmax.h>
>>   #include <acpi/acpi.h>
>>   #include "accommon.h"
>>   #include "acnamesp.h"
>> @@ -875,7 +876,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 +892,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]);
>>                          }
>>                  }
>>          }
>> --
>> 2.20.1
>>

  parent reply	other threads:[~2021-11-19  6:31 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-09 13:47 Guo Zhengkui
2021-11-18 14:46 ` Rafael J. Wysocki
     [not found] ` <AIwACwDlE6oYbcAnsFaroKpJ.9.1637246783998.Hmail.guozhengkui@vivo.com.@PENBSlo1djBpeHR2ek5pQXd3THRYWGdHLThGZHZ0V1l5N1JVaDBwRno2NXNqY215dU5kUUBtYWlsLmdtYWlsLmNvbT4=>
2021-11-19  6:30   ` Guo Zhengkui [this message]
2021-11-27 11:36     ` Moore, Robert

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=db9c50a4-dab7-4aba-1ebb-e38fda08cfe1@vivo.com \
    --to=guozhengkui@vivo.com \
    --cc=devel@acpica.org \
    --cc=kernel@vivo.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rafael.j.wysocki@intel.com \
    --cc=rafael@kernel.org \
    --cc=robert.moore@intel.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®