Re: [Cocci] [PATCH v3] coccinelle: semantic code search for missingof_node_put

2019-07-16 Thread wen.yang99
Hi Markus, > > We find these functions by using the following script: > > Why would you like to keep this SmPL code in the commit description? > > I would prefer software evolution in an other direction. > https://lore.kernel.org/lkml/44be5924-26ca-5106-aa25-3cbc3343a...@web.de/ > https://lkml.o

Re: [Cocci] [PATCH v2] coccinelle: semantic code search formissingof_node_put

2019-07-04 Thread wen.yang99
> > > > > +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(...); > > > > > > Did you actually test this? I doubt that a position metavaria

Re: [Cocci] [PATCH v2] coccinelle: semantic code search for missingof_node_put

2019-07-03 Thread wen.yang99
> > > +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(...); > > Did you actually test this? I doubt that a position metavariable can be > put on a ) of a disjunction. >

[Cocci] 答复: Re: [PATCH v2] coccinelle: semantic code search for missingof_node_put

2019-07-03 Thread wen.yang99
> > The counter must be decremented after the last usage of a device node. > > Thanks for your next try to improve the software situation > also in this area. > > > > We find these functions by using the following SmPL: > > Would it be nicer to use the word “script” also here? > OK, we will re

Re: [Cocci] Coccinelle: semantic patch for missing of_node_put

2019-06-04 Thread wen.yang99
> > We currently use the following Ocaml script to automatically > > collect functions that need to be considered. > > > > @initialize:ocaml@ > > @@ > > > > let relevant_str = "use of_node_put() on it when done" > > I suggest to reconsider this search pattern. > > The mentioned words are distribu

Re: [Cocci] Coccinelle: semantic patch for missing of_node_put

2019-06-03 Thread wen.yang99
> > 2, A general method. > > We also try to get the list of functions to consider by writing a SmPL, > > but this method is not feasible at present, because it is not easy to parse > > the comment > > header information of these functions. > > The situation was improved once more also for the Coc

Re: [Cocci] [4/5] Coccinelle: put_device: Extend when constraints for twoSmPL ellipses

2019-05-14 Thread wen.yang99
> Subject: Re: [4/5] Coccinelle: put_device: Extend when constraints for > twoSmPL ellipses > >> Can you agree to any information which I presented in the commit message? > > Do you find this description inappropriate? > > > >>> You don't need so many type metavariables. > >> > >> It seems that

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] [v6] coccinelle: semantic code search for missing put_device()

2019-02-19 Thread wen.yang99
> > Do you have any other questions? > > Obviously, yes. > I am curious if this development discussion and code review will trigger > further software adjustments. > I guess that you will need additional time to reconsider specific items > from recent feedback. > > Will corrections become relevan

Re: [Cocci] [v6] coccinelle: semantic code search for missing put_device()

2019-02-18 Thread wen.yang99
> > I would have a hard time saying which one is more reasonable to test, > I suggest to reconsider the interpretation of this software situation once > more. > > since both are extremely unlikely. > I disagree to this view because two ellipses were intentionally specified > in published SmPL scr

Re: [Cocci] [v6] coccinelle: semantic code search for missing put_device()

2019-02-17 Thread wen.yang99
> > when != e = id achieves this behavior. > > I can not agree to this view completely because of the meaning that is > connected > with these variable identifiers. > > Both metavariables share the kind “expression”. So I can imagine > that there is an intersection for the source code match poss