From: Jarkko Nikula <jarkko.nikula@bitmer.com>
To: Julia Lawall <Julia.Lawall@lip6.fr>
Cc: alsa-devel@alsa-project.org, Takashi Iwai <tiwai@suse.de>,
linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org,
Liam Girdwood <lgirdwood@gmail.com>,
Peter Ujfalusi <peter.ujfalusi@ti.com>,
Mark Brown <broonie@kernel.org>,
linux-omap@vger.kernel.org
Subject: Re: [PATCH 1/6] ASoC: omap: simplify platform_get_resource_byname/devm_ioremap_resource
Date: Mon, 19 Aug 2013 21:02:33 +0300 [thread overview]
Message-ID: <52125DB9.7040405@bitmer.com> (raw)
In-Reply-To: <1376902316-18520-2-git-send-email-Julia.Lawall@lip6.fr>
Hi
On 08/19/2013 11:51 AM, Julia Lawall wrote:
> From: Julia Lawall <Julia.Lawall@lip6.fr>
>
> Remove unneeded error handling on the result of a call to
> platform_get_resource_byname when the value is passed to devm_ioremap_resource.
>
> In the case of omap-dmic.c, the error-handling code of
> devm_ioremap_resource is also corrected to include releasing the clock.
>
> A simplified version of the semantic patch that makes this change is as
> follows: (http://coccinelle.lip6.fr/)
>
> // <smpl>
> @@
> expression pdev,res,e,e1;
> expression ret != 0;
> identifier l;
> @@
>
> res = platform_get_resource_byname(...);
> - if (res == NULL) { ... \(goto l;\|return ret;\) }
> e = devm_ioremap_resource(e1, res);
> // </smpl>
>
> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
>
> ---
> sound/soc/omap/omap-dmic.c | 9 +++------
> sound/soc/omap/omap-mcpdm.c | 3 ---
> 2 files changed, 3 insertions(+), 9 deletions(-)
>
To the patch and catch of missing clock release in omap-dmic.c in case
of failing devm_ioremap_resource:
Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
next prev parent reply other threads:[~2013-08-19 18:02 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-19 8:51 [PATCH 0/6] simplify platform_get_resource_byname/devm_ioremap_resource Julia Lawall
2013-08-19 8:51 ` [PATCH 1/6] ASoC: omap: " Julia Lawall
2013-08-19 18:02 ` Jarkko Nikula [this message]
2013-08-20 10:51 ` 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=52125DB9.7040405@bitmer.com \
--to=jarkko.nikula@bitmer.com \
--cc=Julia.Lawall@lip6.fr \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=peter.ujfalusi@ti.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;
as well as URLs for NNTP newsgroup(s).