From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752145Ab3BOUDp (ORCPT ); Fri, 15 Feb 2013 15:03:45 -0500 Received: from gate.crashing.org ([63.228.1.57]:45081 "EHLO gate.crashing.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750784Ab3BOUDn (ORCPT ); Fri, 15 Feb 2013 15:03:43 -0500 Subject: Re: [PATCH 8/15] arch/powerpc/platforms/85xx/p1022_ds.c: adjust duplicate test Mime-Version: 1.0 (Apple Message framework v1278) Content-Type: text/plain; charset=us-ascii From: Kumar Gala In-Reply-To: <1358773378-4700-9-git-send-email-Julia.Lawall@lip6.fr> Date: Fri, 15 Feb 2013 14:02:51 -0600 Cc: kernel-janitors@vger.kernel.org, Benjamin Herrenschmidt , Paul Mackerras , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Content-Transfer-Encoding: 7bit Message-Id: References: <1358773378-4700-1-git-send-email-Julia.Lawall@lip6.fr> <1358773378-4700-9-git-send-email-Julia.Lawall@lip6.fr> To: Julia Lawall X-Mailer: Apple Mail (2.1278) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Jan 21, 2013, at 7:02 AM, Julia Lawall wrote: > From: Julia Lawall > > Delete successive tests to the same location. The code tested the result > of a previous call, that itself was already tested. It is changed to test > the result of the most recent call. > > A simplified version of the semantic match that finds this problem is as > follows: (http://coccinelle.lip6.fr/) > > // > @s exists@ > local idexpression y; > expression x,e; > @@ > > *if ( \(x == NULL\|IS_ERR(x)\|y != 0\) ) > { ... when forall > return ...; } > ... when != \(y = e\|y += e\|y -= e\|y |= e\|y &= e\|y++\|y--\|&y\) > when != \(XT_GETPAGE(...,y)\|WMI_CMD_BUF(...)\) > *if ( \(x == NULL\|IS_ERR(x)\|y != 0\) ) > { ... when forall > return ...; } > // > > Signed-off-by: Julia Lawall > > --- > arch/powerpc/platforms/85xx/p1022_ds.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) applied to next - k