From: Yijing Wang Date: Mon, 9 Sep 2013 13:13:05 +0000 (+0800) Subject: IB/qib: Use pci_is_root_bus() to check whether it is a root bus X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=dcaa73dc3411c4d771d1d6a950c6b8a9c71da089;p=deliverable%2Flinux.git IB/qib: Use pci_is_root_bus() to check whether it is a root bus Use pci_is_root_bus() instead of "if (bus->parent)" statement for better readability. Signed-off-by: Yijing Wang Signed-off-by: Bjorn Helgaas Acked-by: Mike Marciniszyn --- diff --git a/drivers/infiniband/hw/qib/qib_pcie.c b/drivers/infiniband/hw/qib/qib_pcie.c index 3f14009fb662..45e55ff33dbf 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; }