LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Alexander Graf <agraf@suse.de>
To: Julia Lawall <Julia.Lawall@lip6.fr>
Cc: kvm@vger.kernel.org, Marcelo Tosatti <mtosatti@redhat.com>,
	kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org,
	kvm-ppc@vger.kernel.org, Paul Mackerras <paulus@samba.org>,
	Avi Kivity <avi@redhat.com>, Julia Lawall <julia@diku.dk>,
	linuxppc-dev@lists.ozlabs.org
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>
>=20
> Convert a 0 error return code to a negative one, as returned elsewhere =
in the
> function.
>=20
> A new label is also added to avoid freeing things that are known to =
not yet
> be allocated.
>=20
> A simplified version of the semantic match that finds the first =
problem is as
> follows: (http://coccinelle.lip6.fr/)
>=20
> // <smpl>
> @@
> identifier ret;
> expression e,e1,e2,e3,e4,x;
> @@
>=20
> (
> if (\(ret !=3D 0\|ret < 0\) || ...) { ... return ...; }
> |
> ret =3D 0
> )
> ... when !=3D ret =3D e1
> *x =3D =
\(kmalloc\|kzalloc\|kcalloc\|devm_kzalloc\|ioremap\|ioremap_nocache\|devm_=
ioremap\|devm_ioremap_nocache\)(...);
> ... when !=3D x =3D e2
>    when !=3D ret =3D e3
> *if (x =3D=3D NULL || ...)
> {
>  ... when !=3D ret =3D e4
> *  return ret;
> }
> // </smpl>
>=20
> 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: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1344160356-387-1-git-send-email-Julia.Lawall@lip6.fr>
2012-08-05  9:52 ` [PATCH 3/6] arch/powerpc/kvm/e500_tlb.c: fix error return code Julia Lawall
2012-10-02 11:04   ` Alexander Graf [this message]

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=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