All of lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: "Takashi Sakamoto" <o-takashi@sakamocchi.jp>
Cc: "Mihai Burduselu" <michelcatalin@gmail.com>, <perex@perex.cz>,
	<alsa-devel@alsa-project.org>, <colin.king@canonical.com>,
	<lgirdwood@gmail.com>, <broonie@kernel.org>,
	<s.nawrocki@samsung.com>, <Jose.Abreu@synopsys.com>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] ASoC: dwc: remove 'out of memory' message
Date: Tue, 28 Feb 2017 16:19:41 +0100	[thread overview]
Message-ID: <s5hshmyz6k2.wl-tiwai@suse.de> (raw)
In-Reply-To: <9da9efc3-cd9b-70a5-a764-e8be32e67d13@sakamocchi.jp>

On Sun, 26 Feb 2017 09:03:22 +0100,
Takashi Sakamoto wrote:
> 
> Hi,
> 
> On Feb 25 2017 20:03, Mihai Burduselu wrote:
> > Reported by checkpatch.pl
> > Signed-off-by: Mihai Burduselu <michelcatalin@gmail.com>
> > ---
> >  sound/soc/dwc/designware_i2s.c | 4 +---
> >  1 file changed, 1 insertion(+), 3 deletions(-)
> >
> > diff --git a/sound/soc/dwc/designware_i2s.c b/sound/soc/dwc/designware_i2s.c
> > index 9c46e4112026..6479768cc6a1 100644
> > --- a/sound/soc/dwc/designware_i2s.c
> > +++ b/sound/soc/dwc/designware_i2s.c
> > @@ -611,10 +611,8 @@ static int dw_i2s_probe(struct platform_device *pdev)
> >  	const char *clk_id;
> >
> >  	dev = devm_kzalloc(&pdev->dev, sizeof(*dev), GFP_KERNEL);
> > -	if (!dev) {
> > -		dev_warn(&pdev->dev, "kzalloc fail\n");
> > +	if (!dev)
> 
> The line for 'dev_warn()' should be kept.

In general, people regard it superfluous since kmalloc() itself
already gives a kernel warning at an allocation error.  So removing
the message is OK in that sense.

However, the problem of this (and lots of other) patch is that it
doesn't give proper information.  Instead, in a single line, it merely
declares checkpatch.pl as a bible.  Very helpful, eh?

So, please reconsider the changelog when you submit this kind of
patches.


thanks,

Takashi

WARNING: multiple messages have this Message-ID (diff)
From: Takashi Iwai <tiwai@suse.de>
To: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Cc: Jose.Abreu@synopsys.com, alsa-devel@alsa-project.org,
	linux-kernel@vger.kernel.org, lgirdwood@gmail.com,
	broonie@kernel.org, s.nawrocki@samsung.com,
	colin.king@canonical.com,
	Mihai Burduselu <michelcatalin@gmail.com>
Subject: Re: [PATCH] ASoC: dwc: remove 'out of memory' message
Date: Tue, 28 Feb 2017 16:19:41 +0100	[thread overview]
Message-ID: <s5hshmyz6k2.wl-tiwai@suse.de> (raw)
In-Reply-To: <9da9efc3-cd9b-70a5-a764-e8be32e67d13@sakamocchi.jp>

On Sun, 26 Feb 2017 09:03:22 +0100,
Takashi Sakamoto wrote:
> 
> Hi,
> 
> On Feb 25 2017 20:03, Mihai Burduselu wrote:
> > Reported by checkpatch.pl
> > Signed-off-by: Mihai Burduselu <michelcatalin@gmail.com>
> > ---
> >  sound/soc/dwc/designware_i2s.c | 4 +---
> >  1 file changed, 1 insertion(+), 3 deletions(-)
> >
> > diff --git a/sound/soc/dwc/designware_i2s.c b/sound/soc/dwc/designware_i2s.c
> > index 9c46e4112026..6479768cc6a1 100644
> > --- a/sound/soc/dwc/designware_i2s.c
> > +++ b/sound/soc/dwc/designware_i2s.c
> > @@ -611,10 +611,8 @@ static int dw_i2s_probe(struct platform_device *pdev)
> >  	const char *clk_id;
> >
> >  	dev = devm_kzalloc(&pdev->dev, sizeof(*dev), GFP_KERNEL);
> > -	if (!dev) {
> > -		dev_warn(&pdev->dev, "kzalloc fail\n");
> > +	if (!dev)
> 
> The line for 'dev_warn()' should be kept.

In general, people regard it superfluous since kmalloc() itself
already gives a kernel warning at an allocation error.  So removing
the message is OK in that sense.

However, the problem of this (and lots of other) patch is that it
doesn't give proper information.  Instead, in a single line, it merely
declares checkpatch.pl as a bible.  Very helpful, eh?

So, please reconsider the changelog when you submit this kind of
patches.


thanks,

Takashi

  reply	other threads:[~2017-02-28 15:34 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-25 11:03 [PATCH] ASoC: dwc: remove 'out of memory' message Mihai Burduselu
2017-02-26  8:03 ` Takashi Sakamoto
2017-02-28 15:19   ` Takashi Iwai [this message]
2017-02-28 15:19     ` Takashi Iwai
2017-03-07 12:56     ` Mark Brown
2017-03-07 12:56       ` Mark Brown

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=s5hshmyz6k2.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=Jose.Abreu@synopsys.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=colin.king@canonical.com \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michelcatalin@gmail.com \
    --cc=o-takashi@sakamocchi.jp \
    --cc=perex@perex.cz \
    --cc=s.nawrocki@samsung.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 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.