drivers:hv: Reverse order of resources in hyperv_mmio
authorJake Oshins <jakeo@microsoft.com>
Tue, 5 Apr 2016 17:22:53 +0000 (10:22 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 30 Apr 2016 21:01:37 +0000 (14:01 -0700)
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 <jakeo@microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/hv/vmbus_drv.c

index 60553c156f904da0c5093b037594d930bb5580ff..1ce47d03e800a14788c350e7e607d77e812e6012 100644 (file)
@@ -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;
This page took 0.035069 seconds and 5 git commands to generate.