lkml.org 
[lkml]   [2013]   [Sep]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 3/6] IB/qib: Use pci_is_root_bus() to check whether it is a root bus
    Date
    Use pci_is_root_bus() instead of "if (bus->parent)" statement
    for better readability.

    Signed-off-by: Yijing Wang <wangyijing@huawei.com>
    ---
    drivers/infiniband/hw/qib/qib_pcie.c | 2 +-
    1 files changed, 1 insertions(+), 1 deletions(-)

    diff --git a/drivers/infiniband/hw/qib/qib_pcie.c b/drivers/infiniband/hw/qib/qib_pcie.c
    index c574ec7..3a5b99b 100644
    --- a/drivers/infiniband/hw/qib/qib_pcie.c
    +++ b/drivers/infiniband/hw/qib/qib_pcie.c
    @@ -590,7 +590,7 @@ static int qib_tune_pcie_caps(struct qib_devdata *dd)

    /* Find out supported and configured values for parent (root) */
    parent = dd->pcidev->bus->self;
    - if (parent->bus->parent) {
    + if (!pci_is_root_bus(parent->bus)) {
    qib_devinfo(dd->pcidev, "Parent not root\n");
    goto bail;
    }
    --
    1.7.1



    \
     
     \ /
      Last update: 2013-09-09 15:41    [W:2.469 / U:0.004 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site