Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 974E0C87FCB for ; Sun, 3 Aug 2025 05:34:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=inria.fr; s=dc; h=date:from:to:cc:in-reply-to:message-id:references: mime-version:subject:reply-to:sender:list-id:list-help: list-subscribe:list-unsubscribe:list-post:list-owner: list-archive; bh=uWlQJBsqpnylUxAK0TTx//Acr95nutAZeAN/ha4TCXI=; b=Zvngx6Uv3t9G69s9pSMEglBmUSOf+aHdpNrK1MIWSAo2fU50HriSgKb2 paULN8Pk3JXpRCBbfWrkdXgfYn0enA6L62rQTzHzHP8lHz3ZZ90+mlxJv X0NxfLUwSwa/MFgSec7d3U2GS6nmLBwa9GBMvtAh0hCiJpUo9Y4yLH8fT I=; X-CSE-ConnectionGUID: SZl8cVtxRqK+d9god7MOMA== X-CSE-MsgGUID: DuUNlmY2Q1a5TwPxM0NDNQ== Received-SPF: Pass (mail2-relais-roc.national.inria.fr: domain of cocci-owner@inria.fr designates 128.93.162.160 as permitted sender) identity=mailfrom; client-ip=128.93.162.160; receiver=mail2-relais-roc.national.inria.fr; envelope-from="cocci-owner@inria.fr"; x-sender="cocci-owner@inria.fr"; x-conformance=spf_only; x-record-type="v=spf1"; x-record-text="v=spf1 include:mailout.safebrands.com a:basic-mail.safebrands.com a:basic-mail01.safebrands.com a:basic-mail02.safebrands.com ip4:128.93.142.0/24 ip4:192.134.164.0/24 ip4:128.93.162.160 ip4:128.93.162.3 ip4:128.93.162.88 ip4:89.107.174.7 mx ~all" Received-SPF: None (mail2-relais-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@sympa.inria.fr) identity=helo; client-ip=128.93.162.160; receiver=mail2-relais-roc.national.inria.fr; envelope-from="cocci-owner@inria.fr"; x-sender="postmaster@sympa.inria.fr"; x-conformance=spf_only Authentication-Results: mail2-relais-roc.national.inria.fr; spf=Pass smtp.mailfrom=cocci-owner@inria.fr; spf=None smtp.helo=postmaster@sympa.inria.fr; dkim=pass (signature verified) header.i=@inria.fr X-IronPort-AV: E=Sophos;i="6.17,258,1747692000"; d="scan'208";a="233991827" Received: from prod-listesu18.inria.fr (HELO sympa.inria.fr) ([128.93.162.160]) by mail2-relais-roc.national.inria.fr with ESMTP; 03 Aug 2025 07:34:13 +0200 Received: by sympa.inria.fr (Postfix, from userid 20132) id 0D2B3E0B0D; Sun, 3 Aug 2025 07:34:13 +0200 (CEST) Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by sympa.inria.fr (Postfix) with ESMTPS id 74199E0171 for ; Sun, 3 Aug 2025 07:34:11 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=inria.fr; s=dc; h=date:from:to:cc:subject:in-reply-to:message-id: references:mime-version; bh=uWlQJBsqpnylUxAK0TTx//Acr95nutAZeAN/ha4TCXI=; b=NWQWkg9qyF3W2rhugeDyC6cL0FaJ1s1o+9wWmIhDxcBZ4Xn1VwC9s4tq 6jWF6bxsYuMD3e/3JnsDsPO2HIyER3uNr59CMUAmXnmTWeirMTtoDs7CH znC3JZihMGPRiHEKzVVcSWl/E8zPQ6LZ1z0MZy1jauZq7MMpAwaCt5KNi M=; X-CSE-ConnectionGUID: 8f+oHC9TRTaez6jxrVeTnw== X-CSE-MsgGUID: 31mtAFdnTSyOA1QhbWSGJg== X-IronPort-AV: E=Sophos;i="6.17,258,1747692000"; d="scan'208";a="122679111" Received: from 231.85.89.92.rev.sfr.net (HELO hadrien) ([92.89.85.231]) by mail3-relais-sop.national.inria.fr with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Aug 2025 07:34:12 +0200 Date: Sun, 3 Aug 2025 07:34:10 +0200 (CEST) From: Julia Lawall X-X-Sender: jll@hadrien To: Markus Elfring cc: cocci@inria.fr, Erick Karanja In-Reply-To: <74b74c33-22d9-4282-bb2c-1c475d715e5d@web.de> Message-ID: References: <6daf83a9-abbf-45f7-b82e-c6207364fd8b@web.de> <7560a81f-ba29-4b16-b8ed-95cb4d72f3f4@web.de> <6239d52e-3213-4083-8d97-9b1f59d2d5b4@web.de> <2130ab11-8ec0-4e57-9a73-5e1ac9e41f7f@web.de> <51664351-746c-4d7a-ae45-2a610ba45176@web.de> <5e8e1f8a-6832-49af-bca5-41d2a13b1322@web.de> <74b74c33-22d9-4282-bb2c-1c475d715e5d@web.de> User-Agent: Alpine 2.22 (DEB 394 2020-01-19) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Subject: Re: [cocci] Searching for lock calls without unlocking (with SmPL)? Reply-To: Julia Lawall X-Loop: cocci@inria.fr X-Sequence: 2953 Errors-To: cocci-owner@inria.fr Precedence: list Precedence: bulk Sender: cocci-request@inria.fr X-no-archive: yes List-Id: List-Help: List-Subscribe: List-Unsubscribe: List-Post: List-Owner: List-Archive: Archived-At: On Sun, 3 Aug 2025, Markus Elfring wrote: > > You do know that > > > > @@ > > expression x; > > @@ > > > > - a(x); > > > > would remove all three calls. right? > > We tend to adjust all affected source code places. > > > > > Why do you expect * to do something different? > > One of the recurring source code analysis tasks can be to point the beginning > of a sequence out. > Thus there are corresponding case distinctions relevant. > > * Presenting only the first hit Which one is th first one? The first one it finds? That seems meaningless. Coccinelle works bottom up. It finds all nodes that match some pattern, then all nodes that are connected to that one, etc. There is no notion of first one. If you mean the first one that appears in the function, I already told you that you can get that by putting ... at the top of the pattern. It may greatly degrade the execution time, though. julia > > * Reconsidering subsequent repetitions > > > Regards, > Markus >