* [PATCH 1/9] pwm: ab8500: Remove unnecessary OOM messages
2014-02-26 0:59 [PATCH 0/9] pwm: Remove unnecessary OOM messages Jingoo Han
@ 2014-02-26 1:02 ` Jingoo Han
2014-02-26 1:04 ` [PATCH 2/9] pwm: i.MX: " Jingoo Han
` (7 subsequent siblings)
8 siblings, 0 replies; 28+ messages in thread
From: Jingoo Han @ 2014-02-26 1:02 UTC (permalink / raw)
To: 'Thierry Reding'
Cc: linux-pwm, 'Jingoo Han', 'Arun Murthy'
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/pwm/pwm-ab8500.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/pwm/pwm-ab8500.c b/drivers/pwm/pwm-ab8500.c
index 1d07a6f..9d53e8e 100644
--- a/drivers/pwm/pwm-ab8500.c
+++ b/drivers/pwm/pwm-ab8500.c
@@ -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;
--
1.7.10.4
^ permalink raw reply related [flat|nested] 28+ messages in thread* [PATCH 2/9] pwm: i.MX: Remove unnecessary OOM messages
2014-02-26 0:59 [PATCH 0/9] pwm: Remove unnecessary OOM messages Jingoo Han
2014-02-26 1:02 ` [PATCH 1/9] pwm: ab8500: " Jingoo Han
@ 2014-02-26 1:04 ` Jingoo Han
2014-02-26 1:06 ` [PATCH 3/9] pwm: pxa: " Jingoo Han
` (6 subsequent siblings)
8 siblings, 0 replies; 28+ messages in thread
From: Jingoo Han @ 2014-02-26 1:04 UTC (permalink / raw)
To: 'Thierry Reding'
Cc: linux-pwm, 'Jingoo Han', 'Sascha Hauer'
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/pwm/pwm-imx.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/pwm/pwm-imx.c b/drivers/pwm/pwm-imx.c
index cc47733..d797c7b 100644
--- a/drivers/pwm/pwm-imx.c
+++ b/drivers/pwm/pwm-imx.c
@@ -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)) {
--
1.7.10.4
^ permalink raw reply related [flat|nested] 28+ messages in thread* [PATCH 3/9] pwm: pxa: Remove unnecessary OOM messages
2014-02-26 0:59 [PATCH 0/9] pwm: Remove unnecessary OOM messages Jingoo Han
2014-02-26 1:02 ` [PATCH 1/9] pwm: ab8500: " Jingoo Han
2014-02-26 1:04 ` [PATCH 2/9] pwm: i.MX: " Jingoo Han
@ 2014-02-26 1:06 ` Jingoo Han
2014-02-26 1:08 ` [PATCH 4/9] pwm: renesas-tpu: " Jingoo Han
` (5 subsequent siblings)
8 siblings, 0 replies; 28+ messages in thread
From: Jingoo Han @ 2014-02-26 1:06 UTC (permalink / raw)
To: 'Thierry Reding'
Cc: linux-pwm, 'Jingoo Han', 'Eric Miao',
'Mike Dunn'
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/pwm/pwm-pxa.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/pwm/pwm-pxa.c b/drivers/pwm/pwm-pxa.c
index 8d99573..f1e8692 100644
--- a/drivers/pwm/pwm-pxa.c
+++ b/drivers/pwm/pwm-pxa.c
@@ -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))
--
1.7.10.4
^ permalink raw reply related [flat|nested] 28+ messages in thread* [PATCH 4/9] pwm: renesas-tpu: Remove unnecessary OOM messages
2014-02-26 0:59 [PATCH 0/9] pwm: Remove unnecessary OOM messages Jingoo Han
` (2 preceding siblings ...)
2014-02-26 1:06 ` [PATCH 3/9] pwm: pxa: " Jingoo Han
@ 2014-02-26 1:08 ` Jingoo Han
2014-02-26 2:22 ` Laurent Pinchart
2014-02-26 1:09 ` [PATCH 5/9] pwm: spear: " Jingoo Han
` (4 subsequent siblings)
8 siblings, 1 reply; 28+ messages in thread
From: Jingoo Han @ 2014-02-26 1:08 UTC (permalink / raw)
To: 'Thierry Reding'
Cc: linux-pwm, 'Jingoo Han', 'Laurent Pinchart',
'Simon Horman'
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/pwm/pwm-renesas-tpu.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/pwm/pwm-renesas-tpu.c b/drivers/pwm/pwm-renesas-tpu.c
index aff6ba9..cc13ff4 100644
--- a/drivers/pwm/pwm-renesas-tpu.c
+++ b/drivers/pwm/pwm-renesas-tpu.c
@@ -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;
--
1.7.10.4
^ permalink raw reply related [flat|nested] 28+ messages in thread* Re: [PATCH 4/9] pwm: renesas-tpu: Remove unnecessary OOM messages
2014-02-26 1:08 ` [PATCH 4/9] pwm: renesas-tpu: " Jingoo Han
@ 2014-02-26 2:22 ` Laurent Pinchart
2014-02-26 2:34 ` Jingoo Han
0 siblings, 1 reply; 28+ messages in thread
From: Laurent Pinchart @ 2014-02-26 2:22 UTC (permalink / raw)
To: Jingoo Han
Cc: 'Thierry Reding', linux-pwm, 'Laurent Pinchart',
'Simon Horman'
Hi Jingoo,
Thank you for the patch.
On Wednesday 26 February 2014 10:08:10 Jingoo Han wrote:
> The site-specific OOM messages are unnecessary, because they
> duplicate the MM subsystem generic OOM message.
While an allocation failure for such a small piece of memory will mean that
we're in trouble far too big for an error message to matter, have you made
sure that all devm_kzalloc() error paths lead to an OOM message being printed
?
> Signed-off-by: Jingoo Han <jg1.han@samsung.com>
> ---
> drivers/pwm/pwm-renesas-tpu.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/pwm/pwm-renesas-tpu.c b/drivers/pwm/pwm-renesas-tpu.c
> index aff6ba9..cc13ff4 100644
> --- a/drivers/pwm/pwm-renesas-tpu.c
> +++ b/drivers/pwm/pwm-renesas-tpu.c
> @@ -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;
--
Regards,
Laurent Pinchart
^ permalink raw reply [flat|nested] 28+ messages in thread* Re: [PATCH 4/9] pwm: renesas-tpu: Remove unnecessary OOM messages
2014-02-26 2:22 ` Laurent Pinchart
@ 2014-02-26 2:34 ` Jingoo Han
2014-02-26 22:02 ` Laurent Pinchart
0 siblings, 1 reply; 28+ messages in thread
From: Jingoo Han @ 2014-02-26 2:34 UTC (permalink / raw)
To: 'Joe Perches', 'Andrew Morton',
'Laurent Pinchart'
Cc: 'Thierry Reding', linux-pwm, 'Laurent Pinchart',
'Simon Horman', 'Jingoo Han'
On Wednesday, February 26, 2014 11:22 AM, Laurent Pinchart wrote:
> On Wednesday 26 February 2014 10:08:10 Jingoo Han wrote:
> > The site-specific OOM messages are unnecessary, because they
> > duplicate the MM subsystem generic OOM message.
>
> While an allocation failure for such a small piece of memory will mean that
> we're in trouble far too big for an error message to matter, have you made
> sure that all devm_kzalloc() error paths lead to an OOM message being printed
> ?
(+cc Joe Perches, Andrew Morton)
Hi Laurent Pinchart,
Long time no see! Thank you for your comment.
I am not sure that I understand your question exactly.
I believe that all devm_kzalloc() error paths lead to
an OOM message being printed, because k.alloc and v.alloc
failures use dump_stack().
Joe Perches,
Would you add some comments on this?
If I am wrong, please let me know.
Best regards,
Jingoo Han
>
> > Signed-off-by: Jingoo Han <jg1.han@samsung.com>
> > ---
> > drivers/pwm/pwm-renesas-tpu.c | 4 +---
> > 1 file changed, 1 insertion(+), 3 deletions(-)
> >
> > diff --git a/drivers/pwm/pwm-renesas-tpu.c b/drivers/pwm/pwm-renesas-tpu.c
> > index aff6ba9..cc13ff4 100644
> > --- a/drivers/pwm/pwm-renesas-tpu.c
> > +++ b/drivers/pwm/pwm-renesas-tpu.c
> > @@ -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;
^ permalink raw reply [flat|nested] 28+ messages in thread* Re: [PATCH 4/9] pwm: renesas-tpu: Remove unnecessary OOM messages
2014-02-26 2:34 ` Jingoo Han
@ 2014-02-26 22:02 ` Laurent Pinchart
0 siblings, 0 replies; 28+ messages in thread
From: Laurent Pinchart @ 2014-02-26 22:02 UTC (permalink / raw)
To: Jingoo Han
Cc: 'Joe Perches', 'Andrew Morton',
'Thierry Reding', linux-pwm, 'Laurent Pinchart',
'Simon Horman'
Hi Jingoo,
On Wednesday 26 February 2014 11:34:54 Jingoo Han wrote:
> On Wednesday, February 26, 2014 11:22 AM, Laurent Pinchart wrote:
> > On Wednesday 26 February 2014 10:08:10 Jingoo Han wrote:
> > > The site-specific OOM messages are unnecessary, because they
> > > duplicate the MM subsystem generic OOM message.
> >
> > While an allocation failure for such a small piece of memory will mean
> > that we're in trouble far too big for an error message to matter, have you
> > made sure that all devm_kzalloc() error paths lead to an OOM message being
> > printed ?
>
> (+cc Joe Perches, Andrew Morton)
>
> Hi Laurent Pinchart,
> Long time no see! Thank you for your comment.
You're welcome.
> I am not sure that I understand your question exactly.
> I believe that all devm_kzalloc() error paths lead to
> an OOM message being printed, because k.alloc and v.alloc
> failures use dump_stack().
There's so many error code paths in the slab allocator that I got a bit lost,
I was just wondering if all of them ended up with a message being printed.
It's very probably needless worrying from my side.
> Joe Perches,
> Would you add some comments on this?
> If I am wrong, please let me know.
>
> Best regards,
> Jingoo Han
>
> > > Signed-off-by: Jingoo Han <jg1.han@samsung.com>
> > > ---
> > >
> > > drivers/pwm/pwm-renesas-tpu.c | 4 +---
> > > 1 file changed, 1 insertion(+), 3 deletions(-)
> > >
> > > diff --git a/drivers/pwm/pwm-renesas-tpu.c
> > > b/drivers/pwm/pwm-renesas-tpu.c
> > > index aff6ba9..cc13ff4 100644
> > > --- a/drivers/pwm/pwm-renesas-tpu.c
> > > +++ b/drivers/pwm/pwm-renesas-tpu.c
> > > @@ -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;
--
Regards,
Laurent Pinchart
^ permalink raw reply [flat|nested] 28+ messages in thread
* [PATCH 5/9] pwm: spear: Remove unnecessary OOM messages
2014-02-26 0:59 [PATCH 0/9] pwm: Remove unnecessary OOM messages Jingoo Han
` (3 preceding siblings ...)
2014-02-26 1:08 ` [PATCH 4/9] pwm: renesas-tpu: " Jingoo Han
@ 2014-02-26 1:09 ` Jingoo Han
2014-02-26 4:49 ` Viresh Kumar
2014-02-26 1:10 ` [PATCH 6/9] pwm: tegra: " Jingoo Han
` (3 subsequent siblings)
8 siblings, 1 reply; 28+ messages in thread
From: Jingoo Han @ 2014-02-26 1:09 UTC (permalink / raw)
To: 'Thierry Reding'
Cc: linux-pwm, 'Jingoo Han', 'Viresh Kumar',
'Shiraz Hashim'
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/pwm/pwm-spear.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/pwm/pwm-spear.c b/drivers/pwm/pwm-spear.c
index 8ad26b8..b4f6d0d 100644
--- a/drivers/pwm/pwm-spear.c
+++ b/drivers/pwm/pwm-spear.c
@@ -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);
--
1.7.10.4
^ permalink raw reply related [flat|nested] 28+ messages in thread* Re: [PATCH 5/9] pwm: spear: Remove unnecessary OOM messages
2014-02-26 1:09 ` [PATCH 5/9] pwm: spear: " Jingoo Han
@ 2014-02-26 4:49 ` Viresh Kumar
2014-02-26 4:57 ` Jingoo Han
0 siblings, 1 reply; 28+ messages in thread
From: Viresh Kumar @ 2014-02-26 4:49 UTC (permalink / raw)
To: Jingoo Han; +Cc: Thierry Reding, linux-pwm, Shiraz Hashim
On 26 February 2014 06:39, 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/pwm/pwm-spear.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/pwm/pwm-spear.c b/drivers/pwm/pwm-spear.c
> index 8ad26b8..b4f6d0d 100644
> --- a/drivers/pwm/pwm-spear.c
> +++ b/drivers/pwm/pwm-spear.c
> @@ -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");
Can you please pin point which/file line will print similar message ?
^ permalink raw reply [flat|nested] 28+ messages in thread* Re: [PATCH 5/9] pwm: spear: Remove unnecessary OOM messages
2014-02-26 4:49 ` Viresh Kumar
@ 2014-02-26 4:57 ` Jingoo Han
2014-02-26 5:10 ` Viresh Kumar
0 siblings, 1 reply; 28+ messages in thread
From: Jingoo Han @ 2014-02-26 4:57 UTC (permalink / raw)
To: 'Viresh Kumar'
Cc: 'Thierry Reding', linux-pwm, 'Shiraz Hashim',
'Jingoo Han', 'Joe Perches',
'Andrew Morton'
On Wednesday, February 26, 2014 1:49 PM, Viresh Kumar wrote:
> On 26 February 2014 06:39, 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/pwm/pwm-spear.c | 4 +---
> > 1 file changed, 1 insertion(+), 3 deletions(-)
> >
> > diff --git a/drivers/pwm/pwm-spear.c b/drivers/pwm/pwm-spear.c
> > index 8ad26b8..b4f6d0d 100644
> > --- a/drivers/pwm/pwm-spear.c
> > +++ b/drivers/pwm/pwm-spear.c
> > @@ -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");
>
> Can you please pin point which/file line will print similar message ?
(+cc Joe Perches, Andrew Morton)
Sorry, I cannot pin point the exact file line.
As far as I know, the similar message will be printed,
because k.alloc and v.alloc failures use dump_stack().
Best regards,
Jingoo Han
^ permalink raw reply [flat|nested] 28+ messages in thread* Re: [PATCH 5/9] pwm: spear: Remove unnecessary OOM messages
2014-02-26 4:57 ` Jingoo Han
@ 2014-02-26 5:10 ` Viresh Kumar
2014-02-26 5:19 ` Joe Perches
0 siblings, 1 reply; 28+ messages in thread
From: Viresh Kumar @ 2014-02-26 5:10 UTC (permalink / raw)
To: Jingoo Han; +Cc: Thierry Reding, linux-pwm, Joe Perches, Andrew Morton
On 26 February 2014 10:27, Jingoo Han <jg1.han@samsung.com> wrote:
> On Wednesday, February 26, 2014 1:49 PM, Viresh Kumar wrote:
>> On 26 February 2014 06:39, 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/pwm/pwm-spear.c | 4 +---
>> > 1 file changed, 1 insertion(+), 3 deletions(-)
>> >
>> > diff --git a/drivers/pwm/pwm-spear.c b/drivers/pwm/pwm-spear.c
>> > index 8ad26b8..b4f6d0d 100644
>> > --- a/drivers/pwm/pwm-spear.c
>> > +++ b/drivers/pwm/pwm-spear.c
>> > @@ -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");
>>
>> Can you please pin point which/file line will print similar message ?
>
> (+cc Joe Perches, Andrew Morton)
>
> Sorry, I cannot pin point the exact file line.
> As far as I know, the similar message will be printed,
> because k.alloc and v.alloc failures use dump_stack().
I have tried tracing calls here and I am unable to find
any such prints from these routines for majority of
failure paths. So its better somebody tells me that I am
wrong here :)
^ permalink raw reply [flat|nested] 28+ messages in thread* Re: [PATCH 5/9] pwm: spear: Remove unnecessary OOM messages
2014-02-26 5:10 ` Viresh Kumar
@ 2014-02-26 5:19 ` Joe Perches
2014-02-26 6:26 ` Viresh Kumar
0 siblings, 1 reply; 28+ messages in thread
From: Joe Perches @ 2014-02-26 5:19 UTC (permalink / raw)
To: Viresh Kumar; +Cc: Jingoo Han, Thierry Reding, linux-pwm, Andrew Morton
On Wed, 2014-02-26 at 10:40 +0530, Viresh Kumar wrote:
> On 26 February 2014 10:27, Jingoo Han <jg1.han@samsung.com> wrote:
> > On Wednesday, February 26, 2014 1:49 PM, Viresh Kumar wrote:
> >> On 26 February 2014 06:39, 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/pwm/pwm-spear.c | 4 +---
> >> > 1 file changed, 1 insertion(+), 3 deletions(-)
> >> >
> >> > diff --git a/drivers/pwm/pwm-spear.c b/drivers/pwm/pwm-spear.c
> >> > index 8ad26b8..b4f6d0d 100644
> >> > --- a/drivers/pwm/pwm-spear.c
> >> > +++ b/drivers/pwm/pwm-spear.c
> >> > @@ -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");
> >>
> >> Can you please pin point which/file line will print similar message ?
> >
> > (+cc Joe Perches, Andrew Morton)
> >
> > Sorry, I cannot pin point the exact file line.
> > As far as I know, the similar message will be printed,
> > because k.alloc and v.alloc failures use dump_stack().
>
> I have tried tracing calls here and I am unable to find
> any such prints from these routines for majority of
> failure paths. So its better somebody tells me that I am
> wrong here :)
Look at warn_alloc_failed() in mm/page_alloc.c
^ permalink raw reply [flat|nested] 28+ messages in thread* Re: [PATCH 5/9] pwm: spear: Remove unnecessary OOM messages
2014-02-26 5:19 ` Joe Perches
@ 2014-02-26 6:26 ` Viresh Kumar
2014-03-03 1:14 ` Jingoo Han
0 siblings, 1 reply; 28+ messages in thread
From: Viresh Kumar @ 2014-02-26 6:26 UTC (permalink / raw)
To: Joe Perches; +Cc: Jingoo Han, Thierry Reding, linux-pwm, Andrew Morton
On 26 February 2014 10:49, Joe Perches <joe@perches.com> wrote:
> Look at warn_alloc_failed() in mm/page_alloc.c
Okay, there is a print there. But I am not able to reach to this routine
from devm_kzalloc().
devm_kzalloc() <linux/device.h>
devm_kmalloc() <drivers/base/devres.c>
alloc_dr() <drivers/base/devres.c>
kmalloc_track_caller() <linux/slab.h>
__kmalloc_track_caller() <mm/slab,slub/slob.c> Taking slab as example:
__do_kmalloc() <mm/slab.c>
...
I can see cases where NULL is returned after above paths and the function
you mentioned wasn't there. So, I am not sure that we will get a print for sure
for any error that might occur from devm_kzalloc().
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH 5/9] pwm: spear: Remove unnecessary OOM messages
2014-02-26 6:26 ` Viresh Kumar
@ 2014-03-03 1:14 ` Jingoo Han
2014-03-03 9:53 ` Dan Carpenter
0 siblings, 1 reply; 28+ messages in thread
From: Jingoo Han @ 2014-03-03 1:14 UTC (permalink / raw)
To: 'Viresh Kumar', 'Joe Perches'
Cc: 'Thierry Reding', linux-pwm, 'Andrew Morton',
'Laurent Pinchart', 'Dan Carpenter',
'Jingoo Han'
On Wednesday, February 26, 2014 3:26 PM, Viresh Kumar wrote:
> On 26 February 2014 10:49, Joe Perches <joe@perches.com> wrote:
> > Look at warn_alloc_failed() in mm/page_alloc.c
>
> Okay, there is a print there. But I am not able to reach to this routine
> from devm_kzalloc().
>
> devm_kzalloc() <linux/device.h>
> devm_kmalloc() <drivers/base/devres.c>
> alloc_dr() <drivers/base/devres.c>
> kmalloc_track_caller() <linux/slab.h>
> __kmalloc_track_caller() <mm/slab,slub/slob.c> Taking slab as example:
> __do_kmalloc() <mm/slab.c>
(+CC Laurent Pinchart, Dan Carpenter)
Right, I also cannot find that warn_alloc_failed() is called, during
devm_kzalloc().
However, in the case of vmalloc(), warn_alloc_failed() is called
as below.
./mm/vmalloc.c
vmalloc()
__vmalloc_node_flags()
__vmalloc_node()
__vmalloc_node_range()
./mm/page_alloc.c
warn_alloc_failed()
> ...
>
> I can see cases where NULL is returned after above paths and the function
> you mentioned wasn't there. So, I am not sure that we will get a print for sure
> for any error that might occur from devm_kzalloc().
I guess that slab_out_of_memory() <./mm/slub.c> may print it for any errors.
But, I am not sure. :-(
Joe Perches,
Would you confirm this?
Best regards,
Jingoo Han
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH 5/9] pwm: spear: Remove unnecessary OOM messages
2014-03-03 1:14 ` Jingoo Han
@ 2014-03-03 9:53 ` Dan Carpenter
2014-03-05 11:00 ` Laurent Pinchart
0 siblings, 1 reply; 28+ messages in thread
From: Dan Carpenter @ 2014-03-03 9:53 UTC (permalink / raw)
To: Jingoo Han
Cc: 'Viresh Kumar', 'Joe Perches',
'Thierry Reding', linux-pwm, 'Andrew Morton',
'Laurent Pinchart'
On Mon, Mar 03, 2014 at 10:14:22AM +0900, Jingoo Han wrote:
> On Wednesday, February 26, 2014 3:26 PM, Viresh Kumar wrote:
> > On 26 February 2014 10:49, Joe Perches <joe@perches.com> wrote:
> > > Look at warn_alloc_failed() in mm/page_alloc.c
> >
> > Okay, there is a print there. But I am not able to reach to this routine
> > from devm_kzalloc().
> >
> > devm_kzalloc() <linux/device.h>
> > devm_kmalloc() <drivers/base/devres.c>
> > alloc_dr() <drivers/base/devres.c>
> > kmalloc_track_caller() <linux/slab.h>
> > __kmalloc_track_caller() <mm/slab,slub/slob.c> Taking slab as example:
> > __do_kmalloc() <mm/slab.c>
>
> (+CC Laurent Pinchart, Dan Carpenter)
>
> Right, I also cannot find that warn_alloc_failed() is called, during
> devm_kzalloc().
>
> However, in the case of vmalloc(), warn_alloc_failed() is called
> as below.
>
> ./mm/vmalloc.c
> vmalloc()
> __vmalloc_node_flags()
> __vmalloc_node()
> __vmalloc_node_range()
>
> ./mm/page_alloc.c
> warn_alloc_failed()
>
> > ...
> >
> > I can see cases where NULL is returned after above paths and the function
> > you mentioned wasn't there. So, I am not sure that we will get a print for sure
> > for any error that might occur from devm_kzalloc().
>
> I guess that slab_out_of_memory() <./mm/slub.c> may print it for any errors.
> But, I am not sure. :-(
>
devm_kzalloc() is just kmalloc(). The OOM error messages are the same.
regards,
dan carpenter
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH 5/9] pwm: spear: Remove unnecessary OOM messages
2014-03-03 9:53 ` Dan Carpenter
@ 2014-03-05 11:00 ` Laurent Pinchart
2014-03-05 11:40 ` Dan Carpenter
2014-03-05 16:17 ` Viresh Kumar
0 siblings, 2 replies; 28+ messages in thread
From: Laurent Pinchart @ 2014-03-05 11:00 UTC (permalink / raw)
To: Dan Carpenter
Cc: Jingoo Han, 'Viresh Kumar', 'Joe Perches',
'Thierry Reding', linux-pwm, 'Andrew Morton'
Hi Dan,
On Monday 03 March 2014 12:53:11 Dan Carpenter wrote:
> On Mon, Mar 03, 2014 at 10:14:22AM +0900, Jingoo Han wrote:
> > On Wednesday, February 26, 2014 3:26 PM, Viresh Kumar wrote:
> > > On 26 February 2014 10:49, Joe Perches <joe@perches.com> wrote:
> > > > Look at warn_alloc_failed() in mm/page_alloc.c
> > >
> > > Okay, there is a print there. But I am not able to reach to this routine
> > > from devm_kzalloc().
> > >
> > > devm_kzalloc() <linux/device.h>
> > > devm_kmalloc() <drivers/base/devres.c>
> > > alloc_dr() <drivers/base/devres.c>
> > > kmalloc_track_caller() <linux/slab.h>
> > > __kmalloc_track_caller() <mm/slab,slub/slob.c> Taking slab as example:
> > > __do_kmalloc() <mm/slab.c>
> >
> > (+CC Laurent Pinchart, Dan Carpenter)
> >
> > Right, I also cannot find that warn_alloc_failed() is called, during
> > devm_kzalloc().
> >
> > However, in the case of vmalloc(), warn_alloc_failed() is called
> > as below.
> >
> > ./mm/vmalloc.c
> > vmalloc()
> > __vmalloc_node_flags()
> > __vmalloc_node()
> > __vmalloc_node_range()
> >
> > ./mm/page_alloc.c
> > warn_alloc_failed()
> >
> > > ...
> > >
> > > I can see cases where NULL is returned after above paths and the
> > > function you mentioned wasn't there. So, I am not sure that we will get
> > > a print for sure for any error that might occur from devm_kzalloc().
> >
> > I guess that slab_out_of_memory() <./mm/slub.c> may print it for any
> > errors. But, I am not sure. :-(
>
> devm_kzalloc() is just kmalloc(). The OOM error messages are the same.
Sure, but I wasn't sure whether all error code paths in kmalloc() resulted in
an OOM message. For instance, the following code path results in an allocation
failure but doesn't seem to print an OOM message:
kmalloc
__kmalloc
__do_kmalloc
slab_alloc
slab_should_failslab
should_failslab
should_fail
A bit far-fetched possibly as it requires fault injection. I haven't found any
other such code path, but my understanding of that code is a bit limited.
--
Regards,
Laurent Pinchart
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH 5/9] pwm: spear: Remove unnecessary OOM messages
2014-03-05 11:00 ` Laurent Pinchart
@ 2014-03-05 11:40 ` Dan Carpenter
2014-03-05 16:17 ` Viresh Kumar
1 sibling, 0 replies; 28+ messages in thread
From: Dan Carpenter @ 2014-03-05 11:40 UTC (permalink / raw)
To: Laurent Pinchart
Cc: Jingoo Han, 'Viresh Kumar', 'Joe Perches',
'Thierry Reding', linux-pwm, 'Andrew Morton'
On Wed, Mar 05, 2014 at 12:00:42PM +0100, Laurent Pinchart wrote:
> Hi Dan,
>
> On Monday 03 March 2014 12:53:11 Dan Carpenter wrote:
> > On Mon, Mar 03, 2014 at 10:14:22AM +0900, Jingoo Han wrote:
> > > On Wednesday, February 26, 2014 3:26 PM, Viresh Kumar wrote:
> > > > On 26 February 2014 10:49, Joe Perches <joe@perches.com> wrote:
> > > > > Look at warn_alloc_failed() in mm/page_alloc.c
> > > >
> > > > Okay, there is a print there. But I am not able to reach to this routine
> > > > from devm_kzalloc().
> > > >
> > > > devm_kzalloc() <linux/device.h>
> > > > devm_kmalloc() <drivers/base/devres.c>
> > > > alloc_dr() <drivers/base/devres.c>
> > > > kmalloc_track_caller() <linux/slab.h>
> > > > __kmalloc_track_caller() <mm/slab,slub/slob.c> Taking slab as example:
> > > > __do_kmalloc() <mm/slab.c>
> > >
> > > (+CC Laurent Pinchart, Dan Carpenter)
> > >
> > > Right, I also cannot find that warn_alloc_failed() is called, during
> > > devm_kzalloc().
> > >
> > > However, in the case of vmalloc(), warn_alloc_failed() is called
> > > as below.
> > >
> > > ./mm/vmalloc.c
> > > vmalloc()
> > > __vmalloc_node_flags()
> > > __vmalloc_node()
> > > __vmalloc_node_range()
> > >
> > > ./mm/page_alloc.c
> > > warn_alloc_failed()
> > >
> > > > ...
> > > >
> > > > I can see cases where NULL is returned after above paths and the
> > > > function you mentioned wasn't there. So, I am not sure that we will get
> > > > a print for sure for any error that might occur from devm_kzalloc().
> > >
> > > I guess that slab_out_of_memory() <./mm/slub.c> may print it for any
> > > errors. But, I am not sure. :-(
> >
> > devm_kzalloc() is just kmalloc(). The OOM error messages are the same.
>
> Sure, but I wasn't sure whether all error code paths in kmalloc() resulted in
> an OOM message. For instance, the following code path results in an allocation
> failure but doesn't seem to print an OOM message:
>
> kmalloc
> __kmalloc
> __do_kmalloc
> slab_alloc
> slab_should_failslab
> should_failslab
> should_fail
>
> A bit far-fetched possibly as it requires fault injection. I haven't found any
> other such code path, but my understanding of that code is a bit limited.
should_fail() only returns true after calling fail_dump().
You can pass (GFP_KERNEL | __GFP_NOWARN) if you want to turn off
warnings. Otherwise it shuold print a warning.
regards,
dan carpenter
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH 5/9] pwm: spear: Remove unnecessary OOM messages
2014-03-05 11:00 ` Laurent Pinchart
2014-03-05 11:40 ` Dan Carpenter
@ 2014-03-05 16:17 ` Viresh Kumar
2014-03-05 16:29 ` Laurent Pinchart
1 sibling, 1 reply; 28+ messages in thread
From: Viresh Kumar @ 2014-03-05 16:17 UTC (permalink / raw)
To: Laurent Pinchart
Cc: Dan Carpenter, Jingoo Han, Joe Perches, Thierry Reding, linux-pwm,
Andrew Morton
On 5 March 2014 19:00, Laurent Pinchart
<laurent.pinchart@ideasonboard.com> wrote:
> Sure, but I wasn't sure whether all error code paths in kmalloc() resulted in
> an OOM message. For instance, the following code path results in an allocation
> failure but doesn't seem to print an OOM message:
>
> kmalloc
> __kmalloc
> __do_kmalloc
> slab_alloc
> slab_should_failslab
> should_failslab
> should_fail
>
> A bit far-fetched possibly as it requires fault injection. I haven't found any
> other such code path, but my understanding of that code is a bit limited.
In that case should we actually accept patches like this at all? As they
might be ending up removing some useful print messages?
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH 5/9] pwm: spear: Remove unnecessary OOM messages
2014-03-05 16:17 ` Viresh Kumar
@ 2014-03-05 16:29 ` Laurent Pinchart
2014-03-07 8:04 ` Jingoo Han
0 siblings, 1 reply; 28+ messages in thread
From: Laurent Pinchart @ 2014-03-05 16:29 UTC (permalink / raw)
To: Viresh Kumar
Cc: Dan Carpenter, Jingoo Han, Joe Perches, Thierry Reding, linux-pwm,
Andrew Morton
Hi Viresh,
On Thursday 06 March 2014 00:17:38 Viresh Kumar wrote:
> On 5 March 2014 19:00, Laurent Pinchart wrote:
> > Sure, but I wasn't sure whether all error code paths in kmalloc() resulted
> > in an OOM message. For instance, the following code path results in an
> > allocation failure but doesn't seem to print an OOM message:
> >
> > kmalloc
> > __kmalloc
> > __do_kmalloc
> > slab_alloc
> > slab_should_failslab
> > should_failslab
> > should_fail
> >
> > A bit far-fetched possibly as it requires fault injection. I haven't found
> > any other such code path, but my understanding of that code is a bit
> > limited.
>
> In that case should we actually accept patches like this at all? As they
> might be ending up removing some useful print messages?
Dan has pointed out that I've missed the fail_dump() call in should_fail().
One could argue that fail_dump() wouldn't print any message if the fault
injection framework has verbosity set to 0, but I suppose we can assume that
people using the fault injection framework know what they're doing.
All other error paths in kmalloc() seem to result in a message being printed.
I might have missed something, but I can trust the developers who know that
code much better than I do that kmalloc() is designed to print an error
message in all error paths. Any failure to print a message would be a
kmalloc() bug that should be fixed, and getting rid of the allocation error
messages in drivers would seem like a nice cleanup to me.
--
Regards,
Laurent Pinchart
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH 5/9] pwm: spear: Remove unnecessary OOM messages
2014-03-05 16:29 ` Laurent Pinchart
@ 2014-03-07 8:04 ` Jingoo Han
2014-03-10 12:22 ` Thierry Reding
0 siblings, 1 reply; 28+ messages in thread
From: Jingoo Han @ 2014-03-07 8:04 UTC (permalink / raw)
To: 'Thierry Reding', linux-pwm
Cc: 'Laurent Pinchart', 'Viresh Kumar',
'Dan Carpenter', 'Joe Perches',
'Andrew Morton', 'Jingoo Han'
On Thursday, March 06, 2014 1:30 AM, Laurent Pinchart wrote:
> On Thursday 06 March 2014 00:17:38 Viresh Kumar wrote:
> > On 5 March 2014 19:00, Laurent Pinchart wrote:
> > > Sure, but I wasn't sure whether all error code paths in kmalloc() resulted
> > > in an OOM message. For instance, the following code path results in an
> > > allocation failure but doesn't seem to print an OOM message:
> > >
> > > kmalloc
> > > __kmalloc
> > > __do_kmalloc
> > > slab_alloc
> > > slab_should_failslab
> > > should_failslab
> > > should_fail
> > >
> > > A bit far-fetched possibly as it requires fault injection. I haven't found
> > > any other such code path, but my understanding of that code is a bit
> > > limited.
> >
> > In that case should we actually accept patches like this at all? As they
> > might be ending up removing some useful print messages?
>
> Dan has pointed out that I've missed the fail_dump() call in should_fail().
> One could argue that fail_dump() wouldn't print any message if the fault
> injection framework has verbosity set to 0, but I suppose we can assume that
> people using the fault injection framework know what they're doing.
>
> All other error paths in kmalloc() seem to result in a message being printed.
> I might have missed something, but I can trust the developers who know that
> code much better than I do that kmalloc() is designed to print an error
> message in all error paths. Any failure to print a message would be a
> kmalloc() bug that should be fixed, and getting rid of the allocation error
> messages in drivers would seem like a nice cleanup to me.
Hi Thierry Reding,
There seems to be no objection. :-)
Would you accept these patches?
Thank you.
Best regards,
Jingoo Han
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH 5/9] pwm: spear: Remove unnecessary OOM messages
2014-03-07 8:04 ` Jingoo Han
@ 2014-03-10 12:22 ` Thierry Reding
2014-04-03 3:24 ` Jingoo Han
0 siblings, 1 reply; 28+ messages in thread
From: Thierry Reding @ 2014-03-10 12:22 UTC (permalink / raw)
To: Jingoo Han
Cc: linux-pwm, 'Laurent Pinchart', 'Viresh Kumar',
'Dan Carpenter', 'Joe Perches',
'Andrew Morton'
[-- Attachment #1: Type: text/plain, Size: 1924 bytes --]
On Fri, Mar 07, 2014 at 05:04:36PM +0900, Jingoo Han wrote:
> On Thursday, March 06, 2014 1:30 AM, Laurent Pinchart wrote:
> > On Thursday 06 March 2014 00:17:38 Viresh Kumar wrote:
> > > On 5 March 2014 19:00, Laurent Pinchart wrote:
> > > > Sure, but I wasn't sure whether all error code paths in kmalloc() resulted
> > > > in an OOM message. For instance, the following code path results in an
> > > > allocation failure but doesn't seem to print an OOM message:
> > > >
> > > > kmalloc
> > > > __kmalloc
> > > > __do_kmalloc
> > > > slab_alloc
> > > > slab_should_failslab
> > > > should_failslab
> > > > should_fail
> > > >
> > > > A bit far-fetched possibly as it requires fault injection. I haven't found
> > > > any other such code path, but my understanding of that code is a bit
> > > > limited.
> > >
> > > In that case should we actually accept patches like this at all? As they
> > > might be ending up removing some useful print messages?
> >
> > Dan has pointed out that I've missed the fail_dump() call in should_fail().
> > One could argue that fail_dump() wouldn't print any message if the fault
> > injection framework has verbosity set to 0, but I suppose we can assume that
> > people using the fault injection framework know what they're doing.
> >
> > All other error paths in kmalloc() seem to result in a message being printed.
> > I might have missed something, but I can trust the developers who know that
> > code much better than I do that kmalloc() is designed to print an error
> > message in all error paths. Any failure to print a message would be a
> > kmalloc() bug that should be fixed, and getting rid of the allocation error
> > messages in drivers would seem like a nice cleanup to me.
>
> Hi Thierry Reding,
>
> There seems to be no objection. :-)
> Would you accept these patches?
> Thank you.
All 9 patches applied, thanks.
Thierry
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH 5/9] pwm: spear: Remove unnecessary OOM messages
2014-03-10 12:22 ` Thierry Reding
@ 2014-04-03 3:24 ` Jingoo Han
2014-05-21 10:34 ` Thierry Reding
0 siblings, 1 reply; 28+ messages in thread
From: Jingoo Han @ 2014-04-03 3:24 UTC (permalink / raw)
To: 'Thierry Reding'; +Cc: linux-pwm, 'Jingoo Han'
On Monday, March 10, 2014 9:23 PM, Thierry Reding wrote:
> On Fri, Mar 07, 2014 at 05:04:36PM +0900, Jingoo Han wrote:
[....]
> >
> > Hi Thierry Reding,
> >
> > There seems to be no objection. :-)
> > Would you accept these patches?
> > Thank you.
>
> All 9 patches applied, thanks.
Hi Thierry,
I cannot find these patches from your pwm git tree. [1]
Would you confirm it? :-) Thank you.
[1] http://git.kernel.org/cgit/linux/kernel/git/thierry.reding/linux-pwm.git/log/?h=for-next
Best regards,
Jingoo Han
>
> Thierry
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH 5/9] pwm: spear: Remove unnecessary OOM messages
2014-04-03 3:24 ` Jingoo Han
@ 2014-05-21 10:34 ` Thierry Reding
0 siblings, 0 replies; 28+ messages in thread
From: Thierry Reding @ 2014-05-21 10:34 UTC (permalink / raw)
To: Jingoo Han; +Cc: linux-pwm
[-- Attachment #1: Type: text/plain, Size: 712 bytes --]
On Thu, Apr 03, 2014 at 12:24:54PM +0900, Jingoo Han wrote:
> On Monday, March 10, 2014 9:23 PM, Thierry Reding wrote:
> > On Fri, Mar 07, 2014 at 05:04:36PM +0900, Jingoo Han wrote:
>
> [....]
>
> > >
> > > Hi Thierry Reding,
> > >
> > > There seems to be no objection. :-)
> > > Would you accept these patches?
> > > Thank you.
> >
> > All 9 patches applied, thanks.
>
> Hi Thierry,
>
> I cannot find these patches from your pwm git tree. [1]
> Would you confirm it? :-) Thank you.
>
> [1] http://git.kernel.org/cgit/linux/kernel/git/thierry.reding/linux-pwm.git/log/?h=for-next
It seems like I never replied to this, but the patches have now been
merged for a while.
Thierry
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 28+ messages in thread
* [PATCH 6/9] pwm: tegra: Remove unnecessary OOM messages
2014-02-26 0:59 [PATCH 0/9] pwm: Remove unnecessary OOM messages Jingoo Han
` (4 preceding siblings ...)
2014-02-26 1:09 ` [PATCH 5/9] pwm: spear: " Jingoo Han
@ 2014-02-26 1:10 ` Jingoo Han
2014-02-26 1:12 ` [PATCH 7/9] pwm: pwm-tiecap: " Jingoo Han
` (2 subsequent siblings)
8 siblings, 0 replies; 28+ messages in thread
From: Jingoo Han @ 2014-02-26 1:10 UTC (permalink / raw)
To: 'Thierry Reding'
Cc: linux-pwm, 'Jingoo Han', 'Stephen Warren'
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/pwm/pwm-tegra.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/pwm/pwm-tegra.c b/drivers/pwm/pwm-tegra.c
index 74298c5..61d86b9 100644
--- a/drivers/pwm/pwm-tegra.c
+++ b/drivers/pwm/pwm-tegra.c
@@ -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;
--
1.7.10.4
^ permalink raw reply related [flat|nested] 28+ messages in thread* [PATCH 7/9] pwm: pwm-tiecap: Remove unnecessary OOM messages
2014-02-26 0:59 [PATCH 0/9] pwm: Remove unnecessary OOM messages Jingoo Han
` (5 preceding siblings ...)
2014-02-26 1:10 ` [PATCH 6/9] pwm: tegra: " Jingoo Han
@ 2014-02-26 1:12 ` Jingoo Han
2014-02-26 1:13 ` [PATCH 8/9] pwm: tiehrpwm: " Jingoo Han
2014-02-26 1:14 ` [PATCH 9/9] pwm: vt8500: " Jingoo Han
8 siblings, 0 replies; 28+ messages in thread
From: Jingoo Han @ 2014-02-26 1:12 UTC (permalink / raw)
To: 'Thierry Reding'
Cc: linux-pwm, 'Jingoo Han', 'Philip Avinash',
'Sourav Poddar'
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/pwm/pwm-tiecap.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/pwm/pwm-tiecap.c b/drivers/pwm/pwm-tiecap.c
index 032092c..74efbe7 100644
--- a/drivers/pwm/pwm-tiecap.c
+++ b/drivers/pwm/pwm-tiecap.c
@@ -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)) {
--
1.7.10.4
^ permalink raw reply related [flat|nested] 28+ messages in thread* [PATCH 8/9] pwm: tiehrpwm: Remove unnecessary OOM messages
2014-02-26 0:59 [PATCH 0/9] pwm: Remove unnecessary OOM messages Jingoo Han
` (6 preceding siblings ...)
2014-02-26 1:12 ` [PATCH 7/9] pwm: pwm-tiecap: " Jingoo Han
@ 2014-02-26 1:13 ` Jingoo Han
2014-02-26 1:14 ` [PATCH 9/9] pwm: vt8500: " Jingoo Han
8 siblings, 0 replies; 28+ messages in thread
From: Jingoo Han @ 2014-02-26 1:13 UTC (permalink / raw)
To: 'Thierry Reding'
Cc: linux-pwm, 'Jingoo Han', '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/pwm/pwm-tiehrpwm.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/pwm/pwm-tiehrpwm.c b/drivers/pwm/pwm-tiehrpwm.c
index aee4471..3a31c08 100644
--- a/drivers/pwm/pwm-tiehrpwm.c
+++ b/drivers/pwm/pwm-tiehrpwm.c
@@ -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)) {
--
1.7.10.4
^ permalink raw reply related [flat|nested] 28+ messages in thread* [PATCH 9/9] pwm: vt8500: Remove unnecessary OOM messages
2014-02-26 0:59 [PATCH 0/9] pwm: Remove unnecessary OOM messages Jingoo Han
` (7 preceding siblings ...)
2014-02-26 1:13 ` [PATCH 8/9] pwm: tiehrpwm: " Jingoo Han
@ 2014-02-26 1:14 ` Jingoo Han
8 siblings, 0 replies; 28+ messages in thread
From: Jingoo Han @ 2014-02-26 1:14 UTC (permalink / raw)
To: 'Thierry Reding'
Cc: linux-pwm, 'Jingoo Han', 'Sascha Hauer',
'Tony Prisk'
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/pwm/pwm-vt8500.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/pwm/pwm-vt8500.c b/drivers/pwm/pwm-vt8500.c
index 323125a..652e6b5 100644
--- a/drivers/pwm/pwm-vt8500.c
+++ b/drivers/pwm/pwm-vt8500.c
@@ -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;
--
1.7.10.4
^ permalink raw reply related [flat|nested] 28+ messages in thread