Powered by Linux
Re: devm_ on lists — Semantic Matching Tool

Re: devm_ on lists

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, May 18, 2023 at 10:02:01AM +0200, Marion & Christophe JAILLET wrote:
> > Nice!
> > 
> > A really naive:
> > @r@
> > expression m;
> > identifier alloc_fn =~ "devm_";
> > identifier list_fn =~ "list_add";
> > @@
> > 
> > *    m = alloc_fn(...);
> >      ...
> > *    list_fn(..., <+... m ...+>, ...);
> > 
> > 
> > also seems to give some decent results.
> > Written as-is, there is a lot of false positive, but is a start.
> > 
> > I'll give it a look.
> > 
> 
> BTW, in such cases, should a Suggested-by, or something else be added?

Suggested by for the script or for every bug it finds???  For the script
obviously that's a suggestion.  Otherwise if you're finding the bugs
with a script you wrote then take all the credit.

regards,
dan carpenter




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux