linux-pwm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Jingoo Han <jg1.han@samsung.com>
Cc: 'Joe Perches' <joe@perches.com>,
	'Andrew Morton' <akpm@linux-foundation.org>,
	'Thierry Reding' <thierry.reding@gmail.com>,
	linux-pwm@vger.kernel.org,
	'Laurent Pinchart' <laurent.pinchart+renesas@ideasonboard.com>,
	'Simon Horman' <horms@verge.net.au>
Subject: Re: [PATCH 4/9] pwm: renesas-tpu: Remove unnecessary OOM messages
Date: Wed, 26 Feb 2014 23:02:50 +0100	[thread overview]
Message-ID: <3505521.zmSNmayePP@avalon> (raw)
In-Reply-To: <000201cf329b$55607c20$00217460$%han@samsung.com>

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


  reply	other threads:[~2014-02-26 22:01 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 ` [PATCH 3/9] pwm: pxa: " Jingoo Han
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
2014-02-26 22:02       ` Laurent Pinchart [this message]
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
2014-02-26  5:10       ` Viresh Kumar
2014-02-26  5:19         ` Joe Perches
2014-02-26  6:26           ` Viresh Kumar
2014-03-03  1:14             ` Jingoo Han
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
2014-03-05 16:29                     ` Laurent Pinchart
2014-03-07  8:04                       ` Jingoo Han
2014-03-10 12:22                         ` Thierry Reding
2014-04-03  3:24                           ` Jingoo Han
2014-05-21 10:34                             ` Thierry Reding
2014-02-26  1:10 ` [PATCH 6/9] pwm: tegra: " Jingoo Han
2014-02-26  1:12 ` [PATCH 7/9] pwm: pwm-tiecap: " 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3505521.zmSNmayePP@avalon \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=akpm@linux-foundation.org \
    --cc=horms@verge.net.au \
    --cc=jg1.han@samsung.com \
    --cc=joe@perches.com \
    --cc=laurent.pinchart+renesas@ideasonboard.com \
    --cc=linux-pwm@vger.kernel.org \
    --cc=thierry.reding@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).