lkml.org 
[lkml]   [2016]   [Jun]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 4/4] scripts/coccinelle: require coccinelle >= 1.0.4 on device_node_continue.cocci
Date
Make use of the new kernel python requirements library to be able to
specify coccinelle binary version requirements. The cocci file
device_node_continue.cocci requires at least coccinelle 1.0.4.

Signed-off-by: Luis R. Rodriguez <mcgrof@kernel.org>
---
scripts/coccinelle/iterators/device_node_continue.cocci | 13 +++++++++++++
1 file changed, 13 insertions(+)

diff --git a/scripts/coccinelle/iterators/device_node_continue.cocci b/scripts/coccinelle/iterators/device_node_continue.cocci
index 38ab744a4037..b590de9418d1 100644
--- a/scripts/coccinelle/iterators/device_node_continue.cocci
+++ b/scripts/coccinelle/iterators/device_node_continue.cocci
@@ -12,6 +12,19 @@ virtual context
virtual org
virtual report

+// This uses a conjunction, which requires at least coccinelle >= 1.0.4
+@script:python@
+@@
+
+import sys
+from lib import reqs
+
+req = reqs.Req()
+req.coccinelle('1.0.4')
+if not req.reqs_match():
+ cocci.exit()
+ sys.exit(1)
+
@r exists@
expression e1,e2;
local idexpression n;
--
2.8.2
\
 
 \ /
  Last update: 2016-06-15 01:01    [W:0.191 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site