Skip to contentSkip to conversation

MIPS: lantic: Fix "no prototype" warning

PATCH Applied Bjorn Helgaas 3 participants 6 messages Oct 10, 2023 – Oct 19, 2023 MIPS

lore
Share & tools
lore
#0 lore raw

cover MIPS: lantic: Fix "no prototype" warning

From: Bjorn Helgaas <[email protected]>

Fix a "no prototype" warning found by the kernel test robot.

Bjorn Helgaas (2):
MIPS: lantic: Fix pcibios_plat_dev_init() "no previous prototype"
warning
MIPS: lantic: Remove unnecessary include of <linux/of_irq.h>

 arch/mips/pci/fixup-lantiq.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Signature · 1 line
2.34.1
#1 lore raw

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

From: Bjorn Helgaas <[email protected]>

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.

---
 arch/mips/pci/fixup-lantiq.c | 1 +
 1 file changed, 1 insertion(+)
arch/mips/pci/fixup-lantiq.c +1 -0
index 105569c1b712..8f5fb98b3984 100644
@@ -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;
Signature · 1 line
2.34.1
Reviewed-by on v1 1/2
#2 lore raw

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

Quoted 12 lines · Bjorn Helgaas

From: Bjorn Helgaas <[email protected]>

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]

Quoted 8 lines

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

---
  arch/mips/pci/fixup-lantiq.c | 1 +
  1 file changed, 1 insertion(+)
#3 lore raw

PATCH 2/2 MIPS: lantic: Remove unnecessary include of <linux/of_irq.h>

In reply to Bjorn Helgaas

From: Bjorn Helgaas <[email protected]>

arch/mips/pci/fixup-lantiq.c requires nothing from <linux/of_irq.h>, so remove the include of it.

---
 arch/mips/pci/fixup-lantiq.c | 1 -
 1 file changed, 1 deletion(-)
arch/mips/pci/fixup-lantiq.c +0 -1
index 8f5fb98b3984..13009666204f 100644
@@ -4,7 +4,6 @@
  *  Copyright (C) 2012 John Crispin <[email protected]>
  */
 
-#include <linux/of_irq.h>
 #include <linux/of_pci.h>
 #include <linux/pci.h>
 
Signature · 1 line
2.34.1
Reviewed-by on v1 2/2
#4 lore raw

Re: [PATCH 2/2] MIPS: lantic: Remove unnecessary include of <linux/of_irq.h>

Quoted 15 lines · Bjorn Helgaas

From: Bjorn Helgaas <[email protected]>

arch/mips/pci/fixup-lantiq.c requires nothing from <linux/of_irq.h>, so remove the include of it.

---
  arch/mips/pci/fixup-lantiq.c | 1 -
  1 file changed, 1 deletion(-)
arch/mips/pci/fixup-lantiq.c +0 -0
index 8f5fb98b3984..13009666204f 100644

arch/mips/pci/fixup-lantiq.c line 7

Quoted 5 lines
arch/mips/pci/fixup-lantiq.c +0 -1
@@ -4,7 +4,6 @@
   *  Copyright (C) 2012 John Crispin <[email protected]>
   */
 
-#include <linux/of_irq.h>
  #include <linux/of_pci.h>

Indeed, we are good with <linux/of_pci.h>.

maintainer Applied
#5 lore raw
In reply to Bjorn Helgaas
Quoted 11 lines · Bjorn Helgaas

From: Bjorn Helgaas <[email protected]>

Fix a "no prototype" warning found by the kernel test robot.

Bjorn Helgaas (2):
MIPS: lantic: Fix pcibios_plat_dev_init() "no previous prototype"
warning
MIPS: lantic: Remove unnecessary include of <linux/of_irq.h>

 arch/mips/pci/fixup-lantiq.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

applied to mips-nextr. I've fixed lantic -> lantiq while applying.

Thomas.

Signature · 2 lines
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea.                                                [ RFC1925, 2.3 ]