lkml.org 
[lkml]   [2014]   [Sep]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] Export functions from pcie-designware
On Sat, Aug 30, 2014 at 10:07:30AM -0300, Fabio Estevam wrote:
> On Sat, Aug 30, 2014 at 9:24 AM, <matwey@sai.msu.ru> wrote:
> > From: "Matwey V. Kornilov" <matwey@sai.msu.ru>
> >
> > pcie-spear13xx when built as module requires the functions from pcie-designware.
> > Export them properly.

I don't know how valuable pcie-spear13xx as a module is. No other host
drivers are supported as a module. Maybe we should just change
pcie-spear13xx from tristate to bool?

> >
> > Signed-off-by: Matwey V. Kornilov <matwey@sai.msu.ru>
> > ---
> > drivers/pci/host/pcie-designware.c | 7 +++++++
> > drivers/pci/host/pcie-designware.h | 14 +++++++-------
> > 2 files changed, 14 insertions(+), 7 deletions(-)
> >
> > diff --git a/drivers/pci/host/pcie-designware.c b/drivers/pci/host/pcie-designware.c
> > index 52bd3a1..7914b92c 100644
> > --- a/drivers/pci/host/pcie-designware.c
> > +++ b/drivers/pci/host/pcie-designware.c
> > @@ -89,6 +89,7 @@ int dw_pcie_cfg_read(void __iomem *addr, int where, int size, u32 *val)
> >
> > return PCIBIOS_SUCCESSFUL;
> > }
> > +EXPORT_SYMBOL(dw_pcie_cfg_read);
>
> What about using EXPORT_SYMBOL_GPL instead?
>
> > -int dw_pcie_cfg_read(void __iomem *addr, int where, int size, u32 *val);
> > -int dw_pcie_cfg_write(void __iomem *addr, int where, int size, u32 val);
> > -irqreturn_t dw_handle_msi_irq(struct pcie_port *pp);
> > -void dw_pcie_msi_init(struct pcie_port *pp);
> > -int dw_pcie_link_up(struct pcie_port *pp);
> > -void dw_pcie_setup_rc(struct pcie_port *pp);
> > -int dw_pcie_host_init(struct pcie_port *pp);
> > +extern int dw_pcie_cfg_read(void __iomem *addr, int where, int size, u32 *val);
> > +extern int dw_pcie_cfg_write(void __iomem *addr, int where, int size, u32 val);
> > +extern irqreturn_t dw_handle_msi_irq(struct pcie_port *pp);
> > +extern void dw_pcie_msi_init(struct pcie_port *pp);
> > +extern int dw_pcie_link_up(struct pcie_port *pp);
> > +extern void dw_pcie_setup_rc(struct pcie_port *pp);
> > +extern int dw_pcie_host_init(struct pcie_port *pp);
>
> Why is this needed?

- This is logically separate from the EXPORT_SYMBOL change, so it should be
a separate patch.

- I wouldn't take a patch adding "extern" to function declarations in a
header file because I recently removed them all, e.g.,
http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=f39d5b72913e.


\
 
 \ /
  Last update: 2014-09-17 02:01    [W:0.081 / U:0.884 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site