clocksource: remove unnecessary OOM messages
cover clocksource: 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().
Jingoo Han (4):
clocksource: em_sti: remove unnecessary OOM messages
clocksource: sh_cmt: remove unnecessary OOM messages
clocksource: sh_mtu2: remove unnecessary OOM messages
clocksource: sh_tmu: remove unnecessary OOM messages
--- drivers/clocksource/em_sti.c | 4 +--- drivers/clocksource/sh_cmt.c | 4 +--- drivers/clocksource/sh_mtu2.c | 4 +--- drivers/clocksource/sh_tmu.c | 4 +--- 4 files changed, 4 insertions(+), 12 deletions(-)
PATCH 1/4 clocksource: em_sti: remove unnecessary OOM messages
The site-specific OOM messages are unnecessary, because they duplicate the MM subsystem generic OOM message.
--- drivers/clocksource/em_sti.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/clocksource/em_sti.c +1 -3
@@ -318,10 +318,8 @@ static int em_sti_probe(struct platform_device *pdev)int irq; p =devm_kzalloc (&pdev->dev,sizeof (*p),GFP_KERNEL ); -if (p ==NULL ) { -dev_err (&pdev->dev,"failed to allocate driver data\n" ); +if (p ==NULL )return -ENOMEM ; - } p->pdev = pdev;platform_set_drvdata (pdev, p);
Signature · 1 line
1.7.10.4
Re: [PATCH 1/4] clocksource: em_sti: remove unnecessary OOM messages
Quoted 2 lines · Jingoo Han
The site-specific OOM messages are unnecessary, because they duplicate the MM subsystem generic OOM message.
Are you sure the MM subsys display a message when an allocation fails ?
There are multiple reasons an allocation can fail.
Quoted 22 lines
Signed-off-by Jingoo Han <[email protected]>--- drivers/clocksource/em_sti.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)drivers/clocksource/em_sti.c +1
-3@@ -318,10 +318,8 @@ static int em_sti_probe(struct platform_device *pdev)int irq; p =devm_kzalloc (&pdev->dev,sizeof (*p),GFP_KERNEL ); -if (p ==NULL ) { -dev_err (&pdev->dev,"failed to allocate driver data\n" ); +if (p ==NULL )return -ENOMEM ; - } p->pdev = pdev;platform_set_drvdata (pdev, p);
Signature · 5 lines
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook | <http://twitter.com/#!/linaroorg> Twitter | <http://www.linaro.org/linaro-blog/> Blog
Re: [PATCH 1/4] clocksource: em_sti: remove unnecessary OOM messages
Quoted 7 lines · Daniel Lezcano
Quoted 2 lines · Jingoo Han
The site-specific OOM messages are unnecessary, because they duplicate the MM subsystem generic OOM message.
Are you sure the MM subsys display a message when an allocation fails ?
There are multiple reasons an allocation can fail.
(+cc Viresh Kumar, Laurent Pinchart, Dan Carpenter, Joe Perches,
Thierry Reding, Andrew Morton)
There was a discussion about this in other threads. [1] Please refer to the following link. Thank you.
[1] http://patchwork.ozlabs.org/patch/324158/
Best regards,
Jingoo Han
Quoted 23 lines
Quoted 23 lines
Signed-off-by Jingoo Han <[email protected]>--- drivers/clocksource/em_sti.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)drivers/clocksource/em_sti.c +1
-3@@ -318,10 +318,8 @@ static int em_sti_probe(struct platform_device *pdev)int irq; p =devm_kzalloc (&pdev->dev,sizeof (*p),GFP_KERNEL ); -if (p ==NULL ) { -dev_err (&pdev->dev,"failed to allocate driver data\n" ); +if (p ==NULL )return -ENOMEM ; - } p->pdev = pdev;platform_set_drvdata (pdev, p);
Re: [PATCH 1/4] clocksource: em_sti: remove unnecessary OOM messages
Quoted 9 lines · Jingoo Han
Quoted 7 lines · Daniel Lezcano
Quoted 2 lines · Jingoo Han
The site-specific OOM messages are unnecessary, because they duplicate the MM subsystem generic OOM message.
Are you sure the MM subsys display a message when an allocation fails ?
There are multiple reasons an allocation can fail.
Quoted 8 lines
(+cc Viresh Kumar, Laurent Pinchart, Dan Carpenter, Joe Perches,
Thierry Reding, Andrew Morton)There was a discussion about this in other threads. [1] Please refer to the following link. Thank you.
Yes yes. These are the right things to do, no need to add me to the CC list, Jingoo.
Someone was going to give a talk on removing these as part of their kernel smallification project or something...
regards,
dan carpenter
Re: [PATCH 1/4] clocksource: em_sti: remove unnecessary OOM messages
In reply to Jingoo HanQuoted 9 lines · Jingoo Han
Quoted 7 lines · Daniel Lezcano
Quoted 2 lines · Jingoo Han
The site-specific OOM messages are unnecessary, because they duplicate the MM subsystem generic OOM message.
Are you sure the MM subsys display a message when an allocation fails ?
There are multiple reasons an allocation can fail.
Quoted 7 lines
(+cc Viresh Kumar, Laurent Pinchart, Dan Carpenter, Joe Perches,
Thierry Reding, Andrew Morton)There was a discussion about this in other threads. [1] Please refer to the following link. Thank you.
Ok, thanks for the pointer.
Quoted 23 lines
Quoted 22 lines
Quoted 22 lines
Signed-off-by Jingoo Han <[email protected]>--- drivers/clocksource/em_sti.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)drivers/clocksource/em_sti.c +1
-3@@ -318,10 +318,8 @@ static int em_sti_probe(struct platform_device *pdev)int irq; p =devm_kzalloc (&pdev->dev,sizeof (*p),GFP_KERNEL ); -if (p ==NULL ) { -dev_err (&pdev->dev,"failed to allocate driver data\n" ); +if (p ==NULL )return -ENOMEM ; - } p->pdev = pdev;platform_set_drvdata (pdev, p);
Signature · 5 lines
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook | <http://twitter.com/#!/linaroorg> Twitter | <http://www.linaro.org/linaro-blog/> Blog
PATCH 2/4 clocksource: sh_cmt: remove unnecessary OOM messages
In reply to Jingoo HanThe site-specific OOM messages are unnecessary, because they duplicate the MM subsystem generic OOM message.
--- drivers/clocksource/sh_cmt.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/clocksource/sh_cmt.c +1 -3
@@ -824,10 +824,8 @@ static int sh_cmt_probe(struct platform_device *pdev) } p =kmalloc (sizeof (*p),GFP_KERNEL ); -if (p ==NULL ) { -dev_err (&pdev->dev,"failed to allocate driver data\n" ); +if (p ==NULL )return -ENOMEM ; - } ret =sh_cmt_setup (p, pdev);if (ret) {
Signature · 1 line
1.7.10.4
PATCH 3/4 clocksource: sh_mtu2: remove unnecessary OOM messages
In reply to Jingoo HanThe site-specific OOM messages are unnecessary, because they duplicate the MM subsystem generic OOM message.
--- drivers/clocksource/sh_mtu2.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/clocksource/sh_mtu2.c +1 -3
@@ -349,10 +349,8 @@ static int sh_mtu2_probe(struct platform_device *pdev) } p =kmalloc (sizeof (*p),GFP_KERNEL ); -if (p ==NULL ) { -dev_err (&pdev->dev,"failed to allocate driver data\n" ); +if (p ==NULL )return -ENOMEM ; - } ret =sh_mtu2_setup (p, pdev);if (ret) {
Signature · 1 line
1.7.10.4
PATCH 4/4 clocksource: sh_tmu: remove unnecessary OOM messages
In reply to Jingoo HanThe site-specific OOM messages are unnecessary, because they duplicate the MM subsystem generic OOM message.
--- drivers/clocksource/sh_tmu.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/clocksource/sh_tmu.c +1 -3
@@ -514,10 +514,8 @@ static int sh_tmu_probe(struct platform_device *pdev) } p =kmalloc (sizeof (*p),GFP_KERNEL ); -if (p ==NULL ) { -dev_err (&pdev->dev,"failed to allocate driver data\n" ); +if (p ==NULL )return -ENOMEM ; - } ret =sh_tmu_setup (p, pdev);if (ret) {
Signature · 1 line
1.7.10.4
Daniel Lezcano
AppliedQuoted 10 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().Jingoo Han (4):
clocksource:em_sti: remove unnecessary OOM messages
clocksource:sh_cmt: remove unnecessary OOM messages
clocksource:sh_mtu2: remove unnecessary OOM messages
clocksource:sh_tmu: remove unnecessary OOM messages
Quoted 6 lines
--- drivers/clocksource/em_sti.c | 4 +--- drivers/clocksource/sh_cmt.c | 4 +--- drivers/clocksource/sh_mtu2.c | 4 +--- drivers/clocksource/sh_tmu.c | 4 +--- 4 files changed, 4 insertions(+), 12 deletions(-)
Applied to my tree for 3.16 with some slight changes due to Laurent's changes (kmalloc -> kzalloc).
Thanks !
-- Daniel
Signature · 5 lines
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook | <http://twitter.com/#!/linaroorg> Twitter | <http://www.linaro.org/linaro-blog/> Blog