From: Julia Lawall Date: Sat, 29 Dec 2018 06:14:16 +0000 (+0100) Subject: scripts: coccinelle: boolinit: drop warnings on named constants X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=c3003315fbf442d99a73a3fc5288dbf89a735e38;p=linux.git scripts: coccinelle: boolinit: drop warnings on named constants Coccinelle doesn't always have access to the values of named (#define) constants, and they may likely often be bound to true and false values anyway, resulting in false positives. So stop warning about them. Signed-off-by: Julia Lawall Signed-off-by: Masahiro Yamada --- diff --git a/scripts/coccinelle/misc/boolinit.cocci b/scripts/coccinelle/misc/boolinit.cocci index b0584a33c9214..aabb581fab5cd 100644 --- a/scripts/coccinelle/misc/boolinit.cocci +++ b/scripts/coccinelle/misc/boolinit.cocci @@ -136,9 +136,14 @@ position p1; @r4 depends on !patch@ bool b; position p2; +identifier i; constant c != {0,1}; @@ +( + b = i +| *b@p2 = c +) @script:python depends on org@ p << r1.p;