From patchwork Fri May 8 07:22:59 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yijing Wang X-Patchwork-Id: 6363171 Return-Path: X-Original-To: patchwork-linux-arm@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 71A9FBEEE1 for ; Fri, 8 May 2015 07:34:49 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 86BB22021F for ; Fri, 8 May 2015 07:34:48 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9A03C2020F for ; Fri, 8 May 2015 07:34:47 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Yqclm-0000a1-AB; Fri, 08 May 2015 07:32:26 +0000 Received: from szxga02-in.huawei.com ([119.145.14.65]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Yqckh-0008Tw-Qi for linux-arm-kernel@lists.infradead.org; Fri, 08 May 2015 07:31:24 +0000 Received: from 172.24.2.119 (EHLO szxeml430-hub.china.huawei.com) ([172.24.2.119]) by szxrg02-dlp.huawei.com (MOS 4.3.7-GA FastPath queued) with ESMTP id CLA54978; Fri, 08 May 2015 15:26:45 +0800 (CST) Received: from localhost.localdomain (10.175.100.166) by szxeml430-hub.china.huawei.com (10.82.67.185) with Microsoft SMTP Server id 14.3.158.1; Fri, 8 May 2015 15:26:36 +0800 From: Yijing Wang To: Bjorn Helgaas Subject: [PATCH Part3 v11 9/9] PCI: Remove pci_bus_assign_domain_nr() Date: Fri, 8 May 2015 15:22:59 +0800 Message-ID: <1431069779-29346-10-git-send-email-wangyijing@huawei.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1431069779-29346-1-git-send-email-wangyijing@huawei.com> References: <1431069779-29346-1-git-send-email-wangyijing@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.175.100.166] X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150508_003120_314180_01E4B80D X-CRM114-Status: GOOD ( 11.26 ) X-Spam-Score: -2.3 (--) Cc: Liviu Dudau , linux-ia64@vger.kernel.org, Arnd Bergmann , Benjamin Herrenschmidt , x86@kernel.org, linux-pci@vger.kernel.org, Yijing Wang , linuxppc-dev@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org, dja@axtens.net X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY 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 Now we save the domain number in pci_host_bridge, we could remove pci_bus_assign_domain_nr() and clean the domain member in pci_bus. Signed-off-by: Yijing Wang --- drivers/pci/pci.c | 5 ----- drivers/pci/pci.h | 9 --------- drivers/pci/probe.c | 11 +++-------- include/linux/pci.h | 3 --- 4 files changed, 3 insertions(+), 25 deletions(-) diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index 2e2f429..a3cb571 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c @@ -4558,11 +4558,6 @@ static int pci_assign_domain_nr(struct device *dev) return domain; } - -void pci_bus_assign_domain_nr(struct pci_bus *bus, struct device *parent) -{ - bus->domain_nr = pci_assign_domain_nr(parent); -} #endif #endif diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h index c2e1a6b..d8a4238 100644 --- a/drivers/pci/pci.h +++ b/drivers/pci/pci.h @@ -325,14 +325,5 @@ static inline int pci_dev_specific_reset(struct pci_dev *dev, int probe) struct pci_host_bridge *pci_find_host_bridge(struct pci_bus *bus); -#ifdef CONFIG_PCI_DOMAINS_GENERIC -void pci_bus_assign_domain_nr(struct pci_bus *bus, struct device *parent); -#else -static inline void pci_bus_assign_domain_nr(struct pci_bus *bus, - struct device *parent) -{ -} -#endif - void pci_host_assign_domain_nr(struct pci_host_bridge *host, int domain); #endif /* DRIVERS_PCI_H */ diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c index e4ef791..be60074 100644 --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c @@ -481,7 +481,7 @@ void pci_read_bridge_bases(struct pci_bus *child) } } -static struct pci_bus *pci_alloc_bus(struct pci_bus *parent) +static struct pci_bus *pci_alloc_bus(void) { struct pci_bus *b; @@ -496,10 +496,6 @@ static struct pci_bus *pci_alloc_bus(struct pci_bus *parent) INIT_LIST_HEAD(&b->resources); b->max_bus_speed = PCI_SPEED_UNKNOWN; b->cur_bus_speed = PCI_SPEED_UNKNOWN; -#ifdef CONFIG_PCI_DOMAINS_GENERIC - if (parent) - b->domain_nr = parent->domain_nr; -#endif return b; } @@ -670,7 +666,7 @@ static struct pci_bus *pci_alloc_child_bus(struct pci_bus *parent, /* * Allocate a new bus, and inherit stuff from the parent.. */ - child = pci_alloc_bus(parent); + child = pci_alloc_bus(); if (!child) return NULL; @@ -1936,7 +1932,7 @@ struct pci_bus *pci_create_root_bus(struct device *parent, int domain, goto unregister_host; } - b = pci_alloc_bus(NULL); + b = pci_alloc_bus(); if (!b) goto unregister_host; @@ -1944,7 +1940,6 @@ struct pci_bus *pci_create_root_bus(struct device *parent, int domain, b->sysdata = sysdata; b->ops = ops; b->number = b->busn_res.start = bus; - pci_bus_assign_domain_nr(b, parent); b->bridge = get_device(&bridge->dev); device_enable_async_suspend(b->bridge); diff --git a/include/linux/pci.h b/include/linux/pci.h index 13ed681..f010042 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -460,9 +460,6 @@ struct pci_bus { unsigned char primary; /* number of primary bridge */ unsigned char max_bus_speed; /* enum pci_bus_speed */ unsigned char cur_bus_speed; /* enum pci_bus_speed */ -#ifdef CONFIG_PCI_DOMAINS_GENERIC - int domain_nr; -#endif char name[48];