From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752705AbcFUTW6 (ORCPT ); Tue, 21 Jun 2016 15:22:58 -0400 Received: from mail.kernel.org ([198.145.29.136]:46054 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751648AbcFUTWU (ORCPT ); Tue, 21 Jun 2016 15:22:20 -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 5/8] scripts: add Linux .cocciconfig for coccinelle Date: Tue, 21 Jun 2016 12:21:30 -0700 Message-Id: <1466536893-23355-6-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 Help Coccinelle when used against Linux with a set of sensible defaults options for Linux. This hints to coccinelle git can be used for 'git grep' queries over coccigrep. A timeout of 200 seconds should suffice for now. If you use idutils you can override for 'make coccicheck' by using the SPFLAGS option as follows: First build the index, for example: mkid -s Pick the cocci file you wnat to work with: export COCCI=scripts/coccinelle/misc/irqf_oneshot.cocci Then run coccicheck: $ make coccicheck V=1 MODE=report SPFLAGS="--use-idutils ID" Coccinelle supports reading .cocciconfig from different directories, the later one overriding the previous reads in the following order: o Your current user's home directory is processed first o Your directory from which spatch is called is processed next o The directory provided with the --dir option is processed last, if used Signed-off-by: Luis R. Rodriguez --- .cocciconfig | 3 +++ .gitignore | 1 + 2 files changed, 4 insertions(+) create mode 100644 .cocciconfig diff --git a/.cocciconfig b/.cocciconfig new file mode 100644 index 000000000000..43967c6b2015 --- /dev/null +++ b/.cocciconfig @@ -0,0 +1,3 @@ +[spatch] + options = --timeout 200 + options = --use-gitgrep diff --git a/.gitignore b/.gitignore index 2be25f771bd8..c2ed4ecb0acd 100644 --- a/.gitignore +++ b/.gitignore @@ -67,6 +67,7 @@ Module.symvers # !.gitignore !.mailmap +!.cocciconfig # # Generated include files -- 2.8.2