From: elfring@users.sourceforge.net (SF Markus Elfring)
To: cocci@systeme.lip6.fr
Subject: [Cocci] [patch 119/197] scripts/coccinelle/free: Delete NULL test before freeing functions
Date: Wed, 06 May 2015 15:45:23 +0200 [thread overview]
Message-ID: <554A1AF3.9010802@users.sourceforge.net> (raw)
In-Reply-To: <alpine.DEB.2.02.1408091028520.2016@localhost6.localdomain6>
>>> + at r depends on context || report || org @
>>> +expression E;
>>> +position p;
>>> +@@
>>> +
>>> +* if (E)
>>> +* \(kfree at p\|debugfs_remove at p\|debugfs_remove_recursive at p\|usb_free_urb\)(E);
>>
>> How do you think about to add the construct "@p" also behind the function name
>> "usb_free_urb"?
>
> Yes, that would be needed, thanks. Also, it was recently suggested to add
> of_node_put to the list of things that are checked for.
Would you like to achieve further improvements for this approach?
https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/tree/scripts/coccinelle/free/ifnullfree.cocci?id=refs/tags/v4.0.1#n34
Regards,
Markus
WARNING: multiple messages have this Message-ID (diff)
From: SF Markus Elfring <elfring@users.sourceforge.net>
To: cocci@systeme.lip6.fr
Subject: Re: [patch 119/197] scripts/coccinelle/free: Delete NULL test before freeing functions
Date: Wed, 06 May 2015 13:45:23 +0000 [thread overview]
Message-ID: <554A1AF3.9010802@users.sourceforge.net> (raw)
In-Reply-To: <alpine.DEB.2.02.1408091028520.2016@localhost6.localdomain6>
>>> +@r depends on context || report || org @
>>> +expression E;
>>> +position p;
>>> +@@
>>> +
>>> +* if (E)
>>> +* \(kfree@p\|debugfs_remove@p\|debugfs_remove_recursive@p\|usb_free_urb\)(E);
>>
>> How do you think about to add the construct "@p" also behind the function name
>> "usb_free_urb"?
>
> Yes, that would be needed, thanks. Also, it was recently suggested to add
> of_node_put to the list of things that are checked for.
Would you like to achieve further improvements for this approach?
https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/tree/scripts/coccinelle/free/ifnullfree.cocci?id=refs/tags/v4.0.1#n34
Regards,
Markus
WARNING: multiple messages have this Message-ID (diff)
From: SF Markus Elfring <elfring@users.sourceforge.net>
To: Julia Lawall <julia.lawall@lip6.fr>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Coccinelle <cocci@systeme.lip6.fr>,
linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org,
Fabian Frederick <fabf@skynet.be>, Joe Perches <joe@perches.com>
Subject: Re: [patch 119/197] scripts/coccinelle/free: Delete NULL test before freeing functions
Date: Wed, 06 May 2015 15:45:23 +0200 [thread overview]
Message-ID: <554A1AF3.9010802@users.sourceforge.net> (raw)
In-Reply-To: <alpine.DEB.2.02.1408091028520.2016@localhost6.localdomain6>
>>> +@r depends on context || report || org @
>>> +expression E;
>>> +position p;
>>> +@@
>>> +
>>> +* if (E)
>>> +* \(kfree@p\|debugfs_remove@p\|debugfs_remove_recursive@p\|usb_free_urb\)(E);
>>
>> How do you think about to add the construct "@p" also behind the function name
>> "usb_free_urb"?
>
> Yes, that would be needed, thanks. Also, it was recently suggested to add
> of_node_put to the list of things that are checked for.
Would you like to achieve further improvements for this approach?
https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/tree/scripts/coccinelle/free/ifnullfree.cocci?id=refs/tags/v4.0.1#n34
Regards,
Markus
next prev parent reply other threads:[~2015-05-06 13:45 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <53e53fd1.zO3IbUqJ421c7VXf%akpm@linux-foundation.org>
2014-08-09 8:22 ` [Cocci] [patch 119/197] scripts/coccinelle/free: Delete NULL test before freeing functions SF Markus Elfring
2014-08-09 8:22 ` SF Markus Elfring
2014-08-09 8:22 ` SF Markus Elfring
2014-08-09 8:37 ` [Cocci] " Julia Lawall
2014-08-09 8:37 ` Julia Lawall
2014-08-09 8:37 ` Julia Lawall
2014-08-09 9:13 ` [Cocci] [patch 119/197] scripts/coccinelle/free: Delete NULL test before freeing functions? SF Markus Elfring
2014-08-09 9:13 ` SF Markus Elfring
2014-08-09 9:13 ` SF Markus Elfring
2015-05-06 13:45 ` SF Markus Elfring [this message]
2015-05-06 13:45 ` [patch 119/197] scripts/coccinelle/free: Delete NULL test before freeing functions SF Markus Elfring
2015-05-06 13:45 ` SF Markus Elfring
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=554A1AF3.9010802@users.sourceforge.net \
--to=elfring@users.sourceforge.net \
--cc=cocci@systeme.lip6.fr \
/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.