From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A1B9EC5519F for ; Wed, 18 Nov 2020 13:15:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 35499241A5 for ; Wed, 18 Nov 2020 13:15:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726457AbgKRNP4 (ORCPT ); Wed, 18 Nov 2020 08:15:56 -0500 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:13181 "EHLO mail2-relais-roc.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725814AbgKRNP4 (ORCPT ); Wed, 18 Nov 2020 08:15:56 -0500 X-IronPort-AV: E=Sophos;i="5.77,486,1596492000"; d="scan'208";a="478177596" Received: from 173.121.68.85.rev.sfr.net (HELO hadrien) ([85.68.121.173]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 18 Nov 2020 14:15:54 +0100 Date: Wed, 18 Nov 2020 14:15:53 +0100 (CET) From: Julia Lawall X-X-Sender: jll@hadrien To: Markus Elfring cc: Sumera Priyadarsini , Coccinelle , Gilles Muller , Nicolas Palix , kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [Cocci] [PATCH v2] coccinelle: locks: Add balancedlock.cocci script In-Reply-To: <62af4a93-dbc3-8aa0-6924-4dc479001d34@web.de> Message-ID: References: <20201118080242.t6u6lchj5ww2fac4@adolin> <62af4a93-dbc3-8aa0-6924-4dc479001d34@web.de> User-Agent: Alpine 2.22 (DEB 394 2020-01-19) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="8323329-1777813137-1605705354=:2641" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --8323329-1777813137-1605705354=:2641 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT > > +++ b/scripts/coccinelle/locks/balancedlock.cocci > … > > +//# False positives may be generated due to locks released within a nested > > +//# function call or a goto block. > > +/// > > +// Confidence: Moderate > > How good does such information fit together? > What kind of response do you expect? There are some concerns, so it's not High confidence. It works pretty well so it's not low confidence. So it's moderate confidence. What else is there to say? > … > >+ ( > > +mutex_lock@p(E); > > +| > > +read_lock@p(E); > > +| > … > > Why did you not reorder the elements of such a SmPL disjunctions according to > an usage incidence (which can be determined by another SmPL script like > “report_lock_calls.cocci”)? I don't recall ever seeing any evidence that it has an impact for function calls. Furthermore, the numbers will change over time. So why change it? > … > > +msg = "This code segment might have an unbalanced lock." > > +coccilib.org.print_todo(j0[0], msg) > > Please pass the string literal directly. > > +coccilib.org.print_todo(j0[0], "This code segment might have an unbalanced lock.") The code is fine as it is. julia --8323329-1777813137-1605705354=:2641--