From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752000AbcFNWKx (ORCPT ); Tue, 14 Jun 2016 18:10:53 -0400 Received: from mail.kernel.org ([198.145.29.136]:38294 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752048AbcFNWK2 (ORCPT ); Tue, 14 Jun 2016 18:10:28 -0400 From: "Luis R. Rodriguez" To: Julia.Lawall@lip6.fr, Gilles.Muller@lip6.fr, nicolas.palix@imag.fr, mmarek@suse.com Cc: linux-kernel@vger.kernel.org, cocci@systeme.lip6.fr, "Luis R. Rodriguez" Subject: [PATCH 4/4] scripts/coccinelle: require coccinelle >= 1.0.4 on device_node_continue.cocci Date: Tue, 14 Jun 2016 15:10:17 -0700 Message-Id: <1465942217-14452-5-git-send-email-mcgrof@kernel.org> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1465942217-14452-1-git-send-email-mcgrof@kernel.org> References: <1465942217-14452-1-git-send-email-mcgrof@kernel.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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