From patchwork Fri Aug 22 14:23:52 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergei Shtylyov X-Patchwork-Id: 4765281 Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 6B768C0338 for ; Fri, 22 Aug 2014 14:23:59 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A9B222013A for ; Fri, 22 Aug 2014 14:23:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D84ED200DF for ; Fri, 22 Aug 2014 14:23:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756368AbaHVOX5 (ORCPT ); Fri, 22 Aug 2014 10:23:57 -0400 Received: from mail-lb0-f181.google.com ([209.85.217.181]:54543 "EHLO mail-lb0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756329AbaHVOX4 (ORCPT ); Fri, 22 Aug 2014 10:23:56 -0400 Received: by mail-lb0-f181.google.com with SMTP id 10so9386809lbg.40 for ; Fri, 22 Aug 2014 07:23:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:organization :user-agent:in-reply-to:references:mime-version :content-transfer-encoding:content-type; bh=E1GE2BQA3VRgfq6HTozGf1jMtSfna0O4m2L3AOHVK+0=; b=fTYqEJhc49yNAvgCHTNj1C4o9O5bU2BrJhitxLF8nYQQeYj0FJOaG0BSVAuear/cGC OdLe1rTaTFYnPmYPASAitQtX6JhDx8qSpZwx2qM/qP2oyIw1N+4AGsYKho5ZSe+K6WLs hwypx8B/JXCF4pqNH2HFJV+pQVS5bCWbB0twJNTXl92gKMecY95TCHv3Hr4rtfcA62sm 7UeBfsQkOYSoz15/icTmB7QQ465QjHjKFG43YISp88yBU2Ul8+alxfCBEfzAlSRRuOyM VK4wy2rjiExm3iQ4j2DIxoY8d0KKj481Xx42Yc96dNfwJTtMC/RzX97tI9X8pGc6WQ8x jVdA== X-Gm-Message-State: ALoCoQnUb/G7Wvuczm+ueDpYAb5zRghlANqa7iD9Fv64NY5/88YnYP3M83pLni75GpKFmbwUNrU+ X-Received: by 10.152.245.171 with SMTP id xp11mr5006392lac.61.1408717435070; Fri, 22 Aug 2014 07:23:55 -0700 (PDT) Received: from wasted.cogentembedded.com (ppp26-47.pppoe.mtu-net.ru. [81.195.26.47]) by mx.google.com with ESMTPSA id ue8sm18289616lac.31.2014.08.22.07.23.53 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 22 Aug 2014 07:23:54 -0700 (PDT) From: Sergei Shtylyov To: wsa@the-dreams.de, linux-i2c@vger.kernel.org Cc: linux-sh@vger.kernel.org Subject: [PATCH 2/3] i2c-rcar: make rcar_i2c_prepare_msg() *void* Date: Fri, 22 Aug 2014 18:23:52 +0400 Message-ID: <4460482.KmaEIVo0yD@wasted.cogentembedded.com> Organization: Cogent Embedded Inc. User-Agent: KMail/4.13.3 (Linux/3.15.10-200.fc20.x86_64; KDE/4.13.3; x86_64; ; ) In-Reply-To: <32018817.zX4x1fdR4T@wasted.cogentembedded.com> References: <32018817.zX4x1fdR4T@wasted.cogentembedded.com> MIME-Version: 1.0 Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP rcar_i2c_prepare_msg() always returns 0, so we can make this function return *void* and thus remove the result check in rcar_i2c_master_xfer(). Signed-off-by: Sergei Shtylyov --- drivers/i2c/busses/i2c-rcar.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Index: linux/drivers/i2c/busses/i2c-rcar.c =================================================================== --- linux.orig/drivers/i2c/busses/i2c-rcar.c +++ linux/drivers/i2c/busses/i2c-rcar.c @@ -243,7 +243,7 @@ scgd_find: return 0; } -static int rcar_i2c_prepare_msg(struct rcar_i2c_priv *priv) +static void rcar_i2c_prepare_msg(struct rcar_i2c_priv *priv) { int read = !!rcar_i2c_is_recv(priv); @@ -251,8 +251,6 @@ static int rcar_i2c_prepare_msg(struct r rcar_i2c_write(priv, ICMSR, 0); rcar_i2c_write(priv, ICMCR, RCAR_BUS_PHASE_START); rcar_i2c_write(priv, ICMIER, read ? RCAR_IRQ_RECV : RCAR_IRQ_SEND); - - return 0; } /* @@ -435,10 +433,7 @@ static int rcar_i2c_master_xfer(struct i if (i == num - 1) rcar_i2c_flags_set(priv, ID_LAST_MSG); - ret = rcar_i2c_prepare_msg(priv); - - if (ret < 0) - break; + rcar_i2c_prepare_msg(priv); timeout = wait_event_timeout(priv->wait, rcar_i2c_flags_has(priv, ID_DONE),