Commit 29bc17ec authored by Francisco Jerez's avatar Francisco Jerez Committed by Ingo Molnar

io-mapping: Fix the address space annotations

Fixes a bunch of sparse warnings in io-mapping.h because of the
inconsistent __iomem usage.
Signed-off-by: default avatarFrancisco Jerez <currojerez@riseup.net>
LKML-Reference: <1283633804-11749-2-git-send-email-currojerez@riseup.net>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent cc1a8e52
......@@ -79,7 +79,7 @@ io_mapping_free(struct io_mapping *mapping)
}
/* Atomic map/unmap */
static inline void *
static inline void __iomem *
io_mapping_map_atomic_wc(struct io_mapping *mapping,
unsigned long offset,
int slot)
......@@ -94,12 +94,12 @@ io_mapping_map_atomic_wc(struct io_mapping *mapping,
}
static inline void
io_mapping_unmap_atomic(void *vaddr, int slot)
io_mapping_unmap_atomic(void __iomem *vaddr, int slot)
{
iounmap_atomic(vaddr, slot);
}
static inline void *
static inline void __iomem *
io_mapping_map_wc(struct io_mapping *mapping, unsigned long offset)
{
resource_size_t phys_addr;
......@@ -111,7 +111,7 @@ io_mapping_map_wc(struct io_mapping *mapping, unsigned long offset)
}
static inline void
io_mapping_unmap(void *vaddr)
io_mapping_unmap(void __iomem *vaddr)
{
iounmap(vaddr);
}
......@@ -125,38 +125,38 @@ struct io_mapping;
static inline struct io_mapping *
io_mapping_create_wc(resource_size_t base, unsigned long size)
{
return (struct io_mapping *) ioremap_wc(base, size);
return (struct io_mapping __force *) ioremap_wc(base, size);
}
static inline void
io_mapping_free(struct io_mapping *mapping)
{
iounmap(mapping);
iounmap((void __force __iomem *) mapping);
}
/* Atomic map/unmap */
static inline void *
static inline void __iomem *
io_mapping_map_atomic_wc(struct io_mapping *mapping,
unsigned long offset,
int slot)
{
return ((char *) mapping) + offset;
return ((char __force __iomem *) mapping) + offset;
}
static inline void
io_mapping_unmap_atomic(void *vaddr, int slot)
io_mapping_unmap_atomic(void __iomem *vaddr, int slot)
{
}
/* Non-atomic map/unmap */
static inline void *
static inline void __iomem *
io_mapping_map_wc(struct io_mapping *mapping, unsigned long offset)
{
return ((char *) mapping) + offset;
return ((char __force __iomem *) mapping) + offset;
}
static inline void
io_mapping_unmap(void *vaddr)
io_mapping_unmap(void __iomem *vaddr)
{
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment