Re: [pci:pci/hotplug 4/5] (.text+0x3454): multiple definition of `pci_acpi_program_hp_params'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Apr 23, 2019 at 08:09:08AM +0800, kbuild test robot wrote:
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git pci/hotplug
> head:   c098676c4df695cc8f430bfa5fa803f41c8584f4
> commit: 8c76b06f58183e15f31d6660c9bd049cbba9e4f6 [4/5] PCI / ACPI: Remove the need for 'struct hotplug_params'
> config: riscv-allyesconfig (attached as .config)
> compiler: riscv64-linux-gcc (GCC) 8.1.0
> reproduce:
>         wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
>         chmod +x ~/bin/make.cross
>         git checkout 8c76b06f58183e15f31d6660c9bd049cbba9e4f6
>         # save the attached .config to linux build tree
>         GCC_VERSION=8.1.0 make.cross ARCH=riscv 
> 
> If you fix the issue, kindly add following tag
> Reported-by: kbuild test robot <lkp@xxxxxxxxx>
> 
> 
> All errors (new ones prefixed by >>):
> 
>    drivers/pci/pci.o: In function `pci_acpi_program_hp_params':
> >> (.text+0x3454): multiple definition of `pci_acpi_program_hp_params'
>    drivers/pci/probe.o:(.text+0x864): first defined here

I fixed this by making the non-ACPI stub of
pci_acpi_program_hp_params() a "static inline" function:

diff --git a/include/linux/pci_hotplug.h b/include/linux/pci_hotplug.h
index 352c5169c256..f694eb2ca978 100644
--- a/include/linux/pci_hotplug.h
+++ b/include/linux/pci_hotplug.h
@@ -188,8 +188,8 @@ bool shpchp_is_native(struct pci_dev *bridge);
 int acpi_pci_check_ejectable(struct pci_bus *pbus, acpi_handle handle);
 int acpi_pci_detect_ejectable(acpi_handle handle);
 #else
-int pci_acpi_program_hp_params(struct pci_dev *dev,
-			       const struct hotplug_program_ops *hp_ops)
+static inline int pci_acpi_program_hp_params(struct pci_dev *dev,
+				    const struct hotplug_program_ops *hp_ops)
 {
 	return -ENODEV;
 }



[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux