Skip to contentSkip to conversation

probe_roms.c: quiet sparse noise and fix return type of pci_map_biosrom

PATCH New H Hartley Sweeten 1 participant 1 message Sep 9, 2011 x86

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 probe_roms.c: quiet sparse noise and fix return type of pci_map_biosrom

The function pci_map_biosrom is declared in <asm/probe_roms.h> as returning a void __iomem * but is implemented in the code to return a void *.

Include <asm/probe_roms.h> to pick up the declarations and fix the return type of pci_map_biosrom to match the declaration. This quiets the following sparse noise:

warning: incorrect type in return expression (different address spaces)
expected void *
got void [noderef] <asn:2>*
warning: symbol 'pci_map_biosrom' was not declared. Should it be static?
warning: symbol 'pci_unmap_biosrom' was not declared. Should it be static?
warning: symbol 'pci_biosrom_size' was not declared. Should it be static?

Cc Thomas Gleixner <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc "H. Peter Anvin" <[email protected]>
Cc Paul Gortmaker <[email protected]>
Cc Jiri Kosina <[email protected]>
Cc Dave Jiang <[email protected]>
Cc Joe Perches <[email protected]>
Cc Dan Williams <[email protected]>

---

arch/x86/kernel/probe_roms.c +2 -1
index 34e06e8..c0a8915 100644
@@ -19,6 +19,7 @@
 #include <asm/sections.h>
 #include <asm/io.h>
 #include <asm/setup_arch.h>
+#include <asm/probe_roms.h>
 
 static struct resource system_rom_resource = {
 	.name	= "System ROM",
@@ -149,7 +150,7 @@ static struct resource *find_oprom(struct pci_dev *pdev)
 	return oprom;
 }
 
-void *pci_map_biosrom(struct pci_dev *pdev)
+void __iomem *pci_map_biosrom(struct pci_dev *pdev)
 {
 	struct resource *oprom = find_oprom(pdev);