MIPS: lantic: Fix "no prototype" warning
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
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
@@ -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
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 forpcibios_plat_dev_init()andpcibios_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.Reported-by kernel test robot <[email protected]>Signed-off-by Bjorn Helgaas <[email protected]>--- arch/mips/pci/fixup-lantiq.c | 1 + 1 file changed, 1 insertion(+)
PATCH 2/2 MIPS: lantic: Remove unnecessary include of <linux/of_irq.h>
In reply to Bjorn HelgaasFrom: 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
@@ -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
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.crequires nothing from <linux/of_irq.h>, so remove the include of it.Signed-off-by Bjorn Helgaas <[email protected]>--- arch/mips/pci/fixup-lantiq.c | 1 - 1 file changed, 1 deletion(-)arch/mips/pci/fixup-lantiq.c +0
-0
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>.
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: Fixpcibios_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 ]