From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bjorn Helgaas Subject: Re: [PATCH v6 28/30] PCI: Export find_pci_host_bridge() and rename to pci_find_host_bridge() Date: Wed, 11 Mar 2015 22:43:05 -0500 Message-ID: <20150312034305.GJ10949@google.com> References: <1425868467-9667-1-git-send-email-wangyijing@huawei.com> <1425868467-9667-29-git-send-email-wangyijing@huawei.com> Mime-Version: 1.0 Return-path: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=1Z4F0NIR6AZbxo6OTQLGhSkMQRAjgaoQ9aYRtnJM9p4=; b=kYDIfVnSXAXQEBcBo+Ge7pzvm/rK2VMKiEslGKDEAQKFVMwxJymg4yfzTO7CAk6gfs Q9Gq9Np6f+EDh3A+L6Om4NXQK6ZQihNSn7J5gA5CTw9/5/ISOrLOETqHlcCjHKRuHAWP biLRasIrXUCD2b8c97if8ehreH91mziRi6UlSyJgoXIir2dY/E39+R/mPQ23rWBtLLqv gTswkyQMnNqzmQC6PNQUtHC/QGwZNk4mHpvLKngS12hbkO1cWdZDilUoTz00QLSgDg/V gXyPwdiBe93m1xoO6R842pxhSHz1CWt9iCiS0v1wqRecYYjKLlNg6RJqxOWZj8+k/zoh SyQw== Content-Disposition: inline In-Reply-To: <1425868467-9667-29-git-send-email-wangyijing@huawei.com> Sender: linux-pci-owner@vger.kernel.org List-ID: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Yijing Wang Cc: Jiang Liu , linux-pci@vger.kernel.org, Yinghai Lu , linux-kernel@vger.kernel.org, Marc Zyngier , linux-arm-kernel@lists.infradead.org, Russell King , x86@kernel.org, Thomas Gleixner , Benjamin Herrenschmidt , Rusty Russell , Tony Luck , linux-ia64@vger.kernel.org, "David S. Miller" , Guan Xuetao , linux-alpha@vger.kernel.org, linux-m68k@lists.linux-m68k.org, Liviu Dudau , Arnd Bergmann , Geert Uytterhoeven On Mon, Mar 09, 2015 at 10:34:25AM +0800, Yijing Wang wrote: > Signed-off-by: Yijing Wang > Signed-off-by: Bjorn Helgaas > --- > drivers/pci/host-bridge.c | 6 +++--- > drivers/pci/pci.h | 2 ++ > 2 files changed, 5 insertions(+), 3 deletions(-) > > diff --git a/drivers/pci/host-bridge.c b/drivers/pci/host-bridge.c > index bc1de59..51f0a82 100644 > --- a/drivers/pci/host-bridge.c > +++ b/drivers/pci/host-bridge.c > @@ -103,7 +103,7 @@ static struct pci_bus *find_pci_root_bus(struct pci_bus *bus) > return bus; > } > > -static struct pci_host_bridge *find_pci_host_bridge(struct pci_bus *bus) > +struct pci_host_bridge *pci_find_host_bridge(struct pci_bus *bus) > { > struct pci_bus *root_bus = find_pci_root_bus(bus); > > @@ -121,7 +121,7 @@ void pci_set_host_bridge_release(struct pci_host_bridge *bridge, > void pcibios_resource_to_bus(struct pci_bus *bus, struct pci_bus_region *region, > struct resource *res) > { > - struct pci_host_bridge *bridge = find_pci_host_bridge(bus); > + struct pci_host_bridge *bridge = pci_find_host_bridge(bus); > struct resource_entry *window; > resource_size_t offset = 0; > > @@ -146,7 +146,7 @@ static bool region_contains(struct pci_bus_region *region1, > void pcibios_bus_to_resource(struct pci_bus *bus, struct resource *res, > struct pci_bus_region *region) > { > - struct pci_host_bridge *bridge = find_pci_host_bridge(bus); > + struct pci_host_bridge *bridge = pci_find_host_bridge(bus); > struct resource_entry *window; > resource_size_t offset = 0; > > diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h > index a1dc9f2..45252dd 100644 > --- a/drivers/pci/pci.h > +++ b/drivers/pci/pci.h > @@ -328,4 +328,6 @@ struct pci_host_bridge *pci_create_host_bridge( > void *sysdata, struct pci_host_bridge_ops *ops); > > void pci_free_host_bridge(struct pci_host_bridge *host); > +struct pci_host_bridge *pci_find_host_bridge(struct pci_bus *bus); This is only used in drivers/pci/host-bridge.c and in drivers/pci/pci.c for pci_domain_nr(). Can you drop this patch and put the generic pci_domain_nr() implementation (next patch) in host-bridge.c instead of in pci.c? > + > #endif /* DRIVERS_PCI_H */ > -- > 1.7.1 > From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bjorn Helgaas Date: Thu, 12 Mar 2015 03:43:05 +0000 Subject: Re: [PATCH v6 28/30] PCI: Export find_pci_host_bridge() and rename to pci_find_host_bridge() Message-Id: <20150312034305.GJ10949@google.com> List-Id: References: <1425868467-9667-1-git-send-email-wangyijing@huawei.com> <1425868467-9667-29-git-send-email-wangyijing@huawei.com> In-Reply-To: <1425868467-9667-29-git-send-email-wangyijing@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Yijing Wang Cc: Jiang Liu , linux-pci@vger.kernel.org, Yinghai Lu , linux-kernel@vger.kernel.org, Marc Zyngier , linux-arm-kernel@lists.infradead.org, Russell King , x86@kernel.org, Thomas Gleixner , Benjamin Herrenschmidt , Rusty Russell , Tony Luck , linux-ia64@vger.kernel.org, "David S. Miller" , Guan Xuetao , linux-alpha@vger.kernel.org, linux-m68k@vger.kernel.org, Liviu Dudau , Arnd Bergmann , Geert Uytterhoeven On Mon, Mar 09, 2015 at 10:34:25AM +0800, Yijing Wang wrote: > Signed-off-by: Yijing Wang > Signed-off-by: Bjorn Helgaas > --- > drivers/pci/host-bridge.c | 6 +++--- > drivers/pci/pci.h | 2 ++ > 2 files changed, 5 insertions(+), 3 deletions(-) > > diff --git a/drivers/pci/host-bridge.c b/drivers/pci/host-bridge.c > index bc1de59..51f0a82 100644 > --- a/drivers/pci/host-bridge.c > +++ b/drivers/pci/host-bridge.c > @@ -103,7 +103,7 @@ static struct pci_bus *find_pci_root_bus(struct pci_bus *bus) > return bus; > } > > -static struct pci_host_bridge *find_pci_host_bridge(struct pci_bus *bus) > +struct pci_host_bridge *pci_find_host_bridge(struct pci_bus *bus) > { > struct pci_bus *root_bus = find_pci_root_bus(bus); > > @@ -121,7 +121,7 @@ void pci_set_host_bridge_release(struct pci_host_bridge *bridge, > void pcibios_resource_to_bus(struct pci_bus *bus, struct pci_bus_region *region, > struct resource *res) > { > - struct pci_host_bridge *bridge = find_pci_host_bridge(bus); > + struct pci_host_bridge *bridge = pci_find_host_bridge(bus); > struct resource_entry *window; > resource_size_t offset = 0; > > @@ -146,7 +146,7 @@ static bool region_contains(struct pci_bus_region *region1, > void pcibios_bus_to_resource(struct pci_bus *bus, struct resource *res, > struct pci_bus_region *region) > { > - struct pci_host_bridge *bridge = find_pci_host_bridge(bus); > + struct pci_host_bridge *bridge = pci_find_host_bridge(bus); > struct resource_entry *window; > resource_size_t offset = 0; > > diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h > index a1dc9f2..45252dd 100644 > --- a/drivers/pci/pci.h > +++ b/drivers/pci/pci.h > @@ -328,4 +328,6 @@ struct pci_host_bridge *pci_create_host_bridge( > void *sysdata, struct pci_host_bridge_ops *ops); > > void pci_free_host_bridge(struct pci_host_bridge *host); > +struct pci_host_bridge *pci_find_host_bridge(struct pci_bus *bus); This is only used in drivers/pci/host-bridge.c and in drivers/pci/pci.c for pci_domain_nr(). Can you drop this patch and put the generic pci_domain_nr() implementation (next patch) in host-bridge.c instead of in pci.c? > + > #endif /* DRIVERS_PCI_H */ > -- > 1.7.1 > From mboxrd@z Thu Jan 1 00:00:00 1970 From: bhelgaas@google.com (Bjorn Helgaas) Date: Wed, 11 Mar 2015 22:43:05 -0500 Subject: [PATCH v6 28/30] PCI: Export find_pci_host_bridge() and rename to pci_find_host_bridge() In-Reply-To: <1425868467-9667-29-git-send-email-wangyijing@huawei.com> References: <1425868467-9667-1-git-send-email-wangyijing@huawei.com> <1425868467-9667-29-git-send-email-wangyijing@huawei.com> Message-ID: <20150312034305.GJ10949@google.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Mon, Mar 09, 2015 at 10:34:25AM +0800, Yijing Wang wrote: > Signed-off-by: Yijing Wang > Signed-off-by: Bjorn Helgaas > --- > drivers/pci/host-bridge.c | 6 +++--- > drivers/pci/pci.h | 2 ++ > 2 files changed, 5 insertions(+), 3 deletions(-) > > diff --git a/drivers/pci/host-bridge.c b/drivers/pci/host-bridge.c > index bc1de59..51f0a82 100644 > --- a/drivers/pci/host-bridge.c > +++ b/drivers/pci/host-bridge.c > @@ -103,7 +103,7 @@ static struct pci_bus *find_pci_root_bus(struct pci_bus *bus) > return bus; > } > > -static struct pci_host_bridge *find_pci_host_bridge(struct pci_bus *bus) > +struct pci_host_bridge *pci_find_host_bridge(struct pci_bus *bus) > { > struct pci_bus *root_bus = find_pci_root_bus(bus); > > @@ -121,7 +121,7 @@ void pci_set_host_bridge_release(struct pci_host_bridge *bridge, > void pcibios_resource_to_bus(struct pci_bus *bus, struct pci_bus_region *region, > struct resource *res) > { > - struct pci_host_bridge *bridge = find_pci_host_bridge(bus); > + struct pci_host_bridge *bridge = pci_find_host_bridge(bus); > struct resource_entry *window; > resource_size_t offset = 0; > > @@ -146,7 +146,7 @@ static bool region_contains(struct pci_bus_region *region1, > void pcibios_bus_to_resource(struct pci_bus *bus, struct resource *res, > struct pci_bus_region *region) > { > - struct pci_host_bridge *bridge = find_pci_host_bridge(bus); > + struct pci_host_bridge *bridge = pci_find_host_bridge(bus); > struct resource_entry *window; > resource_size_t offset = 0; > > diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h > index a1dc9f2..45252dd 100644 > --- a/drivers/pci/pci.h > +++ b/drivers/pci/pci.h > @@ -328,4 +328,6 @@ struct pci_host_bridge *pci_create_host_bridge( > void *sysdata, struct pci_host_bridge_ops *ops); > > void pci_free_host_bridge(struct pci_host_bridge *host); > +struct pci_host_bridge *pci_find_host_bridge(struct pci_bus *bus); This is only used in drivers/pci/host-bridge.c and in drivers/pci/pci.c for pci_domain_nr(). Can you drop this patch and put the generic pci_domain_nr() implementation (next patch) in host-bridge.c instead of in pci.c? > + > #endif /* DRIVERS_PCI_H */ > -- > 1.7.1 > From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752865AbbCLDnP (ORCPT ); Wed, 11 Mar 2015 23:43:15 -0400 Received: from mail-ie0-f175.google.com ([209.85.223.175]:35796 "EHLO mail-ie0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752788AbbCLDnK (ORCPT ); Wed, 11 Mar 2015 23:43:10 -0400 Date: Wed, 11 Mar 2015 22:43:05 -0500 From: Bjorn Helgaas To: Yijing Wang Cc: Jiang Liu , linux-pci@vger.kernel.org, Yinghai Lu , linux-kernel@vger.kernel.org, Marc Zyngier , linux-arm-kernel@lists.infradead.org, Russell King , x86@kernel.org, Thomas Gleixner , Benjamin Herrenschmidt , Rusty Russell , Tony Luck , linux-ia64@vger.kernel.org, "David S. Miller" , Guan Xuetao , linux-alpha@vger.kernel.org, linux-m68k@vger.kernel.org, Liviu Dudau , Arnd Bergmann , Geert Uytterhoeven Subject: Re: [PATCH v6 28/30] PCI: Export find_pci_host_bridge() and rename to pci_find_host_bridge() Message-ID: <20150312034305.GJ10949@google.com> References: <1425868467-9667-1-git-send-email-wangyijing@huawei.com> <1425868467-9667-29-git-send-email-wangyijing@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1425868467-9667-29-git-send-email-wangyijing@huawei.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Mar 09, 2015 at 10:34:25AM +0800, Yijing Wang wrote: > Signed-off-by: Yijing Wang > Signed-off-by: Bjorn Helgaas > --- > drivers/pci/host-bridge.c | 6 +++--- > drivers/pci/pci.h | 2 ++ > 2 files changed, 5 insertions(+), 3 deletions(-) > > diff --git a/drivers/pci/host-bridge.c b/drivers/pci/host-bridge.c > index bc1de59..51f0a82 100644 > --- a/drivers/pci/host-bridge.c > +++ b/drivers/pci/host-bridge.c > @@ -103,7 +103,7 @@ static struct pci_bus *find_pci_root_bus(struct pci_bus *bus) > return bus; > } > > -static struct pci_host_bridge *find_pci_host_bridge(struct pci_bus *bus) > +struct pci_host_bridge *pci_find_host_bridge(struct pci_bus *bus) > { > struct pci_bus *root_bus = find_pci_root_bus(bus); > > @@ -121,7 +121,7 @@ void pci_set_host_bridge_release(struct pci_host_bridge *bridge, > void pcibios_resource_to_bus(struct pci_bus *bus, struct pci_bus_region *region, > struct resource *res) > { > - struct pci_host_bridge *bridge = find_pci_host_bridge(bus); > + struct pci_host_bridge *bridge = pci_find_host_bridge(bus); > struct resource_entry *window; > resource_size_t offset = 0; > > @@ -146,7 +146,7 @@ static bool region_contains(struct pci_bus_region *region1, > void pcibios_bus_to_resource(struct pci_bus *bus, struct resource *res, > struct pci_bus_region *region) > { > - struct pci_host_bridge *bridge = find_pci_host_bridge(bus); > + struct pci_host_bridge *bridge = pci_find_host_bridge(bus); > struct resource_entry *window; > resource_size_t offset = 0; > > diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h > index a1dc9f2..45252dd 100644 > --- a/drivers/pci/pci.h > +++ b/drivers/pci/pci.h > @@ -328,4 +328,6 @@ struct pci_host_bridge *pci_create_host_bridge( > void *sysdata, struct pci_host_bridge_ops *ops); > > void pci_free_host_bridge(struct pci_host_bridge *host); > +struct pci_host_bridge *pci_find_host_bridge(struct pci_bus *bus); This is only used in drivers/pci/host-bridge.c and in drivers/pci/pci.c for pci_domain_nr(). Can you drop this patch and put the generic pci_domain_nr() implementation (next patch) in host-bridge.c instead of in pci.c? > + > #endif /* DRIVERS_PCI_H */ > -- > 1.7.1 >