From: Tony Lindgren <tony@atomide.com>
To: linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 15/15] arch/arm/mach-omap2/smartreflex.c: add missing iounmap
Date: Fri, 27 Jan 2012 00:37:05 +0000 [thread overview]
Message-ID: <20120127003704.GH29812@atomide.com> (raw)
In-Reply-To: <1326362117-29371-15-git-send-email-Julia.Lawall@lip6.fr>
* Julia Lawall <Julia.Lawall@lip6.fr> [120112 01:23]:
> From: Julia Lawall <Julia.Lawall@lip6.fr>
>
> Add missing iounmap in error handling code, in a case where the function
> already preforms iounmap on some other execution path.
Thanks I'll apply this into omap fixes branch.
Regards,
Tony
> A simplified version of the semantic match that finds this problem is as
> follows: (http://coccinelle.lip6.fr/)
>
> // <smpl>
> @@
> expression e;
> statement S,S1;
> int ret;
> @@
> e = \(ioremap\|ioremap_nocache\)(...)
> ... when != iounmap(e)
> if (<+...e...+>) S
> ... when any
> when != iounmap(e)
> *if (...)
> { ... when != iounmap(e)
> return ...; }
> ... when any
> iounmap(e);
> // </smpl>
>
> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
>
> ---
> arch/arm/mach-omap2/smartreflex.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/arm/mach-omap2/smartreflex.c b/arch/arm/mach-omap2/smartreflex.c
> index 9dd9345..7e755bb 100644
> --- a/arch/arm/mach-omap2/smartreflex.c
> +++ b/arch/arm/mach-omap2/smartreflex.c
> @@ -897,7 +897,7 @@ static int __init omap_sr_probe(struct platform_device *pdev)
> ret = sr_late_init(sr_info);
> if (ret) {
> pr_warning("%s: Error in SR late init\n", __func__);
> - return ret;
> + goto err_iounmap;
> }
> }
>
>
WARNING: multiple messages have this Message-ID (diff)
From: Tony Lindgren <tony@atomide.com>
To: Julia Lawall <Julia.Lawall@lip6.fr>
Cc: kernel-janitors@vger.kernel.org,
Russell King <linux@arm.linux.org.uk>,
linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 15/15] arch/arm/mach-omap2/smartreflex.c: add missing iounmap
Date: Thu, 26 Jan 2012 16:37:05 -0800 [thread overview]
Message-ID: <20120127003704.GH29812@atomide.com> (raw)
In-Reply-To: <1326362117-29371-15-git-send-email-Julia.Lawall@lip6.fr>
* Julia Lawall <Julia.Lawall@lip6.fr> [120112 01:23]:
> From: Julia Lawall <Julia.Lawall@lip6.fr>
>
> Add missing iounmap in error handling code, in a case where the function
> already preforms iounmap on some other execution path.
Thanks I'll apply this into omap fixes branch.
Regards,
Tony
> A simplified version of the semantic match that finds this problem is as
> follows: (http://coccinelle.lip6.fr/)
>
> // <smpl>
> @@
> expression e;
> statement S,S1;
> int ret;
> @@
> e = \(ioremap\|ioremap_nocache\)(...)
> ... when != iounmap(e)
> if (<+...e...+>) S
> ... when any
> when != iounmap(e)
> *if (...)
> { ... when != iounmap(e)
> return ...; }
> ... when any
> iounmap(e);
> // </smpl>
>
> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
>
> ---
> arch/arm/mach-omap2/smartreflex.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/arm/mach-omap2/smartreflex.c b/arch/arm/mach-omap2/smartreflex.c
> index 9dd9345..7e755bb 100644
> --- a/arch/arm/mach-omap2/smartreflex.c
> +++ b/arch/arm/mach-omap2/smartreflex.c
> @@ -897,7 +897,7 @@ static int __init omap_sr_probe(struct platform_device *pdev)
> ret = sr_late_init(sr_info);
> if (ret) {
> pr_warning("%s: Error in SR late init\n", __func__);
> - return ret;
> + goto err_iounmap;
> }
> }
>
>
WARNING: multiple messages have this Message-ID (diff)
From: tony@atomide.com (Tony Lindgren)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 15/15] arch/arm/mach-omap2/smartreflex.c: add missing iounmap
Date: Thu, 26 Jan 2012 16:37:05 -0800 [thread overview]
Message-ID: <20120127003704.GH29812@atomide.com> (raw)
In-Reply-To: <1326362117-29371-15-git-send-email-Julia.Lawall@lip6.fr>
* Julia Lawall <Julia.Lawall@lip6.fr> [120112 01:23]:
> From: Julia Lawall <Julia.Lawall@lip6.fr>
>
> Add missing iounmap in error handling code, in a case where the function
> already preforms iounmap on some other execution path.
Thanks I'll apply this into omap fixes branch.
Regards,
Tony
> A simplified version of the semantic match that finds this problem is as
> follows: (http://coccinelle.lip6.fr/)
>
> // <smpl>
> @@
> expression e;
> statement S,S1;
> int ret;
> @@
> e = \(ioremap\|ioremap_nocache\)(...)
> ... when != iounmap(e)
> if (<+...e...+>) S
> ... when any
> when != iounmap(e)
> *if (...)
> { ... when != iounmap(e)
> return ...; }
> ... when any
> iounmap(e);
> // </smpl>
>
> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
>
> ---
> arch/arm/mach-omap2/smartreflex.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/arm/mach-omap2/smartreflex.c b/arch/arm/mach-omap2/smartreflex.c
> index 9dd9345..7e755bb 100644
> --- a/arch/arm/mach-omap2/smartreflex.c
> +++ b/arch/arm/mach-omap2/smartreflex.c
> @@ -897,7 +897,7 @@ static int __init omap_sr_probe(struct platform_device *pdev)
> ret = sr_late_init(sr_info);
> if (ret) {
> pr_warning("%s: Error in SR late init\n", __func__);
> - return ret;
> + goto err_iounmap;
> }
> }
>
>
next prev parent reply other threads:[~2012-01-27 0:37 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-12 9:55 [PATCH 15/15] arch/arm/mach-omap2/smartreflex.c: add missing iounmap Julia Lawall
2012-01-12 9:55 ` Julia Lawall
2012-01-12 9:55 ` Julia Lawall
2012-01-27 0:37 ` Tony Lindgren [this message]
2012-01-27 0:37 ` Tony Lindgren
2012-01-27 0:37 ` Tony Lindgren
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=20120127003704.GH29812@atomide.com \
--to=tony@atomide.com \
--cc=linux-arm-kernel@lists.infradead.org \
/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.