From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751891AbcFUTWZ (ORCPT ); Tue, 21 Jun 2016 15:22:25 -0400 Received: from mail.kernel.org ([198.145.29.136]:45550 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751415AbcFUTWT (ORCPT ); Tue, 21 Jun 2016 15:22:19 -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, akpm@linux-foundation.org, gregkh@linuxfoundation.org, markivx@codeaurora.org, stephen.boyd@linaro.org, zohar@linux.vnet.ibm.com, broonie@kernel.org, ming.lei@canonical.com, tiwai@suse.de, johannes@sipsolutions.net, chunkeey@googlemail.com, hauke@hauke-m.de, jwboyer@fedoraproject.org, dmitry.torokhov@gmail.com, dwmw2@infradead.org, jslaby@suse.com, torvalds@linux-foundation.org, deepa.kernel@gmail.com, cocci@systeme.lip6.fr, "Luis R. Rodriguez" Subject: [PATCH v3 2/8] coccicheck: make SPFLAGS more useful Date: Tue, 21 Jun 2016 12:21:27 -0700 Message-Id: <1466536893-23355-3-git-send-email-mcgrof@kernel.org> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1466536893-23355-1-git-send-email-mcgrof@kernel.org> References: <1466536893-23355-1-git-send-email-mcgrof@kernel.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org SPFLAGS is set early, it means that any heuristics done on coccicheck cannot be overridden currently. Move SPFLAGS after OPTIONS and set this at the end. This lets you override any heuristics as coccinelle treats conflicts by only listening to the last option that makes sense. Signed-off-by: Luis R. Rodriguez --- scripts/coccicheck | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/coccicheck b/scripts/coccicheck index f137b04dfdd3..5319fae910b4 100755 --- a/scripts/coccicheck +++ b/scripts/coccicheck @@ -30,7 +30,7 @@ else NPROC="$J" fi -FLAGS="--very-quiet $SPFLAGS" +FLAGS="--very-quiet" # spatch only allows include directories with the syntax "-I include" # while gcc also allows "-Iinclude" and "-include include" @@ -106,6 +106,9 @@ kill_running() { done } +# You can override heuristics with SPFLAGS, these must always go last +OPTIONS="$OPTIONS $SPFLAGS" + coccinelle () { COCCI="$1" -- 2.8.2