From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751398AbaABMvQ (ORCPT ); Thu, 2 Jan 2014 07:51:16 -0500 Received: from cantor2.suse.de ([195.135.220.15]:42473 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750733AbaABMvO (ORCPT ); Thu, 2 Jan 2014 07:51:14 -0500 Date: Thu, 2 Jan 2014 13:51:10 +0100 (CET) From: Jiri Kosina To: Julia Lawall cc: kernel-janitors@vger.kernel.org, linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 12/25] HID: sony: fix error return code In-Reply-To: <1388357260-4843-13-git-send-email-Julia.Lawall@lip6.fr> Message-ID: References: <1388357260-4843-1-git-send-email-Julia.Lawall@lip6.fr> <1388357260-4843-13-git-send-email-Julia.Lawall@lip6.fr> User-Agent: Alpine 2.00 (LNX 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 29 Dec 2013, Julia Lawall wrote: > From: Julia Lawall > > Currently the return variable ret is always 0. Set it to other values in > error cases, as used in the direct return. > > A simplified version of the semantic match that finds this problem is as > follows: (http://coccinelle.lip6.fr/) > > // > ( > if@p1 (\(ret < 0\|ret != 0\)) > { ... return ret; } > | > ret@p1 = 0 > ) > ... when != ret = e1 > when != &ret > *if(...) > { > ... when != ret = e2 > when forall > return ret; > } > > // > > Signed-off-by: Julia Lawall Applied, thanks. -- Jiri Kosina SUSE Labs From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jiri Kosina Date: Thu, 02 Jan 2014 12:51:10 +0000 Subject: Re: [PATCH 12/25] HID: sony: fix error return code Message-Id: List-Id: References: <1388357260-4843-1-git-send-email-Julia.Lawall@lip6.fr> <1388357260-4843-13-git-send-email-Julia.Lawall@lip6.fr> In-Reply-To: <1388357260-4843-13-git-send-email-Julia.Lawall@lip6.fr> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Julia Lawall Cc: kernel-janitors@vger.kernel.org, linux-input@vger.kernel.org, linux-kernel@vger.kernel.org On Sun, 29 Dec 2013, Julia Lawall wrote: > From: Julia Lawall > > Currently the return variable ret is always 0. Set it to other values in > error cases, as used in the direct return. > > A simplified version of the semantic match that finds this problem is as > follows: (http://coccinelle.lip6.fr/) > > // > ( > if@p1 (\(ret < 0\|ret != 0\)) > { ... return ret; } > | > ret@p1 = 0 > ) > ... when != ret = e1 > when != &ret > *if(...) > { > ... when != ret = e2 > when forall > return ret; > } > > // > > Signed-off-by: Julia Lawall Applied, thanks. -- Jiri Kosina SUSE Labs