Re: [v2] coccinelle: semantic code search for missing of_node_put
From: Markus Elfring
Date: Thu Jul 04 2019 - 01:41:19 EST
> We will also provide an example written in Python later.
Will the code move from the commit description into a file
for your next patch version?
> We first use this script to find out all the function names to be processed,
I am still curious on how the output format selection will become clearer
for the potentially desired automatic data conversion.
> and then copy these function names into r1.
Would this action be performed by another software build script?
>>> +@initialize:python@
>>> +@@
>>> +
>>> +seen = set()
>>> +
>>> +def add_if_not_present (p1, p2):
>>
>> It seems that you would like to use iteration functionality.
I am waiting on another constructive answer for this implementation detail.
>>> +x = @p1\(of_find_all_nodes\|
>>
>> I would find this SmPL disjunction easier to read without the usage
>> of extra backslashes.
>>
>> +x =
>> +(of_â
>> +|of_â
>> +)@p1(...);
>>
>>
>> Which sort criteria were applied for the generation of the shown
>> function name list?
>
> As julia pointed out, your current writing is not compiled.
* It can be needed for a while to specify the mentioned position variable
at an other place.
* Would you like to adjust the SmPL coding style here?
* Will the application of sort criteria be clarified for such identifier lists?
>>> +if (x == NULL || ...) S
>>> +... when != e = (T)x
>>> + when != true x == NULL
â
> Our previous version used the "when any" clause, so we need
> "when != true x == NULL".
I suggest to reconsider further aspects for such constraints.
> We can delete this code exclusion specification for this version.
I would find another assignment exclusion more appropriate at this place.
Regards,
Markus