Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1012626ybt; Fri, 19 Jun 2020 21:35:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwne6nZdrcyu9MpzD3Sq65zShopvKKA+8Aa1P2UXg0hinzKIq+Rv1KZ48H1qHW5Kfru9yEm X-Received: by 2002:a50:f9cc:: with SMTP id a12mr6655097edq.227.1592627756050; Fri, 19 Jun 2020 21:35:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592627756; cv=none; d=google.com; s=arc-20160816; b=A1LSMoWQYm4r4ALfy8jTLI9KRCSYdsZCdX2p7qInNXzwpHAycV+LbVsCNGG4SGPHyu xWttmrCao76K3rCcgnHo+4kBkv686RXcabUsDIZwI7/qLNdZQ0FO65YyKWDuxMRIWRv5 rVoQSZykx57cqHXvuM4MMtGvR4lU8pgMcoNKiF7bNvZdCn0l01vf8Nwp0bwfI6Km+9vd jHgqOnZNtCkUbdSj4xCw1n8jHnGci9w1xbRRryNgDxgfFIbXGtbezumY+HbTydXCxAoR dvFldwwMbDYxAQfK0MBH+6ok+1TplRjpWoWD7GBz9k8Crx9Ngy4XlViQqiH9eQ7IW9lW +SFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date; bh=N6NQfSAwgS4PNfCTQ8tkSgd8TMBOXB8ZXwrLBRL68wo=; b=rtJ1KVe37EtOe+gbvOd/r+ntbn8+qEuY7D27Poh7UmkuDae2qu8UkOJyTjFmBvMbrq f3tVqZjaJ/RVYz7nQZWFUyYK+Zi8cSB8VIPLhoQSfwHV8pwg+YELV8JGopgQkahJaq59 tZ9D+HKbMcdJL4EmHHF4jLxJbfGWKcYnHDZ5i/gUwTI7FX4ak3TBhSjKa/OvN68WGA51 6Pl6Bfota7pkhEEKde70sfIgYTm7N98YtCNJAYaeicrr5F+Kh98JK73hP5cx2XemkyO5 uMrKk2k/i3XxQuPKM7s4ldeKvvpXC93/qOtgHNbRa+FmuciuT/Z8kV0b1rz9CtUlh79i eBJA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f25si4671327ejb.695.2020.06.19.21.35.34; Fri, 19 Jun 2020 21:35:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389330AbgFSTdB (ORCPT + 99 others); Fri, 19 Jun 2020 15:33:01 -0400 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:41533 "EHLO mail2-relais-roc.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389320AbgFSTdB (ORCPT ); Fri, 19 Jun 2020 15:33:01 -0400 X-IronPort-AV: E=Sophos;i="5.75,256,1589234400"; d="scan'208";a="455700223" Received: from abo-173-121-68.mrs.modulonet.fr (HELO hadrien) ([85.68.121.173]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Jun 2020 21:32:59 +0200 Date: Fri, 19 Jun 2020 21:32:58 +0200 (CEST) From: Julia Lawall X-X-Sender: jll@hadrien To: Denis Efremov cc: cocci@systeme.lip6.fr, linux-kernel@vger.kernel.org Subject: Re: [Cocci] [PATCH] coccinelle: api/kstrdup: fix coccinelle position In-Reply-To: <20200619132307.16612-1-efremov@linux.com> Message-ID: References: <20200619132307.16612-1-efremov@linux.com> User-Agent: Alpine 2.22 (DEB 394 2020-01-19) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 19 Jun 2020, Denis Efremov wrote: > There is a typo in rule r2. Position p1 should be attached to kzalloc() > call. Clearly. Thanks. Applied. julia > > Fixes: 29a36d4dec6c ("scripts/coccinelle: improve the coverage of some semantic patches") > Signed-off-by: Denis Efremov > --- > scripts/coccinelle/api/kstrdup.cocci | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/scripts/coccinelle/api/kstrdup.cocci b/scripts/coccinelle/api/kstrdup.cocci > index 19f2645e6076..3c6dc5469ee4 100644 > --- a/scripts/coccinelle/api/kstrdup.cocci > +++ b/scripts/coccinelle/api/kstrdup.cocci > @@ -66,7 +66,7 @@ position p1,p2; > > * x = strlen(from) + 1; > ... when != \( x = E1 \| from = E1 \) > -* to = \(kmalloc@p1\|kzalloc@p2\)(x,flag); > +* to = \(kmalloc@p1\|kzalloc@p1\)(x,flag); > ... when != \(x = E2 \| from = E2 \| to = E2 \) > if (to==NULL || ...) S > ... when != \(x = E3 \| from = E3 \| to = E3 \) > -- > 2.26.2 > > _______________________________________________ > Cocci mailing list > Cocci@systeme.lip6.fr > https://systeme.lip6.fr/mailman/listinfo/cocci >