Skip to contentSkip to conversation

pwm: Remove unnecessary OOM messages

PATCH RESEND In review Jingoo Han 2 participants 11 messages Apr 23, 2014 – Apr 28, 2014

Subsystems (5)
lore
Share & tools
lore

Jingoo Han

author
#0 lore raw

cover pwm: Remove unnecessary OOM messages

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().

These patches were expected to be applied to 3.15-rc1. [1] However, it is not merged yet, so I resend these patches based on 3.15-rc2.

[1] http://www.spinics.net/lists/linux-pwm/msg00976.html

Jingoo Han (9):
pwm: ab8500: Remove unnecessary OOM messages
pwm: i.MX: Remove unnecessary OOM messages
pwm: pxa: Remove unnecessary OOM messages
pwm: renesas-tpu: Remove unnecessary OOM messages
pwm: spear: Remove unnecessary OOM messages
pwm: tegra: Remove unnecessary OOM messages
pwm: pwm-tiecap: Remove unnecessary OOM messages
pwm: tiehrpwm: Remove unnecessary OOM messages
pwm: vt8500: Remove unnecessary OOM messages

---
 drivers/pwm/pwm-ab8500.c      |    4 +---
 drivers/pwm/pwm-imx.c         |    4 +---
 drivers/pwm/pwm-pxa.c         |    4 +---
 drivers/pwm/pwm-renesas-tpu.c |    4 +---
 drivers/pwm/pwm-spear.c       |    4 +---
 drivers/pwm/pwm-tegra.c       |    4 +---
 drivers/pwm/pwm-tiecap.c      |    4 +---
 drivers/pwm/pwm-tiehrpwm.c    |    4 +---
 drivers/pwm/pwm-vt8500.c      |    4 +---
 9 files changed, 9 insertions(+), 27 deletions(-)
author
#1 lore raw

PATCH RESEND 1/9 pwm: ab8500: Remove unnecessary OOM messages

The site-specific OOM messages are unnecessary, because they duplicate the MM subsystem generic OOM message.

---
 drivers/pwm/pwm-ab8500.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/pwm/pwm-ab8500.c +1 -3
index 1d07a6f..9d53e8e 100644
@@ -101,10 +101,8 @@ static int ab8500_pwm_probe(struct platform_device *pdev)
 	 * device which is required for ab8500 read and write
 	 */
 	ab8500 = devm_kzalloc(&pdev->dev, sizeof(*ab8500), GFP_KERNEL);
-	if (ab8500 == NULL) {
-		dev_err(&pdev->dev, "failed to allocate memory\n");
+	if (ab8500 == NULL)
 		return -ENOMEM;
-	}
 
 	ab8500->chip.dev = &pdev->dev;
 	ab8500->chip.ops = &ab8500_pwm_ops;
Signature · 1 line
1.7.10.4
author
#2 lore raw

PATCH RESEND 2/9 pwm: i.MX: Remove unnecessary OOM messages

In reply to Jingoo Han

The site-specific OOM messages are unnecessary, because they duplicate the MM subsystem generic OOM message.

---
 drivers/pwm/pwm-imx.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/pwm/pwm-imx.c +1 -3
index cc47733..d797c7b 100644
@@ -241,10 +241,8 @@ static int imx_pwm_probe(struct platform_device *pdev)
 		return -ENODEV;
 
 	imx = devm_kzalloc(&pdev->dev, sizeof(*imx), GFP_KERNEL);
-	if (imx == NULL) {
-		dev_err(&pdev->dev, "failed to allocate memory\n");
+	if (imx == NULL)
 		return -ENOMEM;
-	}
 
 	imx->clk_per = devm_clk_get(&pdev->dev, "per");
 	if (IS_ERR(imx->clk_per)) {
Signature · 1 line
1.7.10.4
author
#3 lore raw

PATCH RESEND 3/9 pwm: pxa: Remove unnecessary OOM messages

In reply to Jingoo Han

The site-specific OOM messages are unnecessary, because they duplicate the MM subsystem generic OOM message.

---
 drivers/pwm/pwm-pxa.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/pwm/pwm-pxa.c +1 -3
index cd356d8..0b312ec 100644
@@ -179,10 +179,8 @@ static int pwm_probe(struct platform_device *pdev)
 		return -EINVAL;
 
 	pwm = devm_kzalloc(&pdev->dev, sizeof(*pwm), GFP_KERNEL);
-	if (pwm == NULL) {
-		dev_err(&pdev->dev, "failed to allocate memory\n");
+	if (pwm == NULL)
 		return -ENOMEM;
-	}
 
 	pwm->clk = devm_clk_get(&pdev->dev, NULL);
 	if (IS_ERR(pwm->clk))
Signature · 1 line
1.7.10.4
author
#4 lore raw

PATCH RESEND 4/9 pwm: renesas-tpu: Remove unnecessary OOM messages

In reply to Jingoo Han

The site-specific OOM messages are unnecessary, because they duplicate the MM subsystem generic OOM message.

---
 drivers/pwm/pwm-renesas-tpu.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/pwm/pwm-renesas-tpu.c +1 -3
index aff6ba9..cc13ff4 100644
@@ -405,10 +405,8 @@ static int tpu_probe(struct platform_device *pdev)
 	int ret;
 
 	tpu = devm_kzalloc(&pdev->dev, sizeof(*tpu), GFP_KERNEL);
-	if (tpu == NULL) {
-		dev_err(&pdev->dev, "failed to allocate driver data\n");
+	if (tpu == NULL)
 		return -ENOMEM;
-	}
 
 	spin_lock_init(&tpu->lock);
 	tpu->pdev = pdev;
Signature · 1 line
1.7.10.4
author
#5 lore raw

PATCH RESEND 5/9 pwm: spear: Remove unnecessary OOM messages

In reply to Jingoo Han

The site-specific OOM messages are unnecessary, because they duplicate the MM subsystem generic OOM message.

---
 drivers/pwm/pwm-spear.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/pwm/pwm-spear.c +1 -3
index cb2d4f0..2daf3a1 100644
@@ -179,10 +179,8 @@ static int spear_pwm_probe(struct platform_device *pdev)
 	u32 val;
 
 	pc = devm_kzalloc(&pdev->dev, sizeof(*pc), GFP_KERNEL);
-	if (!pc) {
-		dev_err(&pdev->dev, "failed to allocate memory\n");
+	if (!pc)
 		return -ENOMEM;
-	}
 
 	r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
 	pc->mmio_base = devm_ioremap_resource(&pdev->dev, r);
Signature · 1 line
1.7.10.4
author
#6 lore raw

PATCH RESEND 6/9 pwm: tegra: Remove unnecessary OOM messages

In reply to Jingoo Han

The site-specific OOM messages are unnecessary, because they duplicate the MM subsystem generic OOM message.

---
 drivers/pwm/pwm-tegra.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/pwm/pwm-tegra.c +1 -3
index 74298c5..61d86b9 100644
@@ -173,10 +173,8 @@ static int tegra_pwm_probe(struct platform_device *pdev)
 	int ret;
 
 	pwm = devm_kzalloc(&pdev->dev, sizeof(*pwm), GFP_KERNEL);
-	if (!pwm) {
-		dev_err(&pdev->dev, "failed to allocate memory\n");
+	if (!pwm)
 		return -ENOMEM;
-	}
 
 	pwm->dev = &pdev->dev;
 
Signature · 1 line
1.7.10.4
author
#7 lore raw

PATCH RESEND 7/9 pwm: pwm-tiecap: Remove unnecessary OOM messages

In reply to Jingoo Han

The site-specific OOM messages are unnecessary, because they duplicate the MM subsystem generic OOM message.

---
 drivers/pwm/pwm-tiecap.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/pwm/pwm-tiecap.c +1 -3
index 032092c..74efbe7 100644
@@ -209,10 +209,8 @@ static int ecap_pwm_probe(struct platform_device *pdev)
 	u16 status;
 
 	pc = devm_kzalloc(&pdev->dev, sizeof(*pc), GFP_KERNEL);
-	if (!pc) {
-		dev_err(&pdev->dev, "failed to allocate memory\n");
+	if (!pc)
 		return -ENOMEM;
-	}
 
 	clk = devm_clk_get(&pdev->dev, "fck");
 	if (IS_ERR(clk)) {
Signature · 1 line
1.7.10.4
author
#8 lore raw

PATCH RESEND 8/9 pwm: tiehrpwm: Remove unnecessary OOM messages

In reply to Jingoo Han

The site-specific OOM messages are unnecessary, because they duplicate the MM subsystem generic OOM message.

---
 drivers/pwm/pwm-tiehrpwm.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/pwm/pwm-tiehrpwm.c +1 -3
index aee4471..3a31c08 100644
@@ -440,10 +440,8 @@ static int ehrpwm_pwm_probe(struct platform_device *pdev)
 	u16 status;
 
 	pc = devm_kzalloc(&pdev->dev, sizeof(*pc), GFP_KERNEL);
-	if (!pc) {
-		dev_err(&pdev->dev, "failed to allocate memory\n");
+	if (!pc)
 		return -ENOMEM;
-	}
 
 	clk = devm_clk_get(&pdev->dev, "fck");
 	if (IS_ERR(clk)) {
Signature · 1 line
1.7.10.4
author
#9 lore raw

PATCH RESEND 9/9 pwm: vt8500: Remove unnecessary OOM messages

In reply to Jingoo Han

The site-specific OOM messages are unnecessary, because they duplicate the MM subsystem generic OOM message.

---
 drivers/pwm/pwm-vt8500.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/pwm/pwm-vt8500.c +1 -3
index 323125a..652e6b5 100644
@@ -211,10 +211,8 @@ static int vt8500_pwm_probe(struct platform_device *pdev)
 	}
 
 	chip = devm_kzalloc(&pdev->dev, sizeof(*chip), GFP_KERNEL);
-	if (chip == NULL) {
-		dev_err(&pdev->dev, "failed to allocate memory\n");
+	if (chip == NULL)
 		return -ENOMEM;
-	}
 
 	chip->chip.dev = &pdev->dev;
 	chip->chip.ops = &vt8500_pwm_ops;
Signature · 1 line
1.7.10.4
#10 lore raw
In reply to Jingoo Han
Quoted 21 lines · Jingoo Han

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().

These patches were expected to be applied to 3.15-rc1. [1] However, it is not merged yet, so I resend these patches based on 3.15-rc2.

[1] http://www.spinics.net/lists/linux-pwm/msg00976.html

Jingoo Han (9):
pwm: ab8500: Remove unnecessary OOM messages
pwm: i.MX: Remove unnecessary OOM messages
pwm: pxa: Remove unnecessary OOM messages
pwm: renesas-tpu: Remove unnecessary OOM messages
pwm: spear: Remove unnecessary OOM messages
pwm: tegra: Remove unnecessary OOM messages
pwm: pwm-tiecap: Remove unnecessary OOM messages
pwm: tiehrpwm: Remove unnecessary OOM messages
pwm: vt8500: Remove unnecessary OOM messages

Quoted 11 lines
---
 drivers/pwm/pwm-ab8500.c      |    4 +---
 drivers/pwm/pwm-imx.c         |    4 +---
 drivers/pwm/pwm-pxa.c         |    4 +---
 drivers/pwm/pwm-renesas-tpu.c |    4 +---
 drivers/pwm/pwm-spear.c       |    4 +---
 drivers/pwm/pwm-tegra.c       |    4 +---
 drivers/pwm/pwm-tiecap.c      |    4 +---
 drivers/pwm/pwm-tiehrpwm.c    |    4 +---
 drivers/pwm/pwm-vt8500.c      |    4 +---
 9 files changed, 9 insertions(+), 27 deletions(-)

All 9 patches applied, thanks.

Thierry