Re: [PATCH] comedi: Annotate struct comedi_lrange with __counted_by

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

 



Le 01/10/2023 à 09:25, Julia Lawall a écrit :

This is not found due to the regular expression used for the name of the
alloc function.  Maybe you could drop it entirely?  Maybe you could just
check for alloc somewhere in the string?

That's how I found it.
I simplified a lot Kees's script and looked for function names that did *not* match his regex.

Functions that:
   - return a pointer to a struct
   - are used with struct_size()
- store the value used to compite the size in another field of the struct

are good enough candidates.
I think that removing the regex all together would be just good enough.

CJ


identifier ALLOC =~ "alloc";

works in this case.

Also, I see in the link that you have:

// Options: --all-includes

You can actually force this by putting

#spatch --all-includes

Nice, thanks for the tip.


and any other options you want.

julia







[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