[Linux-kernel-mentees] [PATCH] parsing_hacks: Add bool to list of known typedefs

Jaskaran Singh jaskaransingh7654321 at gmail.com
Tue Jan 21 06:31:40 UTC 2020


On Tue, 2020-01-21 at 06:23 +0000, Julia Lawall wrote:
> 
> On Sun, 19 Jan 2020, Jaskaran Singh wrote:
> 
> > bool is widely used in the Linux kernel. Certain cases of
> > parsing_hacks.ml would mislabel bool.
> > 
> > Add bool to the list of known typedefs.
> 
> As far as I can see, this function is only used for avoiding to print
> some
> warning messages.  So I'm not sure why it would have any impact on
> the
> parsing at all?
> 

Sorry, It should've been clear in the patch.

This patch will only make any difference if it's applied on top of 
https://www.mail-archive.com/cocci@systeme.lip6.fr/msg06706.html

Cheers,
Jaskaran.

> julia
> 
> > Stats of --parse-c on Linux v5.5-rc4 are as follows:
> > 
> > Before:
> > 
> >   nb good = 18956150,  nb passed = 134062 =========> 0.70% passed
> > 
> > After:
> > 
> >   nb good = 18956150,  nb passed = 134073 =========> 0.70% passed
> > 
> > Signed-off-by: Jaskaran Singh <jaskaransingh7654321 at gmail.com>
> > ---
> > The above diff has been obtained after applying
> > https://www.mail-archive.com/cocci@systeme.lip6.fr/msg06706.html
> > 
> >  parsing_c/parsing_hacks.ml | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/parsing_c/parsing_hacks.ml
> > b/parsing_c/parsing_hacks.ml
> > index 685a4908..5e3301a0 100644
> > --- a/parsing_c/parsing_hacks.ml
> > +++ b/parsing_c/parsing_hacks.ml
> > @@ -61,7 +61,7 @@ let is_known_typdef =
> >        | "u_char"   | "u_short"  | "u_int"  | "u_long"
> >        | "u8" | "u16" | "u32" | "u64"
> >        | "s8"  | "s16" | "s32" | "s64"
> > -      | "__u8" | "__u16" | "__u32"  | "__u64"
> > +      | "__u8" | "__u16" | "__u32"  | "__u64" | "bool"
> >          -> true
> > 
> >        | "acpi_handle"
> > --
> > 2.21.1
> > 
> > 



More information about the Linux-kernel-mentees mailing list