Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964848Ab2JDAlu (ORCPT ); Wed, 3 Oct 2012 20:41:50 -0400 Received: from relmlor3.renesas.com ([210.160.252.173]:38354 "EHLO relmlor3.renesas.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933167Ab2JDAls (ORCPT ); Wed, 3 Oct 2012 20:41:48 -0400 X-IronPort-AV: E=Sophos;i="4.80,531,1344178800"; d="scan'208";a="100798264" Message-id: <506CDDB5.5080508@renesas.com> Date: Thu, 04 Oct 2012 09:52:05 +0900 From: Nobuhiro Iwamatsu User-Agent: Thunderbird 2.0.0.19 (Windows/20081209) MIME-version: 1.0 To: Peter Senna Tschudin Cc: davem@davemloft.net, kernel-janitors@vger.kernel.org, yoshihiro.shimoda.uh@renesas.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 16/20] drivers/net/ethernet/renesas/sh_eth.c: fix error return code References: <1349281090-10013-15-git-send-email-peter.senna@gmail.com> In-reply-to: <1349281090-10013-15-git-send-email-peter.senna@gmail.com> Content-type: text/plain; charset=ISO-2022-JP Content-transfer-encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 924 Lines: 34 Peter Senna Tschudin さんは書きました: > From: Peter Senna Tschudin > > Convert a nonnegative error return code to a negative one, as returned > elsewhere in the function. > > 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: Peter Senna Tschudin Acked-by: Nobuhiro Iwamatsu -- 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/