From patchwork Fri Apr 1 23:11:29 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jake Oshins X-Patchwork-Id: 8728041 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Original-To: patchwork-linux-pci@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 498FDC0553 for ; Fri, 1 Apr 2016 21:36:03 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5E6D420396 for ; Fri, 1 Apr 2016 21:36:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8EC732038F for ; Fri, 1 Apr 2016 21:36:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753660AbcDAVeW (ORCPT ); Fri, 1 Apr 2016 17:34:22 -0400 Received: from p3plsmtps2ded03.prod.phx3.secureserver.net ([208.109.80.60]:43456 "EHLO p3plsmtps2ded03.prod.phx3.secureserver.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754957AbcDAVeU (ORCPT ); Fri, 1 Apr 2016 17:34:20 -0400 Received: from linuxonhyperv.com ([72.167.245.219]) by : HOSTING RELAY : with SMTP id m6f1aXWedetyNm6f1anIyw; Fri, 01 Apr 2016 14:31:19 -0700 x-originating-ip: 72.167.245.219 Received: by linuxonhyperv.com (Postfix, from userid 520) id 460BC190331; Fri, 1 Apr 2016 16:11:51 -0700 (PDT) From: Jake Oshins To: linux-pci@vger.kernel.org, gregkh@linuxfoundation.org, kys@microsoft.com, linux-kernel@vger.kernel.org, devel@linuxdriverproject.org, olaf@aepfle.de, apw@canonical.com, vkuznets@redhat.com, haiyangz@microsoft.com, haddenh@microsoft.com Cc: Jake Oshins Subject: [PATCH v3 4/7] drivers:hv: Reverse order of resources in hyperv_mmio Date: Fri, 1 Apr 2016 16:11:29 -0700 Message-Id: <1459552292-1297-5-git-send-email-jakeo@microsoft.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1459552292-1297-1-git-send-email-jakeo@microsoft.com> References: <1459552292-1297-1-git-send-email-jakeo@microsoft.com> X-CMAE-Envelope: MS4wfJs4p/Q3LNZXjzK+dZdNs1I1PA/DFkXTF+yQ+Xo6lUzJPcO5ppMLOD8aRu1FjJtTX/KMC7sB/s/kIsoBfXFlj4BTFTCtIkR2LC/etBG+xM4ZSyfHTriU HCnQrhHIpBOImaB7XwDdlcZgPeVec3IZGdBa3F+J29F8OqP812Xd6Jg19mHP227ciFeCaJfEYtftA8HMOKwGvQDy2MWYfbrMexNjSx6399vv7IXMRhrPvJ5r GC9znHilaOPo7pbBfVXh0UlzPDLlUg8GTjnUTGwnClMr5niorpCZE4Z6l4ZWebfKzSLTpyEd57laEexM67vDxUOcebfOLOMk4DsiEDIix/0BjiZ+LQxeJqsr ZDTUAn13cwKWwd3N3saVQXBn5rSTuf0gYDLJ/u7tZxRCoMvyunB0mmOug2g8xg1Klt6txOMTmOg+Q7goqMLfEzzZYlyixZ6anPiY5tddgA/PfVBCHA0imaSy 6jF35kGyPqL1isijPauK89OyeA4BoJVsqvn87hTRY+2Q5B+7by/W/tXhWcc= Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Spam-Status: No, score=-7.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP A patch later in this series allocates child nodes in this resource tree. For that to work, this tree needs to be sorted in ascending order. Signed-off-by: Jake Oshins --- drivers/hv/vmbus_drv.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c index 60553c1..1ce47d0 100644 --- a/drivers/hv/vmbus_drv.c +++ b/drivers/hv/vmbus_drv.c @@ -1049,7 +1049,6 @@ static acpi_status vmbus_walk_resources(struct acpi_resource *res, void *ctx) new_res->end = end; /* - * Stick ranges from higher in address space at the front of the list. * If two ranges are adjacent, merge them. */ do { @@ -1070,7 +1069,7 @@ static acpi_status vmbus_walk_resources(struct acpi_resource *res, void *ctx) break; } - if ((*old_res)->end < new_res->start) { + if ((*old_res)->start > new_res->end) { new_res->sibling = *old_res; if (prev_res) (*prev_res)->sibling = new_res;