public inbox for linux-arm-kernel@lists.infradead.org 
 help / color / mirror / Atom feed
From: joe@perches•com (Joe Perches)
To: linux-arm-kernel@lists•infradead.org
Subject: [PATCH v2 1/6] ASoC: dwc: Remove unnecessary debug messages and tests
Date: Fri, 12 Dec 2014 01:31:11 -0800	[thread overview]
Message-ID: <1418376671.18092.40.camel@perches.com> (raw)
In-Reply-To: <97f65b6037b9ac676f6ca7717a230a68cbe81fd1.1418372910.git.Andrew.Jackson@arm.com>

On Fri, 2014-12-12 at 09:25 +0000, Andrew Jackson wrote:
> The devm_XXX allocation functions print a message on failure,
> so additional messages are not required.
[]
> diff --git a/sound/soc/dwc/designware_i2s.c b/sound/soc/dwc/designware_i2s.c
[]
> @@ -345,26 +345,17 @@ static int dw_i2s_probe(struct platform_device *pdev)
>  	}
>  
>  	dw_i2s_dai = devm_kzalloc(&pdev->dev, sizeof(*dw_i2s_dai), GFP_KERNEL);
> -	if (!dw_i2s_dai) {
> -		dev_err(&pdev->dev, "mem allocation failed for dai driver\n");
> +	if (!dw_i2s_dai)
>  		return -ENOMEM;
> -	}

ok.
 
>  	dw_i2s_dai->ops = &dw_i2s_dai_ops;
>  	dw_i2s_dai->suspend = dw_i2s_suspend;
>  	dw_i2s_dai->resume = dw_i2s_resume;
>  
>  	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -	if (!res) {
> -		dev_err(&pdev->dev, "no i2s resource defined\n");
> -		return -ENODEV;
> -	}
> -

Why delete this?

>  	dev->i2s_base = devm_ioremap_resource(&pdev->dev, res);
> -	if (IS_ERR(dev->i2s_base)) {
> -		dev_err(&pdev->dev, "ioremap fail for i2s_region\n");
> +	if (IS_ERR(dev->i2s_base))
>  		return PTR_ERR(dev->i2s_base);
> -	}

or this?

  reply	other threads:[~2014-12-12  9:31 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-12  9:24 [PATCH v2 0/6] ASoC: dwc: Add device tree support to designware I2S Andrew Jackson
2014-12-12  9:25 ` [PATCH v2 1/6] ASoC: dwc: Remove unnecessary debug messages and tests Andrew Jackson
2014-12-12  9:31   ` Joe Perches [this message]
2014-12-12  9:33     ` Lars-Peter Clausen
2014-12-12  9:39     ` Andrew Jackson
2014-12-12 10:06       ` Joe Perches
2014-12-12 19:29   ` Mark Brown
2014-12-12  9:25 ` [PATCH v2 2/6] ASoC: dwc: Ensure FIFOs are flushed to prevent channel swap Andrew Jackson
2014-12-12  9:37   ` Lars-Peter Clausen
2014-12-12 18:12     ` Mark Brown
2014-12-15  8:37     ` Andrew Jackson
2014-12-12  9:25 ` [PATCH v2 3/6] ASoC: dwc: Iterate over all channels Andrew Jackson
2014-12-12  9:25 ` [PATCH v2 4/6] ASoC: dwc: Reorder code in preparation for DT support Andrew Jackson
2014-12-12  9:25 ` [PATCH v2 5/6] ASoC: dwc: Add devicetree support for Designware I2S Andrew Jackson
2014-12-12  9:25 ` [PATCH v2 6/6] ASoC: dwc: Add documentation for I2S DT Andrew Jackson

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=1418376671.18092.40.camel@perches.com \
    --to=joe@perches$(echo .)com \
    --cc=linux-arm-kernel@lists$(echo .)infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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