Patchwork pci: fix pci_find_bus()

login
register
mail settings
Submitter Isaku Yamahata
Date Feb. 8, 2010, 6:38 a.m.
Message ID <20100208063836.GB22624@valinux.co.jp>
Download mbox | patch
Permalink /patch/44761/
State New
Headers show

Comments

Isaku Yamahata - Feb. 8, 2010, 6:38 a.m.
typo in c021f8e65f5009a5ab5711d9d5326fcab553ef1c.
comparison fix.

Cc: Blue Swirl <blauwirbel@gmail.com>
Cc: "Michael S. Tsirkin" <mst@redhat.com>
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
---
 hw/pci.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Michael S. Tsirkin - Feb. 8, 2010, 10:30 a.m.
On Mon, Feb 08, 2010 at 03:38:36PM +0900, Isaku Yamahata wrote:
> typo in c021f8e65f5009a5ab5711d9d5326fcab553ef1c.
> comparison fix.
> 
> Cc: Blue Swirl <blauwirbel@gmail.com>
> Cc: "Michael S. Tsirkin" <mst@redhat.com>
> Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>

thanks, applied.

> ---
>  hw/pci.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/hw/pci.c b/hw/pci.c
> index 9ad63dd..e91d2e6 100644
> --- a/hw/pci.c
> +++ b/hw/pci.c
> @@ -1558,7 +1558,7 @@ PCIBus *pci_find_bus(PCIBus *bus, int bus_num)
>      /* try child bus */
>      QLIST_FOREACH(sec, &bus->child, sibling) {
>          if (!bus->parent_dev /* pci host bridge */
> -            || (pci_bus_num(sec) >= bus_num &&
> +            || (pci_bus_num(sec) <= bus_num &&
>                  bus_num <= bus->parent_dev->config[PCI_SUBORDINATE_BUS]) ) {
>              ret = pci_find_bus(sec, bus_num);
>              if (ret) {
> -- 
> 1.6.6.1

Patch

diff --git a/hw/pci.c b/hw/pci.c
index 9ad63dd..e91d2e6 100644
--- a/hw/pci.c
+++ b/hw/pci.c
@@ -1558,7 +1558,7 @@  PCIBus *pci_find_bus(PCIBus *bus, int bus_num)
     /* try child bus */
     QLIST_FOREACH(sec, &bus->child, sibling) {
         if (!bus->parent_dev /* pci host bridge */
-            || (pci_bus_num(sec) >= bus_num &&
+            || (pci_bus_num(sec) <= bus_num &&
                 bus_num <= bus->parent_dev->config[PCI_SUBORDINATE_BUS]) ) {
             ret = pci_find_bus(sec, bus_num);
             if (ret) {