From: Julia Lawall <julia.lawall@lip6.fr>
To: Lars-Peter Clausen <lars@metafoo.de>
Cc: Gilles Muller <Gilles.Muller@lip6.fr>,
Nicolas Palix <npalix.work@gmail.com>,
linux-kernel@vger.kernel.org, cocci@diku.dk, mmarek@suse.cz
Subject: Re: [Cocci] [PATCH 2/2] coccinelle: Add patch for replacing open-coded IS_ERR_OR_NULL
Date: Fri, 23 Dec 2011 13:26:49 +0100 (CET) [thread overview]
Message-ID: <alpine.DEB.2.02.1112231325040.1834@localhost6.localdomain6> (raw)
In-Reply-To: <4EF471ED.1030902@metafoo.de>
On Fri, 23 Dec 2011, Lars-Peter Clausen wrote:
> On 12/21/2011 01:10 PM, Julia Lawall wrote:
>> On Wed, 21 Dec 2011, Lars-Peter Clausen wrote:
>>
>>> On 12/20/2011 11:24 PM, Julia Lawall wrote:
>>>> For this one, I made quite a number of changes, some of which required
>>>> fixing a bug in Coccinelle... I will try to release the bug fix
>>>> shortly. In general, though, I have added ... between the two tests. I
>>>> also got rid of the focus on ifs in the org and report rules.
>>>>
>>>
>>> Ok, thanks. Was the removing of the ifs in related to the Coccinelle
>>> bug? I
>>> always get an error if I start a match with a conditional.
>>
>> Not at all. The bug was that a patterm like:
>>
>> @depends on patch@
>> expression x;
>> @@
>> - IS_ERR(x)
>> + IS_ERR_OR_NULL(x)
>> || ...
>> - || x == NULL
>>
>> thought that it should be applied in two ways, giving an error about a
>> double transformation of the IS_ERR call.
>>
>> Could you reproduce the example that caused problems?
>
> Hm, I can reproduce it anymore, even with my original patch, must have been
> caused by some other error I had in the semantic patch at that time.
OK, should do you want to resubmit the semantic patch that I sent you?
The version of Coccinelle you have does not perfectly support it, but it
should just cause failures on a few files. The problem is only with the
patch case, when there is the possibility to mak two calls to
IS_ERR_OR_NULL in a single test expression, which doesn't happen
very often.
julia
next prev parent reply other threads:[~2011-12-23 12:26 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-19 13:24 [PATCH 1/2] coccinelle: Add patch for replacing open-coded PTR_RET Lars-Peter Clausen
2011-12-19 13:24 ` [PATCH 2/2] coccinelle: Add patch for replacing open-coded IS_ERR_OR_NULL Lars-Peter Clausen
2011-12-20 22:24 ` [Cocci] " Julia Lawall
2011-12-21 11:49 ` Lars-Peter Clausen
2011-12-21 12:10 ` Julia Lawall
2011-12-23 12:19 ` Lars-Peter Clausen
2011-12-23 12:26 ` Julia Lawall [this message]
2011-12-20 22:19 ` [Cocci] [PATCH 1/2] coccinelle: Add patch for replacing open-coded PTR_RET Julia Lawall
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=alpine.DEB.2.02.1112231325040.1834@localhost6.localdomain6 \
--to=julia.lawall@lip6.fr \
--cc=Gilles.Muller@lip6.fr \
--cc=cocci@diku.dk \
--cc=lars@metafoo.de \
--cc=linux-kernel@vger.kernel.org \
--cc=mmarek@suse.cz \
--cc=npalix.work@gmail.com \
/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®