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

From: H Hartley Sweeten
Date: Fri Sep 09 2011 - 17:42:42 EST


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?

Signed-off-by: H Hartley Sweeten <hsweeten@xxxxxxxxxxxxxxxxxxx>
Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
Cc: Ingo Molnar <mingo@xxxxxxxxxx>
Cc: "H. Peter Anvin" <hpa@xxxxxxxxx>
Cc: Paul Gortmaker <paul.gortmaker@xxxxxxxxxxxxx>
Cc: Jiri Kosina <jkosina@xxxxxxx>
Cc: Dave Jiang <dave.jiang@xxxxxxxxx>
Cc: Joe Perches <joe@xxxxxxxxxxx>
Cc: Dan Williams <dan.j.williams@xxxxxxxxx>

---

diff --git a/arch/x86/kernel/probe_roms.c b/arch/x86/kernel/probe_roms.c
index 34e06e8..c0a8915 100644
--- a/arch/x86/kernel/probe_roms.c
+++ b/arch/x86/kernel/probe_roms.c
@@ -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);

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/