Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965489AbbFJQsl (ORCPT ); Wed, 10 Jun 2015 12:48:41 -0400 Received: from mga01.intel.com ([192.55.52.88]:38705 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965430AbbFJQsa convert rfc822-to-8bit (ORCPT ); Wed, 10 Jun 2015 12:48:30 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.13,588,1427785200"; d="scan'208";a="585486957" From: "Moore, Robert" To: Fabian Frederick , "linux-kernel@vger.kernel.org" CC: Julia Lawall , "Zheng, Lv" , "Wysocki, Rafael J" , Len Brown , "linux-acpi@vger.kernel.org" , "devel@acpica.org" Subject: RE: [PATCH 1/1 linux-next] ACPICA: use swap() in acpi_ns_sort_list() Thread-Topic: [PATCH 1/1 linux-next] ACPICA: use swap() in acpi_ns_sort_list() Thread-Index: AQHQo5sfiaJ/jnBWmkm8vl5auhcANJ2l8uVQ Date: Wed, 10 Jun 2015 16:48:26 +0000 Message-ID: <94F2FBAB4432B54E8AACC7DFDE6C92E37D2F327A@ORSMSX112.amr.corp.intel.com> References: <1433953975-24445-1-git-send-email-fabf@skynet.be> In-Reply-To: <1433953975-24445-1-git-send-email-fabf@skynet.be> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.22.254.138] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1877 Lines: 56 I don't think this is portable across operating systems. Which is a requirement for ACPICA. > -----Original Message----- > From: Fabian Frederick [mailto:fabf@skynet.be] > Sent: Wednesday, June 10, 2015 9:33 AM > To: linux-kernel@vger.kernel.org > Cc: Julia Lawall; Fabian Frederick; Moore, Robert; Zheng, Lv; Wysocki, > Rafael J; Len Brown; linux-acpi@vger.kernel.org; devel@acpica.org > 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 > --- > 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-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/