Commit 9a589c8bad41d117184c0b7d658956d525354af5

Authored by Jingoo Han
Committed by David Woodhouse
1 parent e51fb2cb2b

mtd: maps: cfi_flagadm: add missing __iomem annotation

Added missing __iomem annotation and staticized local symbols
in order to fix the following sparse warnings:

drivers/mtd/maps/cfi_flagadm.c:58:17: warning: symbol 'flagadm_map' was not declared. Should it be static?
drivers/mtd/maps/cfi_flagadm.c:64:22: warning: symbol 'flagadm_parts' was not declared. Should it be static?
drivers/mtd/maps/cfi_flagadm.c:115:18: warning: cast removes address space of expression
drivers/mtd/maps/cfi_flagadm.c:115:18: warning: incorrect type in argument 1 (different address spaces)
drivers/mtd/maps/cfi_flagadm.c:115:18:    expected void volatile [noderef] <asn:2>*addr
drivers/mtd/maps/cfi_flagadm.c:115:18:    got void *<noident>
drivers/mtd/maps/cfi_flagadm.c:126:26: warning: cast removes address space of expression
drivers/mtd/maps/cfi_flagadm.c:126:26: warning: incorrect type in argument 1 (different address spaces)
drivers/mtd/maps/cfi_flagadm.c:126:26:    expected void volatile [noderef] <asn:2>*addr
drivers/mtd/maps/cfi_flagadm.c:126:26:    got void *<noident>
drivers/mtd/maps/cfi_flagadm.c:127:36: warning: Using plain integer as NULL pointer

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>

Showing 1 changed file with 5 additions and 5 deletions Side-by-side Diff

drivers/mtd/maps/cfi_flagadm.c
... ... @@ -55,13 +55,13 @@
55 55 #define FLASH_PARTITION3_SIZE 0x001C0000
56 56  
57 57  
58   -struct map_info flagadm_map = {
  58 +static struct map_info flagadm_map = {
59 59 .name = "FlagaDM flash device",
60 60 .size = FLASH_SIZE,
61 61 .bankwidth = 2,
62 62 };
63 63  
64   -struct mtd_partition flagadm_parts[] = {
  64 +static struct mtd_partition flagadm_parts[] = {
65 65 {
66 66 .name = "Bootloader",
67 67 .offset = FLASH_PARTITION0_ADDR,
... ... @@ -112,7 +112,7 @@
112 112 return 0;
113 113 }
114 114  
115   - iounmap((void *)flagadm_map.virt);
  115 + iounmap((void __iomem *)flagadm_map.virt);
116 116 return -ENXIO;
117 117 }
118 118  
... ... @@ -123,8 +123,8 @@
123 123 map_destroy(mymtd);
124 124 }
125 125 if (flagadm_map.virt) {
126   - iounmap((void *)flagadm_map.virt);
127   - flagadm_map.virt = 0;
  126 + iounmap((void __iomem *)flagadm_map.virt);
  127 + flagadm_map.virt = NULL;
128 128 }
129 129 }
130 130