Skip to content

Commit

Permalink
x86: __iomem annotations
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>

Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Thomas Gleixner authored and Ingo Molnar committed Jan 30, 2008
1 parent e9332ca commit 4b40fce
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion arch/x86/mm/ioremap_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ void __iomem *__ioremap(unsigned long phys_addr, unsigned long size,
* Don't remap the low PCI/ISA area, it's always mapped..
*/
if (phys_addr >= ISA_START_ADDRESS && last_addr < ISA_END_ADDRESS)
return (void __iomem *) phys_to_virt(phys_addr);
return (__force void __iomem *)phys_to_virt(phys_addr);

/*
* Don't allow anybody to remap normal RAM that we're using..
Expand Down
8 changes: 4 additions & 4 deletions arch/x86/mm/ioremap_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ static int ioremap_change_attr(unsigned long phys_addr, unsigned long size,
void __iomem *__ioremap(unsigned long phys_addr, unsigned long size,
unsigned long flags)
{
void *addr;
void __iomem *addr;
struct vm_struct *area;
unsigned long offset, last_addr;
pgprot_t pgprot;
Expand Down Expand Up @@ -101,7 +101,7 @@ void __iomem *__ioremap(unsigned long phys_addr, unsigned long size,
if (!area)
return NULL;
area->phys_addr = phys_addr;
addr = area->addr;
addr = (void __iomem *) area->addr;
if (ioremap_page_range((unsigned long)addr, (unsigned long)addr + size,
phys_addr, pgprot)) {
remove_vm_area((void *)(PAGE_MASK & (unsigned long) addr));
Expand All @@ -111,7 +111,7 @@ void __iomem *__ioremap(unsigned long phys_addr, unsigned long size,
vunmap(addr);
return NULL;
}
return (__force void __iomem *) (offset + (char *)addr);
return (void __iomem *) (offset + (char __iomem *)addr);
}
EXPORT_SYMBOL(__ioremap);

Expand Down Expand Up @@ -152,7 +152,7 @@ void iounmap(volatile void __iomem *addr)
{
struct vm_struct *p, *o;

if (addr <= high_memory)
if ((void __force *)addr <= high_memory)
return;
if (addr >= phys_to_virt(ISA_START_ADDRESS) &&
addr < phys_to_virt(ISA_END_ADDRESS))
Expand Down

0 comments on commit 4b40fce

Please sign in to comment.