Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Lars-Peter Clausen <lars@metafoo.de>
To: Joe Perches <joe@perches.com>, Andrew Jackson <andrew.jackson@arm.com>
Cc: Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.de>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Mark Brown <broonie@kernel.org>,
	Rajeev Kumar <rajeevkumar.linux@gmail.com>,
	Liviu Dudau <Liviu.Dudau@arm.com>, Arnd Bergmann <arnd@arndb.de>,
	linux-arm-kernel@lists.infradead.org,
	alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 1/6] ASoC: dwc: Remove unnecessary debug messages and tests
Date: Fri, 12 Dec 2014 10:33:23 +0100	[thread overview]
Message-ID: <548AB663.2020207@metafoo.de> (raw)
In-Reply-To: <1418376671.18092.40.camel@perches.com>

On 12/12/2014 10:31 AM, Joe Perches wrote:
[...]
>>   	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?

devm_ioremap_resource both checks if res is NULL and does also its own error 
reporting. So the code in the driver is redundant.

  reply	other threads:[~2014-12-12  9:33 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
2014-12-12  9:33     ` Lars-Peter Clausen [this message]
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=548AB663.2020207@metafoo.de \
    --to=lars@metafoo.de \
    --cc=Liviu.Dudau@arm.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=andrew.jackson@arm.com \
    --cc=arnd@arndb.de \
    --cc=broonie@kernel.org \
    --cc=joe@perches.com \
    --cc=lgirdwood@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=rajeevkumar.linux@gmail.com \
    --cc=tiwai@suse.de \
    /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