Re: [Cocci] [PATCH] coccinelle: semantic patch for missing of_node_put

2019-05-08 Thread wen.yang99
Hi Markus, Thanks for the review. > > The call to of_parse_phandle()/of_find_node_by_name() ... returns a node > > pointer with refcount incremented thus it must be explicitly decremented > > after the last usage. > > > > This SmPL is also looking for places where there is an of_node_put on > >

Re: [Cocci] [PATCH] coccinelle: semantic patch for missing of_node_put

2019-05-07 Thread Markus Elfring
> The call to of_parse_phandle()/of_find_node_by_name() ... returns a node > pointer with refcount incremented thus it must be explicitly decremented > after the last usage. > > This SmPL is also looking for places where there is an of_node_put on > some path but not on others. I suggest to improv

[Cocci] [PATCH] coccinelle: semantic patch for missing of_node_put

2019-05-07 Thread Wen Yang
The call to of_parse_phandle()/of_find_node_by_name() ... returns a node pointer with refcount incremented thus it must be explicitly decremented after the last usage. This SmPL is also looking for places where there is an of_node_put on some path but not on others. Suggested-by: Julia Lawall Si

Re: [Cocci] [PATCH] coccinelle: semantic patch for missing of_node_put

2019-03-15 Thread Markus Elfring
> +/// Find missing of_node_put > +/// > +// Confidence: Moderate How much would you like to improve the situation around recurring software development concerns for such source code analysis approaches? > +virtual report > +virtual org I would interpret the provided SmPL code in the way that i

Re: [Cocci] [PATCH] coccinelle: semantic patch for missing of_node_put

2019-03-15 Thread Julia Lawall
On Fri, 15 Mar 2019, Wen Yang wrote: > Looking for places where there is an of_node_put on some paths > but not on others. This SmPL checks that there is a put of the > same data elsewhere in the function, so perhaps that will > alleviate the concern about puts where they are not needed, > whil

[Cocci] [PATCH] coccinelle: semantic patch for missing of_node_put

2019-03-14 Thread Wen Yang
Looking for places where there is an of_node_put on some paths but not on others. This SmPL checks that there is a put of the same data elsewhere in the function, so perhaps that will alleviate the concern about puts where they are not needed, while still making it possible to find the ones that ar