Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp478563ybt; Fri, 19 Jun 2020 06:29:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwdW410e+lBh70RmG/mia4QjS+DaucVdxf5js2alGc+FKgh8nx+n4HCmHoas4B78fz6+wi9 X-Received: by 2002:aa7:c756:: with SMTP id c22mr3350386eds.239.1592573352658; Fri, 19 Jun 2020 06:29:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592573352; cv=none; d=google.com; s=arc-20160816; b=rJ5nIissYvidXMopeqj9WcVQ3foSJ1HmfRjTEAUR/IIAX4QL8NhNx41AopQdfwKmSs W0ftoDNZUImZ1ADlJijzfzihwcP5+0gx9rXJG5jq8JsCqqQmaoW+v6c7zjNQOuxCwoAq S1oSHiN8z7im+E9lJzQFvgg0iBSFEBsnBewCNCfT7pVPwfBojOupABPNHTjc7FmKdTYU 5OQidfs3rYOBqZ2bRCgD/PEt1BaCbs6hqM//GlVdkJrYvXYo3jJKJKe0cMjAorBVcoYb BioEdNLkKLr3tbXsGWCXD3AahT1+LZVaYHhvCDdDAXi5ex97F8Q58YQkAhdLtO3Nb7bK cIqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=E/TRBC6roif3JRfR0eyS1Twcm7a48T8psf0xx78VupM=; b=l+pRV3zqkULtR5CsqR4XkdJdsTf6GTlx1qeKTR/2ofhkAOd4owHTGJeGEdlAVoRHtc Q2Ac4J+oxFkY2P3b770z3MxRPH+1cf78ViFsA+PgsfIR9WGZ2O6/eKBWlOJ6d4egQN40 z7YEWICDf6uevyaNRg21NryAWe6HVKPAxRJ09kHMYKbKCXr4ex9GRmn0+e/zEq7QMWOX ahGT8B5p+Pt/+v7Hud3EGIHmZBr5HD0J/A+Nu6z3MTT1WhcsNkw9d116LTVY/VPtkzWZ 4tiwnPylI1eqo3XJHVeVQB9pkY7bm/n1pZ0P6Vkc25jx1oRCzGo7WQI8XTzQr9rLtfGe n7Cw== 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 f19si3789635ejc.31.2020.06.19.06.28.49; Fri, 19 Jun 2020 06:29:12 -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 S1732663AbgFSNXZ (ORCPT + 99 others); Fri, 19 Jun 2020 09:23:25 -0400 Received: from mail-lj1-f194.google.com ([209.85.208.194]:39132 "EHLO mail-lj1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731756AbgFSNXW (ORCPT ); Fri, 19 Jun 2020 09:23:22 -0400 Received: by mail-lj1-f194.google.com with SMTP id a9so11461300ljn.6 for ; Fri, 19 Jun 2020 06:23:21 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=E/TRBC6roif3JRfR0eyS1Twcm7a48T8psf0xx78VupM=; b=XVPsDm+7s2P2YAk/NpTntK+gfNAwBj18+coRFPXf7MzTIgFenroCj1lr4t/Kw7ya9E EDRoB/ZxIz2i62zDkJTOk+K+dm9x7xXiONRiyjadEZ9PGXLc848A4L1aj+7BKsgD8nep rk7T6e/JVwlH10t0c/rv5omggD4Oi+UYadqdswsObtKITerUPoyurD0c4hT09kz4f2y0 Nk5j+AKNtYaabM/onwARZmr4Negk1hr4HWxD0UWUL5HERKpN2aDpc1ZV1G6RceEGaEz7 2nsGcqSmGmglWObzP/E1mSBAsxz4YiZ6o80jON3uU13GeJbjOj62BcOIQx2qpARFVjCF HemQ== X-Gm-Message-State: AOAM533xgqaTq8KWJpMrgbpWxEKpX+B3wHCzcHb7gS7sbYUi4N9fOMhi pie2A3jXnUhrF6maTXpICOXIYlDnYSf4BQ== X-Received: by 2002:a2e:b615:: with SMTP id r21mr1773433ljn.1.1592573000818; Fri, 19 Jun 2020 06:23:20 -0700 (PDT) Received: from localhost.localdomain ([213.87.137.195]) by smtp.googlemail.com with ESMTPSA id q11sm1398026lfe.34.2020.06.19.06.23.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Jun 2020 06:23:20 -0700 (PDT) From: Denis Efremov To: Julia Lawall Cc: Denis Efremov , cocci@systeme.lip6.fr, linux-kernel@vger.kernel.org Subject: [PATCH] coccinelle: api/kstrdup: fix coccinelle position Date: Fri, 19 Jun 2020 16:23:07 +0300 Message-Id: <20200619132307.16612-1-efremov@linux.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org There is a typo in rule r2. Position p1 should be attached to kzalloc() call. 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