From: Andrew Jackson <Andrew.Jackson@arm.com>
To: Lars-Peter Clausen <lars@metafoo.de>,
Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.de>
Cc: "alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Liviu Dudau <Liviu.Dudau@arm.com>,
Liam Girdwood <lgirdwood@gmail.com>,
Rajeev Kumar <rajeevkumar.linux@gmail.com>,
Mark Brown <broonie@kernel.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH 1/5] ASoC: dwc: Allocate resources with devm_ioremap_resource
Date: Thu, 04 Dec 2014 08:57:06 +0000 [thread overview]
Message-ID: <548021E2.2080506@arm.com> (raw)
In-Reply-To: <547F3DD0.10405@metafoo.de>
On 12/03/14 16:44, Lars-Peter Clausen wrote:
> On 12/03/2014 05:38 PM, Andrew Jackson wrote:
> [,,,[
>> + 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");
>
> All the memory alloc functions already print a error message.
I will remove the error message(s).
>> return -ENOMEM;
>> }
>>
>> + dw_i2s_dai->ops = &dw_i2s_dai_ops;
>> + dw_i2s_dai->suspend = dw_i2s_suspend;
>> + dw_i2s_dai->resume = dw_i2s_resume;
>
> This seems to be separate from the devm_ioremap_resource() change.
It seemed reasonable to assign these known values to the dw_i2s_dai as soon as it had been allocated. Would you prefer this in a separate patch?
>> +
>> + res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
>> + if (!res) {
>
> You don't actually have to check it devm_ioremap_resource does this for you.
Oh, thanks, paranoia was taking over.
>> + dev_err(&pdev->dev, "no i2s resource defined\n");
>> + return -ENODEV;
>> + }
>> +
>> + 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");
>
> Same here devm_ioremap_resource() will already print a appropriate error
> message.
>
>> + return PTR_ERR(dev->i2s_base);
>> + }
>
>
WARNING: multiple messages have this Message-ID (diff)
From: Andrew.Jackson@arm.com (Andrew Jackson)
To: linux-arm-kernel@lists.infradead.org
Subject: [alsa-devel] [PATCH 1/5] ASoC: dwc: Allocate resources with devm_ioremap_resource
Date: Thu, 04 Dec 2014 08:57:06 +0000 [thread overview]
Message-ID: <548021E2.2080506@arm.com> (raw)
In-Reply-To: <547F3DD0.10405@metafoo.de>
On 12/03/14 16:44, Lars-Peter Clausen wrote:
> On 12/03/2014 05:38 PM, Andrew Jackson wrote:
> [,,,[
>> + 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");
>
> All the memory alloc functions already print a error message.
I will remove the error message(s).
>> return -ENOMEM;
>> }
>>
>> + dw_i2s_dai->ops = &dw_i2s_dai_ops;
>> + dw_i2s_dai->suspend = dw_i2s_suspend;
>> + dw_i2s_dai->resume = dw_i2s_resume;
>
> This seems to be separate from the devm_ioremap_resource() change.
It seemed reasonable to assign these known values to the dw_i2s_dai as soon as it had been allocated. Would you prefer this in a separate patch?
>> +
>> + res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
>> + if (!res) {
>
> You don't actually have to check it devm_ioremap_resource does this for you.
Oh, thanks, paranoia was taking over.
>> + dev_err(&pdev->dev, "no i2s resource defined\n");
>> + return -ENODEV;
>> + }
>> +
>> + 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");
>
> Same here devm_ioremap_resource() will already print a appropriate error
> message.
>
>> + return PTR_ERR(dev->i2s_base);
>> + }
>
>
WARNING: multiple messages have this Message-ID (diff)
From: Andrew Jackson <Andrew.Jackson@arm.com>
To: Lars-Peter Clausen <lars@metafoo.de>,
Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.de>
Cc: "alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>,
Liviu Dudau <Liviu.Dudau@arm.com>,
Liam Girdwood <lgirdwood@gmail.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Mark Brown <broonie@kernel.org>,
Rajeev Kumar <rajeevkumar.linux@gmail.com>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>
Subject: Re: [alsa-devel] [PATCH 1/5] ASoC: dwc: Allocate resources with devm_ioremap_resource
Date: Thu, 04 Dec 2014 08:57:06 +0000 [thread overview]
Message-ID: <548021E2.2080506@arm.com> (raw)
In-Reply-To: <547F3DD0.10405@metafoo.de>
On 12/03/14 16:44, Lars-Peter Clausen wrote:
> On 12/03/2014 05:38 PM, Andrew Jackson wrote:
> [,,,[
>> + 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");
>
> All the memory alloc functions already print a error message.
I will remove the error message(s).
>> return -ENOMEM;
>> }
>>
>> + dw_i2s_dai->ops = &dw_i2s_dai_ops;
>> + dw_i2s_dai->suspend = dw_i2s_suspend;
>> + dw_i2s_dai->resume = dw_i2s_resume;
>
> This seems to be separate from the devm_ioremap_resource() change.
It seemed reasonable to assign these known values to the dw_i2s_dai as soon as it had been allocated. Would you prefer this in a separate patch?
>> +
>> + res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
>> + if (!res) {
>
> You don't actually have to check it devm_ioremap_resource does this for you.
Oh, thanks, paranoia was taking over.
>> + dev_err(&pdev->dev, "no i2s resource defined\n");
>> + return -ENODEV;
>> + }
>> +
>> + 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");
>
> Same here devm_ioremap_resource() will already print a appropriate error
> message.
>
>> + return PTR_ERR(dev->i2s_base);
>> + }
>
>
next prev parent reply other threads:[~2014-12-04 8:57 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-03 16:38 [PATCH 1/5] ASoC: dwc: Allocate resources with devm_ioremap_resource Andrew Jackson
2014-12-03 16:38 ` Andrew Jackson
2014-12-03 16:38 ` Andrew Jackson
2014-12-03 16:44 ` [alsa-devel] " Lars-Peter Clausen
2014-12-03 16:44 ` Lars-Peter Clausen
2014-12-04 8:57 ` Andrew Jackson [this message]
2014-12-04 8:57 ` Andrew Jackson
2014-12-04 8:57 ` Andrew Jackson
2014-12-03 18:26 ` Mark Brown
2014-12-03 18:26 ` Mark Brown
2014-12-03 18:26 ` Mark Brown
2014-12-04 9:05 ` Andrew Jackson
2014-12-04 9:05 ` Andrew Jackson
2014-12-04 9:05 ` Andrew Jackson
2014-12-04 10:42 ` Mark Brown
2014-12-04 10:42 ` 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=548021E2.2080506@arm.com \
--to=andrew.jackson@arm.com \
--cc=Liviu.Dudau@arm.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=lars@metafoo.de \
--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 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.