]> git.baikalelectronics.ru Git - kernel.git/commit
coccinelle: grep Options and Requires fields more precisely
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Thu, 26 Oct 2017 04:50:38 +0000 (13:50 +0900)
committerMasahiro Yamada <yamada.masahiro@socionext.com>
Tue, 14 Nov 2017 14:19:04 +0000 (23:19 +0900)
commit3ddf6c8bc96c6954332fd7b7adc6a7aaf52ef0f6
tree4ea88f1ce00fffe032cd47bdbf0ebc6b98696fd0
parent346daf6f4e068fdfc32264142f6c32d1eb7c81a9
coccinelle: grep Options and Requires fields more precisely

Currently, the required version for badzero.cocci is picked up from
its "Comments:" line since it contains the word "Requires".

Surprisingly, ld-version.sh can extract the version number from the
string "Requires Coccinelle version 1.0.0-rc20 or later", but this
expectation is fragile.  Fix the .cocci file.  I removed "-rc20"
because ld-version.sh cannot handle it.

Make the coccicheck script to see exact patterns for "Options:" and
"Requires:" in order to avoid accidental matching to what just happens
to appear in comment lines.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Acked-by: Nicolas Palix <nicolas.palix@imag.fr>
scripts/coccicheck
scripts/coccinelle/null/badzero.cocci