From patchwork Sun Sep 14 20:15:46 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergei Shtylyov X-Patchwork-Id: 4902371 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 AD02EBEEA5 for ; Sun, 14 Sep 2014 21:11:38 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D2D5A20220 for ; Sun, 14 Sep 2014 21:11:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 151FF201FB for ; Sun, 14 Sep 2014 21:11:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752905AbaINVLg (ORCPT ); Sun, 14 Sep 2014 17:11:36 -0400 Received: from mail-wi0-f175.google.com ([209.85.212.175]:58646 "EHLO mail-wi0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752841AbaINVLg (ORCPT ); Sun, 14 Sep 2014 17:11:36 -0400 Received: by mail-wi0-f175.google.com with SMTP id cc10so3188625wib.14 for ; Sun, 14 Sep 2014 14:11:34 -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=dayVB48Iqymzvton+bc0mNorI+ZoBLB2RuZtbjc27mQ=; b=R/grZki+OQktqu44hGob5Lz3cqfRvLrHQAJ6scEKpBfzjvQKYWnZHn1kOgcStFMhVY jn4bLj6kLno3vRPJuH0X9ypYDj40nw4kYWvWk6YLYSfm9RHC/MGlCHBFj8vcqRYFh2yA K6n7MRX37878KTIkKbifFjP0mP8AEqwLrlfgApRROR6GIXJVpy8rprZ1yo/ps+P3VUrj visPPff75o3rjtxYamJgS/TOmrYhY8fBYelSI0VMi+jcitMPit2ghftEEP1+nuVWB/vR ol5Q6+YyQLK9orbYTlfBpp39KvUrvQRQM6HeOrwN/cmu6wRiEHfbL+2uxIHCl+WkNuHX 4Bdg== X-Gm-Message-State: ALoCoQlB9krsShpbDcdVIYQAwcdRf3cN5Oaa/mUNbAn0ReCxaw+ZzVuGEUhDv6I5HvoV7T8BViSq X-Received: by 10.194.88.195 with SMTP id bi3mr4715104wjb.10.1410729094730; Sun, 14 Sep 2014 14:11:34 -0700 (PDT) Received: from wasted.cogentembedded.com (80.178.206.101.adsl.012.net.il. [80.178.206.101]) by mx.google.com with ESMTPSA id i5sm12519246wjz.0.2014.09.14.14.11.33 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 14 Sep 2014 14:11:33 -0700 (PDT) From: Sergei Shtylyov To: wsa@the-dreams.de, linux-i2c@vger.kernel.org Cc: linux-sh@vger.kernel.org Subject: [PATCH v2 2/3] i2c-rcar: make rcar_i2c_prepare_msg() *void* Date: Mon, 15 Sep 2014 00:15:46 +0400 Message-ID: <3369447.JH8v9DUGDl@wasted.cogentembedded.com> Organization: Cogent Embedded Inc. User-Agent: KMail/4.13.3 (Linux/3.15.10-201.fc20.x86_64; KDE/4.13.3; x86_64; ; ) In-Reply-To: <2245366.q99HVYG3pL@wasted.cogentembedded.com> References: <2245366.q99HVYG3pL@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.5 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 --- Changes in version 2: - resolved reject, refreshed patch. 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 @@ -245,7 +245,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); @@ -253,8 +253,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; } /* @@ -456,14 +454,11 @@ 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); + rcar_i2c_prepare_msg(priv); spin_unlock_irqrestore(&priv->lock, flags); /*-------------- spin unlock -----------------*/ - if (ret < 0) - break; - timeout = wait_event_timeout(priv->wait, rcar_i2c_flags_has(priv, ID_DONE), 5 * HZ);