From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [PATCH 3/6] drivers/net/niu.c: adjust array index Date: Mon, 01 Aug 2011 02:27:59 -0700 (PDT) Message-ID: <20110801.022759.1366729474517785485.davem@davemloft.net> References: <1311857165-14780-1-git-send-email-julia@diku.dk> <1311857165-14780-4-git-send-email-julia@diku.dk> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: eric.dumazet-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org, netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org, kernel-janitors-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, mirq-linux-CoA6ZxLDdyEEUmgCuDUIdw@public.gmane.org, bhutchings-s/n/eUQHGBpZroRs9YW3xA@public.gmane.org, shemminger-ZtmgI6mnKB3QT0dZR+AlfA@public.gmane.org To: julia-dAYI7NvHqcQ@public.gmane.org Return-path: In-Reply-To: <1311857165-14780-4-git-send-email-julia-dAYI7NvHqcQ@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: devicetree-discuss-bounces+gldd-devicetree-discuss=m.gmane.org-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org Sender: devicetree-discuss-bounces+gldd-devicetree-discuss=m.gmane.org-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org List-Id: netdev.vger.kernel.org From: Julia Lawall Date: Thu, 28 Jul 2011 14:46:03 +0200 > From: Julia Lawall > > Convert array index from the loop bound to the loop index. > > A simplified version of the semantic patch that fixes this problem is as > follows: (http://coccinelle.lip6.fr/) > > // > @@ > expression e1,e2,ar; > @@ > > for(e1 = 0; e1 < e2; e1++) { <... > ar[ > - e2 > + e1 > ] > ...> } > // > > Signed-off-by: Julia Lawall Applied.