Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp8399764imu; Fri, 28 Dec 2018 17:33:52 -0800 (PST) X-Google-Smtp-Source: ALg8bN64K4fWoZJLwLeuiAs1hYNnFp9UcGHLhxNqjy8okzxTROHw5hhRyfeeOvZ1Cns1AKgD+zUE X-Received: by 2002:a63:2a4a:: with SMTP id q71mr28197002pgq.374.1546047232460; Fri, 28 Dec 2018 17:33:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1546047232; cv=none; d=google.com; s=arc-20160816; b=YxviGVaTU6btxaRC8tTvIbFdrc61J75lnrbxwfVRBmHC9L511JnYI3bg/HHGOtVI71 ABM9r3CBi8BDV7fNXLlH86j7bZ/sFYGc9cYZODa9Pk4tRH5P8qlRWlK57IQIW4V7n//1 6rrw5tLMDAW8rezw+NIrlQMOS+3CCcEvTnL8MOxIxmPnz/uARJpvyuh0Y24ZGnNRZYNt f6OuDKzvVfHlbk287sKFqGBQmP9A0mQYVFFBjuD9G76Okg6Dg2UGysycIE6sslUGxDe6 NrfZyOcA66hzIxa59PryBkltOcqodbeltpV/ALK6TvjwuBiPOIy9YN+3tfuegkHgUClH 24Kg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=oTbWHkeZ+2giBSggERb+tenQboFUTGI4wVIuOXBCL14=; b=WGLovtWib4vj7drjgOl3Gzl4H2NPrRqyPb5D9KdCXpBY/hOdbEutI3rI2iUfA58izJ 6/SBl9i4TWR+OSZ+M/UIP10/w7LHqlc334bhre5/HlSwQCufxXguQB4KjWX2qDs07tWc ymfOnkHgdSjb2bxGVdYF9yr+jwIBUjv6x1oyyUqcolWinhHKFY1D85YPFUnNIMRr6v5h sOB1q/YsXFj8lSlviVRRGWME5UpISXCZuQ2MDQ05nxuV9IHro+9paCbvvBQY8DRBnYz1 OzEunSKEAyJmIqPiGxhw+GGSPu6JghCYUvM2Xcz1qrLK47ksmMr8h8eKq4ztm+46/Icr bw2w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p64si35820557pfg.79.2018.12.28.17.33.37; Fri, 28 Dec 2018 17:33:52 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728808AbeL1PZo (ORCPT + 99 others); Fri, 28 Dec 2018 10:25:44 -0500 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:59441 "EHLO mail2-relais-roc.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725974AbeL1PZn (ORCPT ); Fri, 28 Dec 2018 10:25:43 -0500 X-IronPort-AV: E=Sophos;i="5.56,410,1539640800"; d="scan'208";a="362015778" Received: from palace.lip6.fr ([132.227.105.202]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/AES128-SHA256; 28 Dec 2018 16:25:41 +0100 From: Julia Lawall To: Masahiro Yamada Cc: kernel-janitors@vger.kernel.org, Gilles Muller , Nicolas Palix , Michal Marek , cocci@systeme.lip6.fr, linux-kernel@vger.kernel.org, "Jason A . Donenfeld" Subject: [PATCH] scripts/coccinelle: check for redeclaration Date: Fri, 28 Dec 2018 15:49:01 +0100 Message-Id: <1546008541-3175-1-git-send-email-Julia.Lawall@lip6.fr> X-Mailer: git-send-email 1.9.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Avoid reporting on the use of an iterator index variable when the variable is redeclared. Signed-off-by: Julia Lawall --- scripts/coccinelle/iterators/use_after_iter.cocci | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/coccinelle/iterators/use_after_iter.cocci b/scripts/coccinelle/iterators/use_after_iter.cocci index ce8cc9c..66a1140 100644 --- a/scripts/coccinelle/iterators/use_after_iter.cocci +++ b/scripts/coccinelle/iterators/use_after_iter.cocci @@ -35,6 +35,7 @@ iterator name hlist_for_each_entry_from; iterator name hlist_for_each_entry_safe; statement S; position p1,p2; +type T; @@ ( @@ -125,6 +126,8 @@ sizeof(<+...c...+>) | &c->member | +T c; +| c = E | *c@p2