All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/8] mtd: Remove unnecessary OOM messages
@ 2014-02-06  6:07 Jingoo Han
  2014-02-06  6:08 ` [PATCH 1/8] mtd: devices: elm: " Jingoo Han
                   ` (8 more replies)
  0 siblings, 9 replies; 13+ messages in thread
From: Jingoo Han @ 2014-02-06  6:07 UTC (permalink / raw)
  To: 'Brian Norris'
  Cc: linux-mtd, 'Jingoo Han', 'David Woodhouse'

The site-specific OOM messages are unnecessary, because they
duplicate the MM subsystem generic OOM message. For example,
k.alloc and v.alloc failures use dump_stack().

Jingoo Han (8):
      mtd: devices: elm: Remove unnecessary OOM messages
      mtd: spear_smi: Remove unnecessary OOM messages
      mtd: pmc551: Remove unnecessary OOM messages
      mtd: plat-ram: Remove unnecessary OOM messages
      mtd: lpddr: Remove unnecessary OOM messages
      mtd: onenand: Remove unnecessary OOM messages
      mtd: cfi: Remove unnecessary OOM messages
      mtd: gen_probe: Remove unnecessary OOM messages

---
 drivers/mtd/chips/cfi_cmdset_0001.c |    8 ++------
 drivers/mtd/chips/cfi_cmdset_0002.c |    8 ++------
 drivers/mtd/chips/cfi_cmdset_0020.c |    2 --
 drivers/mtd/chips/cfi_probe.c       |    4 +---
 drivers/mtd/chips/cfi_util.c        |    4 +---
 drivers/mtd/chips/gen_probe.c       |    2 --
 drivers/mtd/devices/elm.c           |    4 +---
 drivers/mtd/devices/pmc551.c        |    7 +------
 drivers/mtd/devices/spear_smi.c     |    2 --
 drivers/mtd/lpddr/lpddr_cmds.c      |    4 +---
 drivers/mtd/lpddr/qinfo_probe.c     |    5 +----
 drivers/mtd/maps/plat-ram.c         |    1 -
 drivers/mtd/onenand/onenand_base.c  |    7 +------
 drivers/mtd/onenand/samsung.c       |    4 +---
 14 files changed, 12 insertions(+), 50 deletions(-)

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [PATCH 1/8] mtd: devices: elm: Remove unnecessary OOM messages
  2014-02-06  6:07 [PATCH 0/8] mtd: Remove unnecessary OOM messages Jingoo Han
@ 2014-02-06  6:08 ` Jingoo Han
  2014-02-06  6:27   ` Gupta, Pekon
  2014-02-06  6:10 ` [PATCH 2/8] mtd: spear_smi: " Jingoo Han
                   ` (7 subsequent siblings)
  8 siblings, 1 reply; 13+ messages in thread
From: Jingoo Han @ 2014-02-06  6:08 UTC (permalink / raw)
  To: 'Brian Norris'
  Cc: linux-mtd, 'Jingoo Han', 'David Woodhouse',
	'Gupta, Pekon', 'Philip Avinash'

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>
---
 drivers/mtd/devices/elm.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/mtd/devices/elm.c b/drivers/mtd/devices/elm.c
index d1dd6a3..437ed3a 100644
--- a/drivers/mtd/devices/elm.c
+++ b/drivers/mtd/devices/elm.c
@@ -354,10 +354,8 @@ static int elm_probe(struct platform_device *pdev)
 	struct elm_info *info;
 
 	info = devm_kzalloc(&pdev->dev, sizeof(*info), GFP_KERNEL);
-	if (!info) {
-		dev_err(&pdev->dev, "failed to allocate memory\n");
+	if (!info)
 		return -ENOMEM;
-	}
 
 	info->dev = &pdev->dev;
 
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 2/8] mtd: spear_smi: Remove unnecessary OOM messages
  2014-02-06  6:07 [PATCH 0/8] mtd: Remove unnecessary OOM messages Jingoo Han
  2014-02-06  6:08 ` [PATCH 1/8] mtd: devices: elm: " Jingoo Han
@ 2014-02-06  6:10 ` Jingoo Han
  2014-02-07  5:44   ` Viresh Kumar
  2014-02-06  6:11 ` [PATCH 3/8] mtd: pmc551: " Jingoo Han
                   ` (6 subsequent siblings)
  8 siblings, 1 reply; 13+ messages in thread
From: Jingoo Han @ 2014-02-06  6:10 UTC (permalink / raw)
  To: 'Brian Norris'
  Cc: linux-mtd, 'Jingoo Han', 'David Woodhouse',
	'Viresh Kumar'

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>
---
 drivers/mtd/devices/spear_smi.c |    2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/mtd/devices/spear_smi.c b/drivers/mtd/devices/spear_smi.c
index 4238214..363da96 100644
--- a/drivers/mtd/devices/spear_smi.c
+++ b/drivers/mtd/devices/spear_smi.c
@@ -913,7 +913,6 @@ static int spear_smi_probe(struct platform_device *pdev)
 	if (np) {
 		pdata = devm_kzalloc(&pdev->dev, sizeof(*pdata), GFP_KERNEL);
 		if (!pdata) {
-			pr_err("%s: ERROR: no memory", __func__);
 			ret = -ENOMEM;
 			goto err;
 		}
@@ -943,7 +942,6 @@ static int spear_smi_probe(struct platform_device *pdev)
 	dev = devm_kzalloc(&pdev->dev, sizeof(*dev), GFP_ATOMIC);
 	if (!dev) {
 		ret = -ENOMEM;
-		dev_err(&pdev->dev, "mem alloc fail\n");
 		goto err;
 	}
 
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 3/8] mtd: pmc551: Remove unnecessary OOM messages
  2014-02-06  6:07 [PATCH 0/8] mtd: Remove unnecessary OOM messages Jingoo Han
  2014-02-06  6:08 ` [PATCH 1/8] mtd: devices: elm: " Jingoo Han
  2014-02-06  6:10 ` [PATCH 2/8] mtd: spear_smi: " Jingoo Han
@ 2014-02-06  6:11 ` Jingoo Han
  2014-02-06  6:12 ` [PATCH 4/8] mtd: plat-ram: " Jingoo Han
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 13+ messages in thread
From: Jingoo Han @ 2014-02-06  6:11 UTC (permalink / raw)
  To: 'Brian Norris'
  Cc: linux-mtd, 'Jingoo Han', 'David Woodhouse'

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>
---
 drivers/mtd/devices/pmc551.c |    7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/drivers/mtd/devices/pmc551.c b/drivers/mtd/devices/pmc551.c
index 0c51b98..f02603e 100644
--- a/drivers/mtd/devices/pmc551.c
+++ b/drivers/mtd/devices/pmc551.c
@@ -725,16 +725,11 @@ static int __init init_pmc551(void)
 		}
 
 		mtd = kzalloc(sizeof(struct mtd_info), GFP_KERNEL);
-		if (!mtd) {
-			printk(KERN_NOTICE "pmc551: Cannot allocate new MTD "
-				"device.\n");
+		if (!mtd)
 			break;
-		}
 
 		priv = kzalloc(sizeof(struct mypriv), GFP_KERNEL);
 		if (!priv) {
-			printk(KERN_NOTICE "pmc551: Cannot allocate new MTD "
-				"device.\n");
 			kfree(mtd);
 			break;
 		}
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 4/8] mtd: plat-ram: Remove unnecessary OOM messages
  2014-02-06  6:07 [PATCH 0/8] mtd: Remove unnecessary OOM messages Jingoo Han
                   ` (2 preceding siblings ...)
  2014-02-06  6:11 ` [PATCH 3/8] mtd: pmc551: " Jingoo Han
@ 2014-02-06  6:12 ` Jingoo Han
  2014-02-06  6:14 ` [PATCH 5/8] mtd: lpddr: " Jingoo Han
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 13+ messages in thread
From: Jingoo Han @ 2014-02-06  6:12 UTC (permalink / raw)
  To: 'Brian Norris'
  Cc: linux-mtd, 'Jingoo Han', 'David Woodhouse',
	'Ben Dooks'

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>
---
 drivers/mtd/maps/plat-ram.c |    1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/mtd/maps/plat-ram.c b/drivers/mtd/maps/plat-ram.c
index 76ace85..d597e89 100644
--- a/drivers/mtd/maps/plat-ram.c
+++ b/drivers/mtd/maps/plat-ram.c
@@ -137,7 +137,6 @@ static int platram_probe(struct platform_device *pdev)
 
 	info = kzalloc(sizeof(*info), GFP_KERNEL);
 	if (info == NULL) {
-		dev_err(&pdev->dev, "no memory for flash info\n");
 		err = -ENOMEM;
 		goto exit_error;
 	}
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 5/8] mtd: lpddr: Remove unnecessary OOM messages
  2014-02-06  6:07 [PATCH 0/8] mtd: Remove unnecessary OOM messages Jingoo Han
                   ` (3 preceding siblings ...)
  2014-02-06  6:12 ` [PATCH 4/8] mtd: plat-ram: " Jingoo Han
@ 2014-02-06  6:14 ` Jingoo Han
  2014-02-06  6:15 ` [PATCH 6/8] mtd: onenand: " Jingoo Han
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 13+ messages in thread
From: Jingoo Han @ 2014-02-06  6:14 UTC (permalink / raw)
  To: 'Brian Norris'
  Cc: linux-mtd, 'Jingoo Han', 'David Woodhouse'

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>
---
 drivers/mtd/lpddr/lpddr_cmds.c  |    4 +---
 drivers/mtd/lpddr/qinfo_probe.c |    5 +----
 2 files changed, 2 insertions(+), 7 deletions(-)

diff --git a/drivers/mtd/lpddr/lpddr_cmds.c b/drivers/mtd/lpddr/lpddr_cmds.c
index d38b646..018c75f 100644
--- a/drivers/mtd/lpddr/lpddr_cmds.c
+++ b/drivers/mtd/lpddr/lpddr_cmds.c
@@ -55,10 +55,8 @@ struct mtd_info *lpddr_cmdset(struct map_info *map)
 	int i, j;
 
 	mtd = kzalloc(sizeof(*mtd), GFP_KERNEL);
-	if (!mtd) {
-		printk(KERN_ERR "Failed to allocate memory for MTD device\n");
+	if (!mtd)
 		return NULL;
-	}
 	mtd->priv = map;
 	mtd->type = MTD_NORFLASH;
 
diff --git a/drivers/mtd/lpddr/qinfo_probe.c b/drivers/mtd/lpddr/qinfo_probe.c
index 45abed6..69f2112 100644
--- a/drivers/mtd/lpddr/qinfo_probe.c
+++ b/drivers/mtd/lpddr/qinfo_probe.c
@@ -135,11 +135,8 @@ static int lpddr_chip_setup(struct map_info *map, struct lpddr_private *lpddr)
 {
 
 	lpddr->qinfo = kzalloc(sizeof(struct qinfo_chip), GFP_KERNEL);
-	if (!lpddr->qinfo) {
-		printk(KERN_WARNING "%s: no memory for LPDDR qinfo structure\n",
-				map->name);
+	if (!lpddr->qinfo)
 		return 0;
-	}
 
 	/* Get the ManuID */
 	lpddr->ManufactId = CMDVAL(map_read(map, map->pfow_base + PFOW_MANUFACTURER_ID));
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 6/8] mtd: onenand: Remove unnecessary OOM messages
  2014-02-06  6:07 [PATCH 0/8] mtd: Remove unnecessary OOM messages Jingoo Han
                   ` (4 preceding siblings ...)
  2014-02-06  6:14 ` [PATCH 5/8] mtd: lpddr: " Jingoo Han
@ 2014-02-06  6:15 ` Jingoo Han
  2014-02-06  6:19 ` [PATCH 7/8] mtd: cfi: " Jingoo Han
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 13+ messages in thread
From: Jingoo Han @ 2014-02-06  6:15 UTC (permalink / raw)
  To: 'Brian Norris'
  Cc: linux-mtd, 'Kyungmin Park', 'Jingoo Han',
	'David Woodhouse'

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>
---
 drivers/mtd/onenand/onenand_base.c |    7 +------
 drivers/mtd/onenand/samsung.c      |    4 +---
 2 files changed, 2 insertions(+), 9 deletions(-)

diff --git a/drivers/mtd/onenand/onenand_base.c b/drivers/mtd/onenand/onenand_base.c
index 531ccbc..e886d7a 100644
--- a/drivers/mtd/onenand/onenand_base.c
+++ b/drivers/mtd/onenand/onenand_base.c
@@ -3994,11 +3994,8 @@ int onenand_scan(struct mtd_info *mtd, int maxchips)
 	/* Allocate buffers, if necessary */
 	if (!this->page_buf) {
 		this->page_buf = kzalloc(mtd->writesize, GFP_KERNEL);
-		if (!this->page_buf) {
-			printk(KERN_ERR "%s: Can't allocate page_buf\n",
-				__func__);
+		if (!this->page_buf)
 			return -ENOMEM;
-		}
 #ifdef CONFIG_MTD_ONENAND_VERIFY_WRITE
 		this->verify_buf = kzalloc(mtd->writesize, GFP_KERNEL);
 		if (!this->verify_buf) {
@@ -4011,8 +4008,6 @@ int onenand_scan(struct mtd_info *mtd, int maxchips)
 	if (!this->oob_buf) {
 		this->oob_buf = kzalloc(mtd->oobsize, GFP_KERNEL);
 		if (!this->oob_buf) {
-			printk(KERN_ERR "%s: Can't allocate oob_buf\n",
-				__func__);
 			if (this->options & ONENAND_PAGEBUF_ALLOC) {
 				this->options &= ~ONENAND_PAGEBUF_ALLOC;
 				kfree(this->page_buf);
diff --git a/drivers/mtd/onenand/samsung.c b/drivers/mtd/onenand/samsung.c
index df7400d..b1a792f 100644
--- a/drivers/mtd/onenand/samsung.c
+++ b/drivers/mtd/onenand/samsung.c
@@ -872,10 +872,8 @@ static int s3c_onenand_probe(struct platform_device *pdev)
 
 	size = sizeof(struct mtd_info) + sizeof(struct onenand_chip);
 	mtd = kzalloc(size, GFP_KERNEL);
-	if (!mtd) {
-		dev_err(&pdev->dev, "failed to allocate memory\n");
+	if (!mtd)
 		return -ENOMEM;
-	}
 
 	onenand = kzalloc(sizeof(struct s3c_onenand), GFP_KERNEL);
 	if (!onenand) {
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 7/8] mtd: cfi: Remove unnecessary OOM messages
  2014-02-06  6:07 [PATCH 0/8] mtd: Remove unnecessary OOM messages Jingoo Han
                   ` (5 preceding siblings ...)
  2014-02-06  6:15 ` [PATCH 6/8] mtd: onenand: " Jingoo Han
@ 2014-02-06  6:19 ` Jingoo Han
  2014-02-06  6:20 ` [PATCH 8/8] mtd: gen_probe: " Jingoo Han
  2014-02-11 18:50   ` Brian Norris
  8 siblings, 0 replies; 13+ messages in thread
From: Jingoo Han @ 2014-02-06  6:19 UTC (permalink / raw)
  To: 'Brian Norris'
  Cc: 'Jingoo Han', 'Huang Shijie',
	linux-mtd, 'Paul Parsons', 'Stefan Roese',
	'David Woodhouse'

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>
---
 drivers/mtd/chips/cfi_cmdset_0001.c |    8 ++------
 drivers/mtd/chips/cfi_cmdset_0002.c |    8 ++------
 drivers/mtd/chips/cfi_cmdset_0020.c |    2 --
 drivers/mtd/chips/cfi_probe.c       |    4 +---
 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 a19719e..5e74c86 100644
--- a/drivers/mtd/chips/cfi_cmdset_0001.c
+++ b/drivers/mtd/chips/cfi_cmdset_0001.c
@@ -434,10 +434,8 @@ struct mtd_info *cfi_cmdset_0001(struct map_info *map, int primary)
 	int i;
 
 	mtd = kzalloc(sizeof(*mtd), GFP_KERNEL);
-	if (!mtd) {
-		printk(KERN_ERR "Failed to allocate memory for MTD device\n");
+	if (!mtd)
 		return NULL;
-	}
 	mtd->priv = map;
 	mtd->type = MTD_NORFLASH;
 
@@ -563,10 +561,8 @@ static struct mtd_info *cfi_intelext_setup(struct mtd_info *mtd)
 	mtd->numeraseregions = cfi->cfiq->NumEraseRegions * cfi->numchips;
 	mtd->eraseregions = kmalloc(sizeof(struct mtd_erase_region_info)
 			* mtd->numeraseregions, GFP_KERNEL);
-	if (!mtd->eraseregions) {
-		printk(KERN_ERR "Failed to allocate memory for MTD erase region info\n");
+	if (!mtd->eraseregions)
 		goto setup_err;
-	}
 
 	for (i=0; i<cfi->cfiq->NumEraseRegions; i++) {
 		unsigned long ernum, ersize;
diff --git a/drivers/mtd/chips/cfi_cmdset_0002.c b/drivers/mtd/chips/cfi_cmdset_0002.c
index 718244d..e21fde9 100644
--- a/drivers/mtd/chips/cfi_cmdset_0002.c
+++ b/drivers/mtd/chips/cfi_cmdset_0002.c
@@ -506,10 +506,8 @@ struct mtd_info *cfi_cmdset_0002(struct map_info *map, int primary)
 	int i;
 
 	mtd = kzalloc(sizeof(*mtd), GFP_KERNEL);
-	if (!mtd) {
-		printk(KERN_WARNING "Failed to allocate memory for MTD device\n");
+	if (!mtd)
 		return NULL;
-	}
 	mtd->priv = map;
 	mtd->type = MTD_NORFLASH;
 
@@ -660,10 +658,8 @@ static struct mtd_info *cfi_amdstd_setup(struct mtd_info *mtd)
 	mtd->numeraseregions = cfi->cfiq->NumEraseRegions * cfi->numchips;
 	mtd->eraseregions = kmalloc(sizeof(struct mtd_erase_region_info)
 				    * mtd->numeraseregions, GFP_KERNEL);
-	if (!mtd->eraseregions) {
-		printk(KERN_WARNING "Failed to allocate memory for MTD erase region info\n");
+	if (!mtd->eraseregions)
 		goto setup_err;
-	}
 
 	for (i=0; i<cfi->cfiq->NumEraseRegions; i++) {
 		unsigned long ernum, ersize;
diff --git a/drivers/mtd/chips/cfi_cmdset_0020.c b/drivers/mtd/chips/cfi_cmdset_0020.c
index 8852942..6293855 100644
--- a/drivers/mtd/chips/cfi_cmdset_0020.c
+++ b/drivers/mtd/chips/cfi_cmdset_0020.c
@@ -175,7 +175,6 @@ static struct mtd_info *cfi_staa_setup(struct map_info *map)
 	//printk(KERN_DEBUG "number of CFI chips: %d\n", cfi->numchips);
 
 	if (!mtd) {
-		printk(KERN_ERR "Failed to allocate memory for MTD device\n");
 		kfree(cfi->cmdset_priv);
 		return NULL;
 	}
@@ -188,7 +187,6 @@ static struct mtd_info *cfi_staa_setup(struct map_info *map)
 	mtd->eraseregions = kmalloc(sizeof(struct mtd_erase_region_info)
 			* mtd->numeraseregions, GFP_KERNEL);
 	if (!mtd->eraseregions) {
-		printk(KERN_ERR "Failed to allocate memory for MTD erase region info\n");
 		kfree(cfi->cmdset_priv);
 		kfree(mtd);
 		return NULL;
diff --git a/drivers/mtd/chips/cfi_probe.c b/drivers/mtd/chips/cfi_probe.c
index d255352..e8d0164 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,
 		return 0;
 
 	cfi->cfiq = kmalloc(sizeof(struct cfi_ident) + num_erase_regions * 4, GFP_KERNEL);
-	if (!cfi->cfiq) {
-		printk(KERN_WARNING "%s: kmalloc failed for CFI ident structure\n", map->name);
+	if (!cfi->cfiq)
 		return 0;
-	}
 
 	memset(cfi->cfiq,0,sizeof(struct cfi_ident));
 
diff --git a/drivers/mtd/chips/cfi_util.c b/drivers/mtd/chips/cfi_util.c
index f992418..08049f6 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
 	printk(KERN_INFO "%s Extended Query Table at 0x%4.4X\n", name, adr);
 
 	extp = kmalloc(size, GFP_KERNEL);
-	if (!extp) {
-		printk(KERN_ERR "Failed to allocate memory\n");
+	if (!extp)
 		goto out;
-	}
 
 #ifdef CONFIG_MTD_XIP
 	local_irq_disable();
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 8/8] mtd: gen_probe: Remove unnecessary OOM messages
  2014-02-06  6:07 [PATCH 0/8] mtd: Remove unnecessary OOM messages Jingoo Han
                   ` (6 preceding siblings ...)
  2014-02-06  6:19 ` [PATCH 7/8] mtd: cfi: " Jingoo Han
@ 2014-02-06  6:20 ` Jingoo Han
  2014-02-11 18:50   ` Brian Norris
  8 siblings, 0 replies; 13+ messages in thread
From: Jingoo Han @ 2014-02-06  6:20 UTC (permalink / raw)
  To: 'Brian Norris'
  Cc: linux-mtd, 'Jingoo Han', 'David Woodhouse'

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>
---
 drivers/mtd/chips/gen_probe.c |    2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/mtd/chips/gen_probe.c b/drivers/mtd/chips/gen_probe.c
index ffb36ba..b57ceea 100644
--- a/drivers/mtd/chips/gen_probe.c
+++ b/drivers/mtd/chips/gen_probe.c
@@ -114,7 +114,6 @@ static struct cfi_private *genprobe_ident_chips(struct map_info *map, struct chi
 	mapsize = sizeof(long) * DIV_ROUND_UP(max_chips, BITS_PER_LONG);
 	chip_map = kzalloc(mapsize, GFP_KERNEL);
 	if (!chip_map) {
-		printk(KERN_WARNING "%s: kmalloc failed for CFI chip map\n", map->name);
 		kfree(cfi.cfiq);
 		return NULL;
 	}
@@ -139,7 +138,6 @@ static struct cfi_private *genprobe_ident_chips(struct map_info *map, struct chi
 	retcfi = kmalloc(sizeof(struct cfi_private) + cfi.numchips * sizeof(struct flchip), GFP_KERNEL);
 
 	if (!retcfi) {
-		printk(KERN_WARNING "%s: kmalloc failed for CFI private structure\n", map->name);
 		kfree(cfi.cfiq);
 		kfree(chip_map);
 		return NULL;
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* RE: [PATCH 1/8] mtd: devices: elm: Remove unnecessary OOM messages
  2014-02-06  6:08 ` [PATCH 1/8] mtd: devices: elm: " Jingoo Han
@ 2014-02-06  6:27   ` Gupta, Pekon
  0 siblings, 0 replies; 13+ messages in thread
From: Gupta, Pekon @ 2014-02-06  6:27 UTC (permalink / raw)
  To: Jingoo Han, 'Brian Norris'
  Cc: linux-mtd, 'David Woodhouse', avinashphilipk

>From: Jingoo Han [mailto:jg1.han@samsung.com]
>
>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>
>---
> drivers/mtd/devices/elm.c |    4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
>diff --git a/drivers/mtd/devices/elm.c b/drivers/mtd/devices/elm.c
>index d1dd6a3..437ed3a 100644
>--- a/drivers/mtd/devices/elm.c
>+++ b/drivers/mtd/devices/elm.c
>@@ -354,10 +354,8 @@ static int elm_probe(struct platform_device *pdev)
> 	struct elm_info *info;
>
> 	info = devm_kzalloc(&pdev->dev, sizeof(*info), GFP_KERNEL);
>-	if (!info) {
>-		dev_err(&pdev->dev, "failed to allocate memory\n");
>+	if (!info)
> 		return -ENOMEM;
>-	}
>
> 	info->dev = &pdev->dev;
>
>--
>1.7.10.4
>
Acked-by: Pekon Gupta <pekon@ti.com>
+ avinashphilipk@gmail.com

with regards, pekon

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 2/8] mtd: spear_smi: Remove unnecessary OOM messages
  2014-02-06  6:10 ` [PATCH 2/8] mtd: spear_smi: " Jingoo Han
@ 2014-02-07  5:44   ` Viresh Kumar
  0 siblings, 0 replies; 13+ messages in thread
From: Viresh Kumar @ 2014-02-07  5:44 UTC (permalink / raw)
  To: Jingoo Han; +Cc: linux-mtd, Brian Norris, David Woodhouse

On 6 February 2014 11:40, Jingoo Han <jg1.han@samsung.com> wrote:
> 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>
> ---
>  drivers/mtd/devices/spear_smi.c |    2 --
>  1 file changed, 2 deletions(-)
>
> diff --git a/drivers/mtd/devices/spear_smi.c b/drivers/mtd/devices/spear_smi.c
> index 4238214..363da96 100644
> --- a/drivers/mtd/devices/spear_smi.c
> +++ b/drivers/mtd/devices/spear_smi.c
> @@ -913,7 +913,6 @@ static int spear_smi_probe(struct platform_device *pdev)
>         if (np) {
>                 pdata = devm_kzalloc(&pdev->dev, sizeof(*pdata), GFP_KERNEL);
>                 if (!pdata) {
> -                       pr_err("%s: ERROR: no memory", __func__);
>                         ret = -ENOMEM;
>                         goto err;
>                 }
> @@ -943,7 +942,6 @@ static int spear_smi_probe(struct platform_device *pdev)
>         dev = devm_kzalloc(&pdev->dev, sizeof(*dev), GFP_ATOMIC);
>         if (!dev) {
>                 ret = -ENOMEM;
> -               dev_err(&pdev->dev, "mem alloc fail\n");
>                 goto err;
>         }

Acked-by: Viresh Kumar <viresh.kumar@linaro.org>

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 0/8] mtd: Remove unnecessary OOM messages
  2014-02-06  6:07 [PATCH 0/8] mtd: Remove unnecessary OOM messages Jingoo Han
@ 2014-02-11 18:50   ` Brian Norris
  2014-02-06  6:10 ` [PATCH 2/8] mtd: spear_smi: " Jingoo Han
                     ` (7 subsequent siblings)
  8 siblings, 0 replies; 13+ messages in thread
From: Brian Norris @ 2014-02-11 18:50 UTC (permalink / raw)
  To: Jingoo Han; +Cc: 'David Woodhouse', linux-mtd, Linux Kernel

On Thu, Feb 06, 2014 at 03:07:19PM +0900, Jingoo Han wrote:
> The site-specific OOM messages are unnecessary, because they
> duplicate the MM subsystem generic OOM message. For example,
> k.alloc and v.alloc failures use dump_stack().
> 
> Jingoo Han (8):
>       mtd: devices: elm: Remove unnecessary OOM messages
>       mtd: spear_smi: Remove unnecessary OOM messages
>       mtd: pmc551: Remove unnecessary OOM messages
>       mtd: plat-ram: Remove unnecessary OOM messages
>       mtd: lpddr: Remove unnecessary OOM messages
>       mtd: onenand: Remove unnecessary OOM messages
>       mtd: cfi: Remove unnecessary OOM messages
>       mtd: gen_probe: Remove unnecessary OOM messages

Pushed all 8 to l2-mtd.git. Thanks.

Have you ever considered using a tool like coccinelle to do this sort of
work? You send so many of these boilerplate patch series, I would think
it would help everyone to just get them out of the way with scripted
assistance. And you could then more easily catch new introductions if
they slip through the review process.

Brian

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 0/8] mtd: Remove unnecessary OOM messages
@ 2014-02-11 18:50   ` Brian Norris
  0 siblings, 0 replies; 13+ messages in thread
From: Brian Norris @ 2014-02-11 18:50 UTC (permalink / raw)
  To: Jingoo Han; +Cc: linux-mtd, 'David Woodhouse', Linux Kernel

On Thu, Feb 06, 2014 at 03:07:19PM +0900, Jingoo Han wrote:
> The site-specific OOM messages are unnecessary, because they
> duplicate the MM subsystem generic OOM message. For example,
> k.alloc and v.alloc failures use dump_stack().
> 
> Jingoo Han (8):
>       mtd: devices: elm: Remove unnecessary OOM messages
>       mtd: spear_smi: Remove unnecessary OOM messages
>       mtd: pmc551: Remove unnecessary OOM messages
>       mtd: plat-ram: Remove unnecessary OOM messages
>       mtd: lpddr: Remove unnecessary OOM messages
>       mtd: onenand: Remove unnecessary OOM messages
>       mtd: cfi: Remove unnecessary OOM messages
>       mtd: gen_probe: Remove unnecessary OOM messages

Pushed all 8 to l2-mtd.git. Thanks.

Have you ever considered using a tool like coccinelle to do this sort of
work? You send so many of these boilerplate patch series, I would think
it would help everyone to just get them out of the way with scripted
assistance. And you could then more easily catch new introductions if
they slip through the review process.

Brian

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2014-02-11 18:50 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-06  6:07 [PATCH 0/8] mtd: Remove unnecessary OOM messages Jingoo Han
2014-02-06  6:08 ` [PATCH 1/8] mtd: devices: elm: " Jingoo Han
2014-02-06  6:27   ` Gupta, Pekon
2014-02-06  6:10 ` [PATCH 2/8] mtd: spear_smi: " Jingoo Han
2014-02-07  5:44   ` Viresh Kumar
2014-02-06  6:11 ` [PATCH 3/8] mtd: pmc551: " Jingoo Han
2014-02-06  6:12 ` [PATCH 4/8] mtd: plat-ram: " Jingoo Han
2014-02-06  6:14 ` [PATCH 5/8] mtd: lpddr: " Jingoo Han
2014-02-06  6:15 ` [PATCH 6/8] mtd: onenand: " Jingoo Han
2014-02-06  6:19 ` [PATCH 7/8] mtd: cfi: " Jingoo Han
2014-02-06  6:20 ` [PATCH 8/8] mtd: gen_probe: " Jingoo Han
2014-02-11 18:50 ` [PATCH 0/8] mtd: " Brian Norris
2014-02-11 18:50   ` Brian Norris

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.