lkml.org 
[lkml]   [2015]   [May]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch 119/197] scripts/coccinelle/free: Delete NULL test before freeing functions
>>> +@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



\
 
 \ /
  Last update: 2015-05-06 16:21    [W:0.031 / U:0.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site