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: Add rules to find str_yes_no() replacements

As other rules done, we add rules for str_yes_no()
to check the relative opportunities.

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
253244cd 9b5b4810

+19
+19
scripts/coccinelle/api/string_choices.cocci
··· 298 298 @@ 299 299 300 300 coccilib.report.print_report(p[0], "opportunity for str_on_off(%s)" % e) 301 + 302 + @str_yes_no depends on patch@ 303 + expression E; 304 + @@ 305 + - ((E) ? "yes" : "no") 306 + + str_yes_no(E) 307 + 308 + @str_yes_no_r depends on !patch exists@ 309 + expression E; 310 + position P; 311 + @@ 312 + * ((E@P) ? "yes" : "no") 313 + 314 + @script:python depends on report@ 315 + p << str_yes_no_r.P; 316 + e << str_yes_no_r.E; 317 + @@ 318 + 319 + coccilib.report.print_report(p[0], "opportunity for str_yes_no(%s)" % e)