diff options
author | Jingoo Han <jg1.han@samsung.com> | 2014-02-06 01:19:35 -0500 |
---|---|---|
committer | Huang Shijie <b32955@freescale.com> | 2014-06-04 01:16:22 -0400 |
commit | b0ac571af5a7ad9dc92a7cb2efcdd2d3578439f3 (patch) | |
tree | cc93cebd835a047ed5b95b62a6e450cd5a8bd123 | |
parent | 1498ea78f6ca25628a2a8f16669646656269b8f5 (diff) |
mtd: cfi: Remove unnecessary OOM messages
The site-specific OOM messages are unnecessary, because they
duplicate the MM subsystem generic OOM message.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Huang Shijie <b32955@freescale.com>
-rw-r--r-- | drivers/mtd/chips/cfi_cmdset_0001.c | 8 | ||||
-rw-r--r-- | drivers/mtd/chips/cfi_cmdset_0002.c | 8 | ||||
-rw-r--r-- | drivers/mtd/chips/cfi_cmdset_0020.c | 2 | ||||
-rw-r--r-- | drivers/mtd/chips/cfi_probe.c | 4 | ||||
-rw-r--r-- | drivers/mtd/chips/cfi_util.c | 4 |
5 files changed, 6 insertions, 20 deletions
diff --git a/drivers/mtd/chips/cfi_cmdset_0001.c b/drivers/mtd/chips/cfi_cmdset_0001.c index 7aa581f0ea4d..8cd5fb5ec0ef 100644 --- a/drivers/mtd/chips/cfi_cmdset_0001.c +++ b/drivers/mtd/chips/cfi_cmdset_0001.c | |||
@@ -435,10 +435,8 @@ struct mtd_info *cfi_cmdset_0001(struct map_info *map, int primary) | |||
435 | int i; | 435 | int i; |
436 | 436 | ||
437 | mtd = kzalloc(sizeof(*mtd), GFP_KERNEL); | 437 | mtd = kzalloc(sizeof(*mtd), GFP_KERNEL); |
438 | if (!mtd) { | 438 | if (!mtd) |
439 | printk(KERN_ERR "Failed to allocate memory for MTD device\n"); | ||
440 | return NULL; | 439 | return NULL; |
441 | } | ||
442 | mtd->priv = map; | 440 | mtd->priv = map; |
443 | mtd->type = MTD_NORFLASH; | 441 | mtd->type = MTD_NORFLASH; |
444 | 442 | ||
@@ -564,10 +562,8 @@ static struct mtd_info *cfi_intelext_setup(struct mtd_info *mtd) | |||
564 | mtd->numeraseregions = cfi->cfiq->NumEraseRegions * cfi->numchips; | 562 | mtd->numeraseregions = cfi->cfiq->NumEraseRegions * cfi->numchips; |
565 | mtd->eraseregions = kmalloc(sizeof(struct mtd_erase_region_info) | 563 | mtd->eraseregions = kmalloc(sizeof(struct mtd_erase_region_info) |
566 | * mtd->numeraseregions, GFP_KERNEL); | 564 | * mtd->numeraseregions, GFP_KERNEL); |
567 | if (!mtd->eraseregions) { | 565 | if (!mtd->eraseregions) |
568 | printk(KERN_ERR "Failed to allocate memory for MTD erase region info\n"); | ||
569 | goto setup_err; | 566 | goto setup_err; |
570 | } | ||
571 | 567 | ||
572 | for (i=0; i<cfi->cfiq->NumEraseRegions; i++) { | 568 | for (i=0; i<cfi->cfiq->NumEraseRegions; i++) { |
573 | unsigned long ernum, ersize; | 569 | unsigned long ernum, ersize; |
diff --git a/drivers/mtd/chips/cfi_cmdset_0002.c b/drivers/mtd/chips/cfi_cmdset_0002.c index b4e8832eb4fa..bbd4a19a2ec8 100644 --- a/drivers/mtd/chips/cfi_cmdset_0002.c +++ b/drivers/mtd/chips/cfi_cmdset_0002.c | |||
@@ -507,10 +507,8 @@ struct mtd_info *cfi_cmdset_0002(struct map_info *map, int primary) | |||
507 | int i; | 507 | int i; |
508 | 508 | ||
509 | mtd = kzalloc(sizeof(*mtd), GFP_KERNEL); | 509 | mtd = kzalloc(sizeof(*mtd), GFP_KERNEL); |
510 | if (!mtd) { | 510 | if (!mtd) |
511 | printk(KERN_WARNING "Failed to allocate memory for MTD device\n"); | ||
512 | return NULL; | 511 | return NULL; |
513 | } | ||
514 | mtd->priv = map; | 512 | mtd->priv = map; |
515 | mtd->type = MTD_NORFLASH; | 513 | mtd->type = MTD_NORFLASH; |
516 | 514 | ||
@@ -661,10 +659,8 @@ static struct mtd_info *cfi_amdstd_setup(struct mtd_info *mtd) | |||
661 | mtd->numeraseregions = cfi->cfiq->NumEraseRegions * cfi->numchips; | 659 | mtd->numeraseregions = cfi->cfiq->NumEraseRegions * cfi->numchips; |
662 | mtd->eraseregions = kmalloc(sizeof(struct mtd_erase_region_info) | 660 | mtd->eraseregions = kmalloc(sizeof(struct mtd_erase_region_info) |
663 | * mtd->numeraseregions, GFP_KERNEL); | 661 | * mtd->numeraseregions, GFP_KERNEL); |
664 | if (!mtd->eraseregions) { | 662 | if (!mtd->eraseregions) |
665 | printk(KERN_WARNING "Failed to allocate memory for MTD erase region info\n"); | ||
666 | goto setup_err; | 663 | goto setup_err; |
667 | } | ||
668 | 664 | ||
669 | for (i=0; i<cfi->cfiq->NumEraseRegions; i++) { | 665 | for (i=0; i<cfi->cfiq->NumEraseRegions; i++) { |
670 | unsigned long ernum, ersize; | 666 | unsigned long ernum, ersize; |
diff --git a/drivers/mtd/chips/cfi_cmdset_0020.c b/drivers/mtd/chips/cfi_cmdset_0020.c index 096993f9711e..78d6dcaab5f4 100644 --- a/drivers/mtd/chips/cfi_cmdset_0020.c +++ b/drivers/mtd/chips/cfi_cmdset_0020.c | |||
@@ -176,7 +176,6 @@ static struct mtd_info *cfi_staa_setup(struct map_info *map) | |||
176 | //printk(KERN_DEBUG "number of CFI chips: %d\n", cfi->numchips); | 176 | //printk(KERN_DEBUG "number of CFI chips: %d\n", cfi->numchips); |
177 | 177 | ||
178 | if (!mtd) { | 178 | if (!mtd) { |
179 | printk(KERN_ERR "Failed to allocate memory for MTD device\n"); | ||
180 | kfree(cfi->cmdset_priv); | 179 | kfree(cfi->cmdset_priv); |
181 | return NULL; | 180 | return NULL; |
182 | } | 181 | } |
@@ -189,7 +188,6 @@ static struct mtd_info *cfi_staa_setup(struct map_info *map) | |||
189 | mtd->eraseregions = kmalloc(sizeof(struct mtd_erase_region_info) | 188 | mtd->eraseregions = kmalloc(sizeof(struct mtd_erase_region_info) |
190 | * mtd->numeraseregions, GFP_KERNEL); | 189 | * mtd->numeraseregions, GFP_KERNEL); |
191 | if (!mtd->eraseregions) { | 190 | if (!mtd->eraseregions) { |
192 | printk(KERN_ERR "Failed to allocate memory for MTD erase region info\n"); | ||
193 | kfree(cfi->cmdset_priv); | 191 | kfree(cfi->cmdset_priv); |
194 | kfree(mtd); | 192 | kfree(mtd); |
195 | return NULL; | 193 | return NULL; |
diff --git a/drivers/mtd/chips/cfi_probe.c b/drivers/mtd/chips/cfi_probe.c index d25535279404..e8d0164498b0 100644 --- a/drivers/mtd/chips/cfi_probe.c +++ b/drivers/mtd/chips/cfi_probe.c | |||
@@ -168,10 +168,8 @@ static int __xipram cfi_chip_setup(struct map_info *map, | |||
168 | return 0; | 168 | return 0; |
169 | 169 | ||
170 | cfi->cfiq = kmalloc(sizeof(struct cfi_ident) + num_erase_regions * 4, GFP_KERNEL); | 170 | cfi->cfiq = kmalloc(sizeof(struct cfi_ident) + num_erase_regions * 4, GFP_KERNEL); |
171 | if (!cfi->cfiq) { | 171 | if (!cfi->cfiq) |
172 | printk(KERN_WARNING "%s: kmalloc failed for CFI ident structure\n", map->name); | ||
173 | return 0; | 172 | return 0; |
174 | } | ||
175 | 173 | ||
176 | memset(cfi->cfiq,0,sizeof(struct cfi_ident)); | 174 | memset(cfi->cfiq,0,sizeof(struct cfi_ident)); |
177 | 175 | ||
diff --git a/drivers/mtd/chips/cfi_util.c b/drivers/mtd/chips/cfi_util.c index f992418f40a8..08049f6eea60 100644 --- a/drivers/mtd/chips/cfi_util.c +++ b/drivers/mtd/chips/cfi_util.c | |||
@@ -116,10 +116,8 @@ __xipram cfi_read_pri(struct map_info *map, __u16 adr, __u16 size, const char* n | |||
116 | printk(KERN_INFO "%s Extended Query Table at 0x%4.4X\n", name, adr); | 116 | printk(KERN_INFO "%s Extended Query Table at 0x%4.4X\n", name, adr); |
117 | 117 | ||
118 | extp = kmalloc(size, GFP_KERNEL); | 118 | extp = kmalloc(size, GFP_KERNEL); |
119 | if (!extp) { | 119 | if (!extp) |
120 | printk(KERN_ERR "Failed to allocate memory\n"); | ||
121 | goto out; | 120 | goto out; |
122 | } | ||
123 | 121 | ||
124 | #ifdef CONFIG_MTD_XIP | 122 | #ifdef CONFIG_MTD_XIP |
125 | local_irq_disable(); | 123 | local_irq_disable(); |