Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751643AbdHPOQg (ORCPT ); Wed, 16 Aug 2017 10:16:36 -0400 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]:63918 "EHLO mail3-relais-sop.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751454AbdHPOQf (ORCPT ); Wed, 16 Aug 2017 10:16:35 -0400 X-IronPort-AV: E=Sophos;i="5.41,383,1498514400"; d="scan'208";a="234565482" Date: Wed, 16 Aug 2017 16:16:15 +0200 (CEST) From: Julia Lawall X-X-Sender: jll@hadrien To: Elena Reshetova cc: julia.lawall@lip6.fr, linux-kernel@vger.kernel.org, cocci@systeme.lip6.fr, Gilles.Muller@lip6.fr, nicolas.palix@imag.fr, mmarek@suse.com, keescook@chromium.org, ishkamiel@gmail.com Subject: Re: [PATCH v3] provide rule for finding refcounters In-Reply-To: <1502884342-10702-1-git-send-email-elena.reshetova@intel.com> Message-ID: References: <1502884342-10702-1-git-send-email-elena.reshetova@intel.com> 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 Content-Length: 1196 Lines: 40 A few more small issues: When you deleted the disjunction, you kept the surrounding parentheses. you can drop them (lines 83 and 85). I guess that the "del" regular expression is supposed to be matching delete. But it also matches delayed, eg net/batman-adv/bridge_loop_avoidance.c:1495:8-27: atomic_dec_and_test variation before object free at line 1507. In the following result, the lines are at least quite far apart. I don't know if there is some way to consider this to be a false positive: fs/btrfs/disk-io.c:708:14-33: atomic_dec_and_test variation before object free at line 775. julia On Wed, 16 Aug 2017, Elena Reshetova wrote: > changes in v3: > Removed unnessesary rule 4 conditions pointed by Julia. > > changes in v2: > Following the suggestion from Julia the first rule is split into > 2. The output does not differ that much between these two versions, > but rule became more precise. > > Elena Reshetova (1): > Coccinelle: add atomic_as_refcounter script > > scripts/coccinelle/api/atomic_as_refcounter.cocci | 133 ++++++++++++++++++++++ > 1 file changed, 133 insertions(+) > create mode 100644 scripts/coccinelle/api/atomic_as_refcounter.cocci > > -- > 2.7.4 > >