Re: [PATCH v7 5/6] pci: Export find_pci_host_bridge() function.

2014-04-07 Thread One Thousand Gnomes
> > If we *do* export it, I'd like it to have a more conventional name, e.g.,
> > something starting with "pci_".
> 
> Understood. pci_find_host_bridge() ?

pci_get_host_bridge() and take a reference IMHO ? If your primary bus is
not PCI then your PCI "host" bridge could be hot swappable so the API at
least ought to get that right.

Alan
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH v7 5/6] pci: Export find_pci_host_bridge() function.

2014-04-07 Thread Liviu Dudau
On Sat, Apr 05, 2014 at 12:39:48AM +0100, Bjorn Helgaas wrote:
> On Fri, Mar 14, 2014 at 03:34:31PM +, Liviu Dudau wrote:
> > This is a useful function and we should make it visible outside the
> > generic PCI code. Export it as a GPL symbol.
> > 
> > Signed-off-by: Liviu Dudau 
> > Tested-by: Tanmay Inamdar 
> > ---
> >  drivers/pci/host-bridge.c | 3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> > 
> > diff --git a/drivers/pci/host-bridge.c b/drivers/pci/host-bridge.c
> > index 06ace62..8708b652 100644
> > --- a/drivers/pci/host-bridge.c
> > +++ b/drivers/pci/host-bridge.c
> > @@ -17,12 +17,13 @@ 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 *find_pci_host_bridge(struct pci_bus *bus)
> >  {
> > struct pci_bus *root_bus = find_pci_root_bus(bus);
> >  
> > return to_pci_host_bridge(root_bus->bridge);
> >  }
> > +EXPORT_SYMBOL_GPL(find_pci_host_bridge);
> 
> Do you have a place where you actually need to use find_pci_host_bridge()?
> I'd rather not export it, even as _GPL, unless we have a user.

The code in arm64 series is using it to implement pci_domain_nr().

> 
> If we *do* export it, I'd like it to have a more conventional name, e.g.,
> something starting with "pci_".

Understood. pci_find_host_bridge() ?

Best regards,
Liviu

> 
> >  
> >  void pci_set_host_bridge_release(struct pci_host_bridge *bridge,
> >  void (*release_fn)(struct pci_host_bridge *),
> > -- 
> > 1.9.0
> > 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-pci" in
> the body of a message to majord...@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

-- 

| I would like to |
| fix the world,  |
| but they're not |
| giving me the   |
 \ source code!  /
  ---
¯\_(ツ)_/¯

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH v7 5/6] pci: Export find_pci_host_bridge() function.

2014-04-07 Thread Liviu Dudau
On Sat, Apr 05, 2014 at 12:39:48AM +0100, Bjorn Helgaas wrote:
 On Fri, Mar 14, 2014 at 03:34:31PM +, Liviu Dudau wrote:
  This is a useful function and we should make it visible outside the
  generic PCI code. Export it as a GPL symbol.
  
  Signed-off-by: Liviu Dudau liviu.du...@arm.com
  Tested-by: Tanmay Inamdar tinam...@apm.com
  ---
   drivers/pci/host-bridge.c | 3 ++-
   1 file changed, 2 insertions(+), 1 deletion(-)
  
  diff --git a/drivers/pci/host-bridge.c b/drivers/pci/host-bridge.c
  index 06ace62..8708b652 100644
  --- a/drivers/pci/host-bridge.c
  +++ b/drivers/pci/host-bridge.c
  @@ -17,12 +17,13 @@ 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 *find_pci_host_bridge(struct pci_bus *bus)
   {
  struct pci_bus *root_bus = find_pci_root_bus(bus);
   
  return to_pci_host_bridge(root_bus-bridge);
   }
  +EXPORT_SYMBOL_GPL(find_pci_host_bridge);
 
 Do you have a place where you actually need to use find_pci_host_bridge()?
 I'd rather not export it, even as _GPL, unless we have a user.

The code in arm64 series is using it to implement pci_domain_nr().

 
 If we *do* export it, I'd like it to have a more conventional name, e.g.,
 something starting with pci_.

Understood. pci_find_host_bridge() ?

Best regards,
Liviu

 
   
   void pci_set_host_bridge_release(struct pci_host_bridge *bridge,
   void (*release_fn)(struct pci_host_bridge *),
  -- 
  1.9.0
  
 --
 To unsubscribe from this list: send the line unsubscribe linux-pci in
 the body of a message to majord...@vger.kernel.org
 More majordomo info at  http://vger.kernel.org/majordomo-info.html
 

-- 

| I would like to |
| fix the world,  |
| but they're not |
| giving me the   |
 \ source code!  /
  ---
¯\_(ツ)_/¯

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH v7 5/6] pci: Export find_pci_host_bridge() function.

2014-04-07 Thread One Thousand Gnomes
  If we *do* export it, I'd like it to have a more conventional name, e.g.,
  something starting with pci_.
 
 Understood. pci_find_host_bridge() ?

pci_get_host_bridge() and take a reference IMHO ? If your primary bus is
not PCI then your PCI host bridge could be hot swappable so the API at
least ought to get that right.

Alan
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH v7 5/6] pci: Export find_pci_host_bridge() function.

2014-04-04 Thread Bjorn Helgaas
On Fri, Mar 14, 2014 at 03:34:31PM +, Liviu Dudau wrote:
> This is a useful function and we should make it visible outside the
> generic PCI code. Export it as a GPL symbol.
> 
> Signed-off-by: Liviu Dudau 
> Tested-by: Tanmay Inamdar 
> ---
>  drivers/pci/host-bridge.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/pci/host-bridge.c b/drivers/pci/host-bridge.c
> index 06ace62..8708b652 100644
> --- a/drivers/pci/host-bridge.c
> +++ b/drivers/pci/host-bridge.c
> @@ -17,12 +17,13 @@ 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 *find_pci_host_bridge(struct pci_bus *bus)
>  {
>   struct pci_bus *root_bus = find_pci_root_bus(bus);
>  
>   return to_pci_host_bridge(root_bus->bridge);
>  }
> +EXPORT_SYMBOL_GPL(find_pci_host_bridge);

Do you have a place where you actually need to use find_pci_host_bridge()?
I'd rather not export it, even as _GPL, unless we have a user.

If we *do* export it, I'd like it to have a more conventional name, e.g.,
something starting with "pci_".

>  
>  void pci_set_host_bridge_release(struct pci_host_bridge *bridge,
>void (*release_fn)(struct pci_host_bridge *),
> -- 
> 1.9.0
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH v7 5/6] pci: Export find_pci_host_bridge() function.

2014-04-04 Thread Bjorn Helgaas
On Fri, Mar 14, 2014 at 03:34:31PM +, Liviu Dudau wrote:
 This is a useful function and we should make it visible outside the
 generic PCI code. Export it as a GPL symbol.
 
 Signed-off-by: Liviu Dudau liviu.du...@arm.com
 Tested-by: Tanmay Inamdar tinam...@apm.com
 ---
  drivers/pci/host-bridge.c | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)
 
 diff --git a/drivers/pci/host-bridge.c b/drivers/pci/host-bridge.c
 index 06ace62..8708b652 100644
 --- a/drivers/pci/host-bridge.c
 +++ b/drivers/pci/host-bridge.c
 @@ -17,12 +17,13 @@ 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 *find_pci_host_bridge(struct pci_bus *bus)
  {
   struct pci_bus *root_bus = find_pci_root_bus(bus);
  
   return to_pci_host_bridge(root_bus-bridge);
  }
 +EXPORT_SYMBOL_GPL(find_pci_host_bridge);

Do you have a place where you actually need to use find_pci_host_bridge()?
I'd rather not export it, even as _GPL, unless we have a user.

If we *do* export it, I'd like it to have a more conventional name, e.g.,
something starting with pci_.

  
  void pci_set_host_bridge_release(struct pci_host_bridge *bridge,
void (*release_fn)(struct pci_host_bridge *),
 -- 
 1.9.0
 
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH v7 5/6] pci: Export find_pci_host_bridge() function.

2014-03-14 Thread Liviu Dudau
This is a useful function and we should make it visible outside the
generic PCI code. Export it as a GPL symbol.

Signed-off-by: Liviu Dudau 
Tested-by: Tanmay Inamdar 
---
 drivers/pci/host-bridge.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/pci/host-bridge.c b/drivers/pci/host-bridge.c
index 06ace62..8708b652 100644
--- a/drivers/pci/host-bridge.c
+++ b/drivers/pci/host-bridge.c
@@ -17,12 +17,13 @@ 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 *find_pci_host_bridge(struct pci_bus *bus)
 {
struct pci_bus *root_bus = find_pci_root_bus(bus);
 
return to_pci_host_bridge(root_bus->bridge);
 }
+EXPORT_SYMBOL_GPL(find_pci_host_bridge);
 
 void pci_set_host_bridge_release(struct pci_host_bridge *bridge,
 void (*release_fn)(struct pci_host_bridge *),
-- 
1.9.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH v7 5/6] pci: Export find_pci_host_bridge() function.

2014-03-14 Thread Liviu Dudau
This is a useful function and we should make it visible outside the
generic PCI code. Export it as a GPL symbol.

Signed-off-by: Liviu Dudau liviu.du...@arm.com
Tested-by: Tanmay Inamdar tinam...@apm.com
---
 drivers/pci/host-bridge.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/pci/host-bridge.c b/drivers/pci/host-bridge.c
index 06ace62..8708b652 100644
--- a/drivers/pci/host-bridge.c
+++ b/drivers/pci/host-bridge.c
@@ -17,12 +17,13 @@ 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 *find_pci_host_bridge(struct pci_bus *bus)
 {
struct pci_bus *root_bus = find_pci_root_bus(bus);
 
return to_pci_host_bridge(root_bus-bridge);
 }
+EXPORT_SYMBOL_GPL(find_pci_host_bridge);
 
 void pci_set_host_bridge_release(struct pci_host_bridge *bridge,
 void (*release_fn)(struct pci_host_bridge *),
-- 
1.9.0

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/