From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758161AbdKOVzV (ORCPT ); Wed, 15 Nov 2017 16:55:21 -0500 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:17381 "EHLO mail2-relais-roc.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753334AbdKOVzL (ORCPT ); Wed, 15 Nov 2017 16:55:11 -0500 X-IronPort-AV: E=Sophos;i="5.44,401,1505772000"; d="scan'208";a="300979130" Date: Wed, 15 Nov 2017 22:55:09 +0100 (CET) From: Julia Lawall X-X-Sender: jll@hadrien To: Masahiro Yamada cc: Linux Kernel Mailing List , Michal Marek , Nicolas Palix , cocci@systeme.lip6.fr Subject: Re: [PATCH] coccinelle: flags.cocci: reorganize patterns to improve efficiency In-Reply-To: Message-ID: References: User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 16 Nov 2017, Masahiro Yamada wrote: > Hi Julia, > > > 2017-11-15 23:51 GMT+09:00 Julia Lawall : > > > > > > On Wed, 15 Nov 2017, Masahiro Yamada wrote: > > > >> Hi Julia, > >> > >> > >> 2017-11-13 1:08 GMT+09:00 Julia Lawall : > >> > An initial rule just matching a function call makes it possible to focus > >> > on one all at a time, which improves performance in complex functions with > >> > multiple locking calls. Using a constraint expression lock2 != pre.lock1; > >> > makes it possible to eliminate the double matching of the lock, lock > >> > sequence. > >> > > >> > Signed-off-by: Julia Lawall > >> > >> > >> If I apply this patch, locks/flags.cocci does not work for me. > >> > >> > >> $ make coccicheck COCCI=scripts/coccinelle/locks/flags.cocci > >> MODE=report DEBUG_FILE=log.txt > >> > >> Please check for false positives in the output before submitting a patch. > >> When using "patch" mode, carefully review the patch before submitting it. > >> > >> 607 610 > >> coccicheck failed > >> $ cat log.txt > >> /usr/bin/spatch -D report --no-show-diff --very-quiet --cocci-file > >> scripts/coccinelle/locks/flags.cocci --no-includes --include-headers > >> --dir . -I ./arch/x86/include -I ./arch/x86/include/generated -I > >> ./include -I ./arch/x86/include/uapi -I > >> ./arch/x86/include/generated/uapi -I ./include/uapi -I > >> ./include/generated/uapi --include ./include/linux/kconfig.h --jobs 8 > >> --chunksize 1 > >> Fatal error: exception Failure("meta: parse error: \n = File > >> \"scripts/coccinelle/locks/flags.cocci\", line 29, column 20, charpos > >> = 607\n around = 'pre', whole content = expression lock2 != > >> pre.lock1;\n") > >> > >> > >> > >> Could you check it? > > > > What version of Coccinelle do you have? > > > I tried 1.0.4 and 1.0.6, > but both failed. For me, it also fails for 1.0.6. It should be OK for 1.0.7. julia > > > (1.0.4 is distribution version (/usr/bin/spatch) on Ubuntu 16.04LTS > > > > The output from 1.0.6 is a bit more readable, > but the content is the same. > > > meta: parse error: > File "scripts/coccinelle/locks/flags.cocci", line 29, column 20, charpos = 607 > around = 'pre', > whole content = expression lock2 != pre.lock1; > > > > -- > Best Regards > Masahiro Yamada >