diff mbox series

[1/2] MIPS: lantic: Fix pcibios_plat_dev_init() "no previous prototype" warning

Message ID 20231010143406.974591-2-helgaas@kernel.org (mailing list archive)
State Accepted
Commit f2f12cf4e5f6173febc8db8c3e533141b0e667a4
Headers show
Series MIPS: lantic: Fix "no prototype" warning | expand

Commit Message

Bjorn Helgaas Oct. 10, 2023, 2:34 p.m. UTC
From: Bjorn Helgaas <bhelgaas@google.com>

After bbd8810d3998 ("PCI: Remove unused includes and superfluous struct
declaration"), <linux/of_pci.h> no longer includes <linux/pci.h>, which
provides the extern declarations for pcibios_plat_dev_init() and
pcibios_map_irq() via <asm/pci.h>.

This results in these new warnings:

  arch/mips/pci/fixup-lantiq.c:13:5: warning: no previous prototype for 'pcibios_plat_dev_init' [-Wmissing-prototypes]
  arch/mips/pci/fixup-lantiq.c:24:5: warning: no previous prototype for 'pcibios_map_irq' [-Wmissing-prototypes]

Include <linux/pci.h> directly to get these declarations.

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202310070445.tzRBNYRC-lkp@intel.com/
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
---
 arch/mips/pci/fixup-lantiq.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Philippe Mathieu-Daudé Oct. 12, 2023, 8:26 a.m. UTC | #1
On 10/10/23 16:34, Bjorn Helgaas wrote:
> From: Bjorn Helgaas <bhelgaas@google.com>
> 
> After bbd8810d3998 ("PCI: Remove unused includes and superfluous struct
> declaration"), <linux/of_pci.h> no longer includes <linux/pci.h>, which
> provides the extern declarations for pcibios_plat_dev_init() and
> pcibios_map_irq() via <asm/pci.h>.
> 
> This results in these new warnings:
> 
>    arch/mips/pci/fixup-lantiq.c:13:5: warning: no previous prototype for 'pcibios_plat_dev_init' [-Wmissing-prototypes]
>    arch/mips/pci/fixup-lantiq.c:24:5: warning: no previous prototype for 'pcibios_map_irq' [-Wmissing-prototypes]
> 
> Include <linux/pci.h> directly to get these declarations.
> 
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202310070445.tzRBNYRC-lkp@intel.com/
> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
> ---
>   arch/mips/pci/fixup-lantiq.c | 1 +
>   1 file changed, 1 insertion(+)

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
diff mbox series

Patch

diff --git a/arch/mips/pci/fixup-lantiq.c b/arch/mips/pci/fixup-lantiq.c
index 105569c1b712..8f5fb98b3984 100644
--- a/arch/mips/pci/fixup-lantiq.c
+++ b/arch/mips/pci/fixup-lantiq.c
@@ -6,6 +6,7 @@ 
 
 #include <linux/of_irq.h>
 #include <linux/of_pci.h>
+#include <linux/pci.h>
 
 int (*ltq_pci_plat_arch_init)(struct pci_dev *dev) = NULL;
 int (*ltq_pci_plat_dev_init)(struct pci_dev *dev) = NULL;