Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Jingoo Han and committed by
Brian Norris
5c8b1fbb e4eec195

+6 -20
+2 -6
drivers/mtd/chips/cfi_cmdset_0001.c
··· 434 434 int i; 435 435 436 436 mtd = kzalloc(sizeof(*mtd), GFP_KERNEL); 437 - if (!mtd) { 438 - printk(KERN_ERR "Failed to allocate memory for MTD device\n"); 437 + if (!mtd) 439 438 return NULL; 440 - } 441 439 mtd->priv = map; 442 440 mtd->type = MTD_NORFLASH; 443 441 ··· 561 563 mtd->numeraseregions = cfi->cfiq->NumEraseRegions * cfi->numchips; 562 564 mtd->eraseregions = kmalloc(sizeof(struct mtd_erase_region_info) 563 565 * mtd->numeraseregions, GFP_KERNEL); 564 - if (!mtd->eraseregions) { 565 - printk(KERN_ERR "Failed to allocate memory for MTD erase region info\n"); 566 + if (!mtd->eraseregions) 566 567 goto setup_err; 567 - } 568 568 569 569 for (i=0; i<cfi->cfiq->NumEraseRegions; i++) { 570 570 unsigned long ernum, ersize;
+2 -6
drivers/mtd/chips/cfi_cmdset_0002.c
··· 506 506 int i; 507 507 508 508 mtd = kzalloc(sizeof(*mtd), GFP_KERNEL); 509 - if (!mtd) { 510 - printk(KERN_WARNING "Failed to allocate memory for MTD device\n"); 509 + if (!mtd) 511 510 return NULL; 512 - } 513 511 mtd->priv = map; 514 512 mtd->type = MTD_NORFLASH; 515 513 ··· 658 660 mtd->numeraseregions = cfi->cfiq->NumEraseRegions * cfi->numchips; 659 661 mtd->eraseregions = kmalloc(sizeof(struct mtd_erase_region_info) 660 662 * mtd->numeraseregions, GFP_KERNEL); 661 - if (!mtd->eraseregions) { 662 - printk(KERN_WARNING "Failed to allocate memory for MTD erase region info\n"); 663 + if (!mtd->eraseregions) 663 664 goto setup_err; 664 - } 665 665 666 666 for (i=0; i<cfi->cfiq->NumEraseRegions; i++) { 667 667 unsigned long ernum, ersize;
-2
drivers/mtd/chips/cfi_cmdset_0020.c
··· 175 175 //printk(KERN_DEBUG "number of CFI chips: %d\n", cfi->numchips); 176 176 177 177 if (!mtd) { 178 - printk(KERN_ERR "Failed to allocate memory for MTD device\n"); 179 178 kfree(cfi->cmdset_priv); 180 179 return NULL; 181 180 } ··· 187 188 mtd->eraseregions = kmalloc(sizeof(struct mtd_erase_region_info) 188 189 * mtd->numeraseregions, GFP_KERNEL); 189 190 if (!mtd->eraseregions) { 190 - printk(KERN_ERR "Failed to allocate memory for MTD erase region info\n"); 191 191 kfree(cfi->cmdset_priv); 192 192 kfree(mtd); 193 193 return NULL;
+1 -3
drivers/mtd/chips/cfi_probe.c
··· 168 168 return 0; 169 169 170 170 cfi->cfiq = kmalloc(sizeof(struct cfi_ident) + num_erase_regions * 4, GFP_KERNEL); 171 - if (!cfi->cfiq) { 172 - printk(KERN_WARNING "%s: kmalloc failed for CFI ident structure\n", map->name); 171 + if (!cfi->cfiq) 173 172 return 0; 174 - } 175 173 176 174 memset(cfi->cfiq,0,sizeof(struct cfi_ident)); 177 175
+1 -3
drivers/mtd/chips/cfi_util.c
··· 116 116 printk(KERN_INFO "%s Extended Query Table at 0x%4.4X\n", name, adr); 117 117 118 118 extp = kmalloc(size, GFP_KERNEL); 119 - if (!extp) { 120 - printk(KERN_ERR "Failed to allocate memory\n"); 119 + if (!extp) 121 120 goto out; 122 - } 123 121 124 122 #ifdef CONFIG_MTD_XIP 125 123 local_irq_disable();