From patchwork Wed Feb 24 21:24:01 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jake Oshins X-Patchwork-Id: 8414531 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 B9BB2C0553 for ; Wed, 24 Feb 2016 21:26:44 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E69A220259 for ; Wed, 24 Feb 2016 21:26:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0B11F2037C for ; Wed, 24 Feb 2016 21:26:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752427AbcBXV0j (ORCPT ); Wed, 24 Feb 2016 16:26:39 -0500 Received: from o1.f.az.sendgrid.net ([208.117.55.132]:54723 "EHLO o1.f.az.sendgrid.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758620AbcBXV0J (ORCPT ); Wed, 24 Feb 2016 16:26:09 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sendgrid.me; h=from:to:cc:subject:in-reply-to:references; s=smtpapi; bh=2iS8UrZPtqRYpHzYL5h10fZ0yLw=; b=efZQI1OU27y7MonD+uZ0aTPpFN4RA LRJLHJq1vqkECqJafgW4AaiWs3OR3SjpKvkTFxFacff2WJLyjYB5IvaWpt4lYGDL haB05n77SIp2Iqy+v4iQXFL1+R9IYJbwebQoSHC9kgrk18jU7dCEybhcqsPpLNea +erNb5WTB+eG9I= Received: by filter0152p1las1.sendgrid.net with SMTP id filter0152p1las1.3975.56CE1FEA1C 2016-02-24 21:26:02.243614876 +0000 UTC Received: from jakeoshinsu2.jakeoshinsu2.d1.internal.cloudapp.net (unknown [104.210.40.47]) by ismtpd0012p1las1.sendgrid.net (SG) with ESMTP id -RX98lbTTy2tULAI8rMZ6g Wed, 24 Feb 2016 21:26:02.077 +0000 (UTC) From: jakeo@microsoft.com 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 4/5] hv: Reverse order of resources in hyperv_mmio Date: Wed, 24 Feb 2016 21:24:01 +0000 Message-Id: <1456349042-16275-5-git-send-email-jakeo@microsoft.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1456349042-16275-1-git-send-email-jakeo@microsoft.com> References: <1456349042-16275-1-git-send-email-jakeo@microsoft.com> X-SG-EID: lfnueJVzSjg1mfuVqqukVH7tZvRy9mfCIcBnfbfzaMP2ZIvy81Q55ASxcgoWyQGeg3bZIwL/b457+S /Wa9C7BOhiK3XdufNe388HxxJ3lP7dG8NqNbvRkyvgCxlh9GVAS91x0SmU7zXbigizcaqXO8WA8tMD T/Z/p1ySPhiB8IGn6Ana4SCX1qX+yH+/c/lm949OMqe4cebWNtX7pOGOaA== Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Spam-Status: No, score=-6.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY, URIBL_GREY 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 From: Jake Oshins 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 1da18e1..b090548 100644 --- a/drivers/hv/vmbus_drv.c +++ b/drivers/hv/vmbus_drv.c @@ -1090,7 +1090,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 { @@ -1111,7 +1110,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;