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]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux