mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alexander Graf <agraf@suse.de>
To: Julia Lawall <Julia.Lawall@lip6.fr>
Cc: kernel-janitors@vger.kernel.org, Avi Kivity <avi@redhat.com>,
	Marcelo Tosatti <mtosatti@redhat.com>,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Paul Mackerras <paulus@samba.org>,
	kvm-ppc@vger.kernel.org, kvm@vger.kernel.org,
	linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org,
	Julia Lawall <julia@diku.dk>
Subject: Re: [PATCH 3/6] arch/powerpc/kvm/e500_tlb.c: fix error return code
Date: Tue, 2 Oct 2012 13:04:03 +0200	[thread overview]
Message-ID: <BF4777C1-E76A-4AEB-A87D-FC2CBB465F98@suse.de> (raw)
In-Reply-To: <1344160356-387-4-git-send-email-Julia.Lawall@lip6.fr>


On 05.08.2012, at 11:52, Julia Lawall wrote:

> From: Julia Lawall <julia@diku.dk>
> 
> Convert a 0 error return code to a negative one, as returned elsewhere in the
> function.
> 
> A new label is also added to avoid freeing things that are known to not yet
> be allocated.
> 
> A simplified version of the semantic match that finds the first problem is as
> follows: (http://coccinelle.lip6.fr/)
> 
> // <smpl>
> @@
> identifier ret;
> expression e,e1,e2,e3,e4,x;
> @@
> 
> (
> if (\(ret != 0\|ret < 0\) || ...) { ... return ...; }
> |
> ret = 0
> )
> ... when != ret = e1
> *x = \(kmalloc\|kzalloc\|kcalloc\|devm_kzalloc\|ioremap\|ioremap_nocache\|devm_ioremap\|devm_ioremap_nocache\)(...);
> ... when != x = e2
>    when != ret = e3
> *if (x == NULL || ...)
> {
>  ... when != ret = e4
> *  return ret;
> }
> // </smpl>
> 
> Signed-off-by: Julia Lawall <julia@diku.dk>

Thanks, applied to kvm-ppc-next.


Alex


  reply	other threads:[~2012-10-02 11:04 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-05  9:52 [PATCH 0/6] " Julia Lawall
2012-08-05  9:52 ` [PATCH 1/6] drivers/edac/i7core_edac.c: " Julia Lawall
2012-08-05  9:52 ` [PATCH 2/6] drivers/cpufreq/pcc-cpufreq.c: " Julia Lawall
2012-08-05 21:11   ` Rafael J. Wysocki
2012-08-05  9:52 ` [PATCH 3/6] arch/powerpc/kvm/e500_tlb.c: " Julia Lawall
2012-10-02 11:04   ` Alexander Graf [this message]
2012-08-05  9:52 ` [PATCH 4/6] drivers/gpio/gpio-langwell.c: " Julia Lawall
2012-08-05 19:10   ` Linus Walleij
2012-08-05  9:52 ` [PATCH 5/6] drivers/char/tlclk.c: " Julia Lawall
2012-08-06  3:22   ` Gross, Mark
2012-08-05  9:52 ` [PATCH 6/6] drivers/atm/iphase.c: " Julia Lawall
2012-08-06 20:30   ` David Miller

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=BF4777C1-E76A-4AEB-A87D-FC2CBB465F98@suse.de \
    --to=agraf@suse.de \
    --cc=Julia.Lawall@lip6.fr \
    --cc=avi@redhat.com \
    --cc=benh@kernel.crashing.org \
    --cc=julia@diku.dk \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=kvm-ppc@vger.kernel.org \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mtosatti@redhat.com \
    --cc=paulus@samba.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®