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

2019-02-17 Thread Julia Lawall
On Sun, 17 Feb 2019, Markus Elfring wrote: > >>> +@search exists@ > >>> +local idexpression id; > >>> +expression x,e,e1; > >>> +position p1,p2; > >>> +type T,T1,T2; > >>> +@@ > >>> + > >>> +id = of_find_device_by_node@p1(x) > >>> +... when != e = id > >> > >> I suggest to increase your softwar

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

2019-02-17 Thread Markus Elfring
>>> +@search exists@ >>> +local idexpression id; >>> +expression x,e,e1; >>> +position p1,p2; >>> +type T,T1,T2; >>> +@@ >>> + >>> +id = of_find_device_by_node@p1(x) >>> +... when != e = id >> >> I suggest to increase your software development attention also for >> another implementation detail. >>

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

2019-02-17 Thread Julia Lawall
On Sun, 17 Feb 2019, Markus Elfring wrote: > > +@search exists@ > > +local idexpression id; > > +expression x,e,e1; > > +position p1,p2; > > +type T,T1,T2; > > +@@ > > + > > +id = of_find_device_by_node@p1(x) > > +... when != e = id > > I suggest to increase your software development attention

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

2019-02-17 Thread Markus Elfring
> +@search exists@ > +local idexpression id; > +expression x,e,e1; > +position p1,p2; > +type T,T1,T2; > +@@ > + > +id = of_find_device_by_node@p1(x) > +... when != e = id I suggest to increase your software development attention also for another implementation detail. Source code analysis trigger

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

2019-02-16 Thread Julia Lawall
On Sat, 16 Feb 2019, Wen Yang wrote: > The of_find_device_by_node() takes a reference to the underlying device > structure, we should release that reference. > The implementation of this semantic code search is: > In a function, for a local variable obtained by of_find_device_by_node(), > a, if