From patchwork Sat Apr 2 00:47:44 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jake Oshins X-Patchwork-Id: 8728561 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 BFBDCC0554 for ; Fri, 1 Apr 2016 23:11:47 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id ECF612039E for ; Fri, 1 Apr 2016 23:11:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0B176203A1 for ; Fri, 1 Apr 2016 23:11:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755483AbcDAXKc (ORCPT ); Fri, 1 Apr 2016 19:10:32 -0400 Received: from p3plsmtps2ded02.prod.phx3.secureserver.net ([208.109.80.59]:43490 "EHLO p3plsmtps2ded02.prod.phx3.secureserver.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755382AbcDAXKb (ORCPT ); Fri, 1 Apr 2016 19:10:31 -0400 Received: from linuxonhyperv.com ([72.167.245.219]) by : HOSTING RELAY : with SMTP id m8A6aWmFtzRgvm8A6a1wRx; Fri, 01 Apr 2016 16:07:30 -0700 x-originating-ip: 72.167.245.219 Received: by linuxonhyperv.com (Postfix, from userid 520) id DC954190305; Fri, 1 Apr 2016 17:48:02 -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 v4 4/7] drivers:hv: Reverse order of resources in hyperv_mmio Date: Fri, 1 Apr 2016 17:47:44 -0700 Message-Id: <1459558067-1725-5-git-send-email-jakeo@microsoft.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1459558067-1725-1-git-send-email-jakeo@microsoft.com> References: <1459558067-1725-1-git-send-email-jakeo@microsoft.com> X-CMAE-Envelope: MS4wfHNbOoRWTVqhfM3s+Ua6RdhdK2ECRh/Z8TsKvAIo4ziXIZFRxLqz6artsqfPCCzidqpzO3P09FIqu30GzH8ojM3wtnYUR4qiS1A/bkcL0g8Tm6QXDztl hTlwY3ShhlgttFeVIrcTj+29ZMXskmTiUKu27EyHMhrivxr2XRnnexfdwpO/aoBhvklSjiUbBaUZyBSpuyxnwlziQP4MP8taYnjqMa1sZbNxni9I6rXyPYwV /wYeiq+7qUsVYjuns3KVX4UWEDNFmuozXSwIaBdH/Jcmr6ZuejPDIu0bBGXKcDUYpNFeGiP7q+Ao5zmuBKTX1aOAJZRF5vXBilwntfDx7KXLuLUBXaghDoQr XOTdOxN5/RxKBQwFhbwt2IcFKUMoN7IWztWJ75EeBn9jbwH7RPzu3J+O0dDfbYN7jW8dpfnTDzaCfxVI8mWurXTL6CBtaTS3mW1XjirZds6M4S1GXJZOJX76 0kio2NoWOxR+VM7CY0G3kNemo0q+Nd2mY2qeqTkvJh/i7B6ZaSJo3aiWjGI= 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.1 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_WEB, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham 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;