From patchwork Sun Sep 14 20:17:34 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergei Shtylyov X-Patchwork-Id: 4902381 Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 317CD9F32F for ; Sun, 14 Sep 2014 21:10:00 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id F231320220 for ; Sun, 14 Sep 2014 21:13:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 22F81201FB for ; Sun, 14 Sep 2014 21:13:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752845AbaINVNQ (ORCPT ); Sun, 14 Sep 2014 17:13:16 -0400 Received: from mail-wi0-f179.google.com ([209.85.212.179]:41303 "EHLO mail-wi0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752842AbaINVNQ (ORCPT ); Sun, 14 Sep 2014 17:13:16 -0400 Received: by mail-wi0-f179.google.com with SMTP id q5so1094481wiv.6 for ; Sun, 14 Sep 2014 14:13:15 -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=mP/2raNI1ijCEz1xowlMZH1J4/E4/5O2tt3mOD+9wUc=; b=ARAzlbgzhPm4ps3K62VsPlgZkl+hVPTfzTTewjXDkF60xQ7vkbE2DFDMrn1Q+BqrHF R1pd44RWQaX/aW1FBuE90SLZhpapKrVbKf8S/e//Td9jyLcn2f85GPKqeFc0qPuj24aS xmwmRqq1NPoicY3rmczItpVzUTolgRXRaIzif5Ezu/1K56aKdvINT0aqBPhCqR1ATcnI brNWf6ixAJIo88HlVZyH+P8kdUWio6KrWTi0Sl2mWDGgqX1Ka3HyXNpRHJ8D3jSa7odJ UDlZxK0EcoKKbScZl9ViWtnGDGXXUo8kL79h0E+4bFgQCNoDN/n47zb3MR+WKZs7Tk4q RbLA== X-Gm-Message-State: ALoCoQkVDBPBEaCwXYfnSvX9jHZ4NkgoaYG1uzb1Xmvr036FJ3qw0WpTrhdbeEaR9z3rX8Brt+bj X-Received: by 10.194.172.137 with SMTP id bc9mr28995321wjc.72.1410729194943; Sun, 14 Sep 2014 14:13:14 -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 r19sm9468770wik.0.2014.09.14.14.13.13 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 14 Sep 2014 14:13:14 -0700 (PDT) From: Sergei Shtylyov To: wsa@the-dreams.de, linux-i2c@vger.kernel.org Cc: linux-sh@vger.kernel.org Subject: [PATCH v2 3/3] i2c-rcar: make rcar_i2c_irq_recv() *void* Date: Mon, 15 Sep 2014 00:17:34 +0400 Message-ID: <19871938.mRdZLUD6Mv@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_irq_recv() always returns 0, so we can make this function return *void* and also remove rcar_i2c_flags_set() invocation in rcar_i2c_irq(). Signed-off-by: Sergei Shtylyov --- Changes in version 2: - refreshed patch. drivers/i2c/busses/i2c-rcar.c | 8 +++----- 1 file changed, 3 insertions(+), 5 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 @@ -319,7 +319,7 @@ static int rcar_i2c_irq_send(struct rcar return 0; } -static int rcar_i2c_irq_recv(struct rcar_i2c_priv *priv, u32 msr) +static void rcar_i2c_irq_recv(struct rcar_i2c_priv *priv, u32 msr) { struct i2c_msg *msg = priv->msg; @@ -329,7 +329,7 @@ static int rcar_i2c_irq_recv(struct rcar * Do nothing */ if (!(msr & MDR)) - return 0; + return; if (msr & MAT) { /* @@ -356,8 +356,6 @@ static int rcar_i2c_irq_recv(struct rcar rcar_i2c_write(priv, ICMCR, RCAR_BUS_PHASE_DATA); rcar_i2c_write(priv, ICMSR, RCAR_IRQ_ACK_RECV); - - return 0; } static irqreturn_t rcar_i2c_irq(int irq, void *ptr) @@ -395,7 +393,7 @@ static irqreturn_t rcar_i2c_irq(int irq, } if (rcar_i2c_is_recv(priv)) - rcar_i2c_flags_set(priv, rcar_i2c_irq_recv(priv, msr)); + rcar_i2c_irq_recv(priv, msr); else rcar_i2c_flags_set(priv, rcar_i2c_irq_send(priv, msr));