From: Liam Girdwood <lrg@slimlogic.co.uk>
To: Julia Lawall <julia@diku.dk>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>,
linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] drivers/regulator: use PTR_ERR to get error code
Date: Mon, 23 Nov 2009 10:55:58 +0000 [thread overview]
Message-ID: <1258973758.3629.64.camel@odin> (raw)
In-Reply-To: <Pine.LNX.4.64.0911212218210.28848@ask.diku.dk>
On Sat, 2009-11-21 at 22:18 +0100, Julia Lawall wrote:
> From: Julia Lawall <julia@diku.dk>
>
> IS_ERR returns only 1 or 0. The callsite of setup_regulators expects a
> negative integer in an error case. Thus, PTR_ERR has to be used to extract
> it.
>
> The semantic match that finds this problem is as follows:
> (http://coccinelle.lip6.fr/)
>
> // <smpl>
> @@
> expression E,E1;
> @@
>
> *E = IS_ERR(...)
> ... when != E = E1
> *return E;
> // </smpl>
>
> Signed-off-by: Julia Lawall <julia@diku.dk>
>
Applied.
Thanks
Liam
prev parent reply other threads:[~2009-11-23 10:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-21 21:18 [PATCH] drivers/regulator: use PTR_ERR to get error code Julia Lawall
2009-11-21 21:33 ` Mark Brown
2009-11-23 10:55 ` Liam Girdwood [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=1258973758.3629.64.camel@odin \
--to=lrg@slimlogic.co.uk \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=julia@diku.dk \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.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