Re: [PATCH v8 4/8] PCI/portdrv: Create pcie_is_port_dev() func from existing code

From: Rob Herring
Date: Thu Nov 11 2021 - 17:53:29 EST


On Thu, Nov 11, 2021 at 3:51 PM Florian Fainelli <f.fainelli@xxxxxxxxx> wrote:
>
> On 11/10/21 2:14 PM, Jim Quinlan wrote:
> > The function will be needed elsewhere in a few commits.
> >
> > Signed-off-by: Jim Quinlan <jim2101024@xxxxxxxxx>
> > ---
> > drivers/pci/pci.h | 2 ++
> > drivers/pci/pcie/portdrv_pci.c | 23 ++++++++++++++++++-----
> > 2 files changed, 20 insertions(+), 5 deletions(-)
> >
> > diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h
> > index 1cce56c2aea0..c2bd1995d3a9 100644
> > --- a/drivers/pci/pci.h
> > +++ b/drivers/pci/pci.h
> > @@ -744,4 +744,6 @@ extern const struct attribute_group aspm_ctrl_attr_group;
> >
> > extern const struct attribute_group pci_dev_reset_method_attr_group;
> >
> > +bool pcie_is_port_dev(struct pci_dev *dev);
>
> Looks like you need an inline stub here when CONFIG_PCIEPORTBUS is
> disabled to avoid the linking failure reported by the kbuild robot:

Probably always an inline function. It has nothing to do with the
driver, so portdrv_pci.c is not the right place.

Rob