lkml.org 
[lkml]   [2023]   [Oct]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] comedi: Annotate struct comedi_lrange with __counted_by
From
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
>
>


\
 
 \ /
  Last update: 2023-10-01 09:50    [W:0.058 / U:25.664 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site