Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753290AbbHWSwb (ORCPT ); Sun, 23 Aug 2015 14:52:31 -0400 Received: from mail-wi0-f175.google.com ([209.85.212.175]:35857 "EHLO mail-wi0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752430AbbHWSw3 (ORCPT ); Sun, 23 Aug 2015 14:52:29 -0400 Date: Sun, 23 Aug 2015 20:52:26 +0200 From: Jiri Pirko To: Julia Lawall Cc: Jiri Pirko , kernel-janitors@vger.kernel.org, Ido Schimmel , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 05/11] mlxsw: fix error return code Message-ID: <20150823185226.GA2396@nanopsycho.orion> References: <1440288682-12732-1-git-send-email-Julia.Lawall@lip6.fr> <1440288682-12732-6-git-send-email-Julia.Lawall@lip6.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1440288682-12732-6-git-send-email-Julia.Lawall@lip6.fr> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 813 Lines: 34 Sun, Aug 23, 2015 at 02:11:16AM CEST, Julia.Lawall@lip6.fr wrote: >Return a negative error code on failure. > >A simplified version of the semantic match that finds this problem is as >follows: (http://coccinelle.lip6.fr/) > >// >@@ >identifier ret; expression e1,e2; >@@ >( >if (\(ret < 0\|ret != 0\)) > { ... return ret; } >| >ret = 0 >) >... when != ret = e1 > when != &ret >*if(...) >{ > ... when != ret = e2 > when forall > return ret; >} >// > >Signed-off-by: Julia Lawall Acked-by: Jiri Pirko -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/