Skip to content

Commit

Permalink
ARM: davinci: sram.c: fix incorrect type in assignment
Browse files Browse the repository at this point in the history
Fix missing __iomem attribute. This fixes the sparse warning:

  CHECK   arch/arm/mach-davinci/sram.c
arch/arm/mach-davinci/sram.c:75:8: warning: incorrect type in assignment (different address spaces)
arch/arm/mach-davinci/sram.c:75:8:    expected void *addr
arch/arm/mach-davinci/sram.c:75:8:    got void [noderef] <asn:2>*
arch/arm/mach-davinci/sram.c:81:12: warning: incorrect type in argument 1 (different address spaces)
arch/arm/mach-davinci/sram.c:81:12:    expected void volatile [noderef] <asn:2>*addr
arch/arm/mach-davinci/sram.c:81:12:    got void *addr

Signed-off-by: Sekhar Nori <nsekhar@ti.com>
  • Loading branch information
Sekhar Nori committed Apr 17, 2013
1 parent 267f3c0 commit 182e796
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arch/arm/mach-davinci/sram.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ static int __init sram_init(void)
phys_addr_t phys = davinci_soc_info.sram_dma;
unsigned len = davinci_soc_info.sram_len;
int status = 0;
void *addr;
void __iomem *addr;

if (len) {
len = min_t(unsigned, len, SRAM_SIZE);
Expand All @@ -75,7 +75,7 @@ static int __init sram_init(void)
addr = ioremap(phys, len);
if (!addr)
return -ENOMEM;
status = gen_pool_add_virt(sram_pool, (unsigned)addr,
status = gen_pool_add_virt(sram_pool, (unsigned long) addr,
phys, len, -1);
if (status < 0)
iounmap(addr);
Expand Down

0 comments on commit 182e796

Please sign in to comment.