coccinelle: semantic patch for missing put_device()
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 10 lines · On Fri, 15 Feb 2019, [email protected] wrote:
Quoted 2 lines
How do you think about to exchange the word “patch” by “code search” at affected places (and in the subject) then?
Thanks, we‘ll fix it.
Quoted 3 lines
Quoted 1 line
In a function, for variables returned by calling
of_find_device_by_node(),Do variables really get returned?
The provided pointer should usually be stored somewhere.Thank you very much, we will consider this situation and submit a next version to fix it.
I don't know what Markus is talking about here, so I'm not sure that a change is needed.
Quoted 7 lines
Quoted 3 lines
* Would you like to pick any software development challenges up around inter-procedural data flow (or even escape) analysis for the shown use case?
We are very interested in doing this work, but currently coccinelle may not support data flow analysis, and we hope to contribute a little.
Quoted 8 lines
Quoted 1 line
Would you like to add a SPDX identifier?
OK, we will add a SPDX identifierfix soon.
Quoted 2 lines
Quoted 1 line
+ "ERROR: missing
put_device;"Will change confidence considerations result in another fine-tuning for this message?
Thank you, we will change "ERROR" to "WARNING".
I think ERROR is fine. If it is a real positive than it is a real problem. Warning is for things that look ugly, but don't have any impact on the execution.
julia
Quoted 13 lines
Quoted 2 lines
Quoted 1 line
+ + " call
of_find_device_by_nodeon line "I find that such a split string literal can be unwanted.
Thank you, we will fix it soon.
Quoted 3 lines
Quoted 1 line
+ + " and return without releasing.")
Possible rewording?
+ + " but without a corresponding object release within this function.")Thanks, we will modify it according to your suggestion.
Regards,
Wen
Quoted 7 lines
Quoted 5 lines
Quoted 3 lines
Quoted 1 line
In a function, for variables returned by calling
of_find_device_by_node(),Do variables really get returned?
The provided pointer should usually be stored somewhere.Thank you very much, we will consider this situation and submit a next version to fix it.
I don't know what Markus is talking about here,
I find that my feedback contained details for two items.
1. I suggested another adjustment for a wording in the evolving commit description.
2. Should any more case distinctions be taken into account for the data storage of function return values so that the shown source code search approach can become safer?
Quoted 1 line
so I'm not sure that a change is needed.
I am curious if there is a need for further clarifications then.
Quoted 6 lines
Quoted 4 lines
Quoted 2 lines
Quoted 1 line
+ "ERROR: missing
put_device;"Will change confidence considerations result in another fine-tuning for this message?
Thank you, we will change "ERROR" to "WARNING".
I think ERROR is fine.
I have got a different software development view for the possible severity information.
Quoted 1 line
If it is a real positive than it is a real problem.
I can agree to this information.
You specified also a precondition.
How should be achieved that the source code analysis will not point false positives out?
Quoted 1 line
Warning is for things that look ugly,
I am also curious on how views will evolve around such ugliness.
Quoted 1 line
but don't have any impact on the execution.
I find such a restriction questionable.
Would you like to share any more ideas for safe data flow analysis (eventually also together with your software)?
Regards,
Markus