Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

coccinelle: Remove unnecessary parentheses for only one possible change.

The parentheses are only needed if there is a disjunction, ie a
set of possible changes. If there is only one pattern, we can
remove these parentheses. Just like the format:

- x
+ y

not:

(
- x
+ y
)

Signed-off-by: Hongbo Li <lihongbo22@huawei.com>
Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>

authored by

Hongbo Li and committed by
Julia Lawall
f584e375 253244cd

-8
-8
scripts/coccinelle/api/string_choices.cocci
··· 43 43 @str_up_down depends on patch@ 44 44 expression E; 45 45 @@ 46 - ( 47 46 - ((E) ? "up" : "down") 48 47 + str_up_down(E) 49 - ) 50 48 51 49 @str_up_down_r depends on !patch exists@ 52 50 expression E; 53 51 position P; 54 52 @@ 55 - ( 56 53 * ((E@P) ? "up" : "down") 57 - ) 58 54 59 55 @script:python depends on report@ 60 56 p << str_up_down_r.P; ··· 62 66 @str_down_up depends on patch@ 63 67 expression E; 64 68 @@ 65 - ( 66 69 - ((E) ? "down" : "up") 67 70 + str_down_up(E) 68 - ) 69 71 70 72 @str_down_up_r depends on !patch exists@ 71 73 expression E; 72 74 position P; 73 75 @@ 74 - ( 75 76 * ((E@P) ? "down" : "up") 76 - ) 77 77 78 78 @script:python depends on report@ 79 79 p << str_down_up_r.P;