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

From: Florian Fainelli
Date: Thu Nov 11 2021 - 16:51:27 EST


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:

static inline bool pcie_is_port_dev(struct pci_dev *dev)
{
return false;
}

Thanks!
--
Florian