From patchwork Fri Aug 22 17:43:44 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Doug Anderson X-Patchwork-Id: 4766561 Return-Path: X-Original-To: patchwork-linux-arm@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 3B5E3C0338 for ; Fri, 22 Aug 2014 17:46:53 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4AA0E2018A for ; Fri, 22 Aug 2014 17:46:52 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6687720173 for ; Fri, 22 Aug 2014 17:46:51 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1XKssz-0001XS-7k; Fri, 22 Aug 2014 17:44:25 +0000 Received: from mail-oi0-f73.google.com ([209.85.218.73]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1XKssw-0001Ve-6Q for linux-arm-kernel@lists.infradead.org; Fri, 22 Aug 2014 17:44:22 +0000 Received: by mail-oi0-f73.google.com with SMTP id u20so2212973oif.4 for ; Fri, 22 Aug 2014 10:44:01 -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; bh=NfxI1R2OVQ4uF6meulprH21k3oYJDAE2IXtYgMvOovw=; b=a6sinS0lTpmvfe/2L3ckZKhHZ6ba/PfetE8QCgEPdqEKZMnaU6MXBuk1FQ/cecIb2Y ekijJYDgQ5daS6+dGXiXqvSWg0RCB6CSg7vLDInTajNO1eq1J2COxMr3DpPLVd+FG3vX Qp8aRkrW3WWuV7B5waeTmDj7tjAhK6brk9cl1AfXzB9CyGEAQqsLRepTOg/dCv7iYtWm iBqWvFvwKAkI69AvkDBh77NmEUfICoVZDcr2Yoft+yepLajaN5mn6DKS0aOSDh0orkjz ZbdBCOMCUQV/DcLVFo0fDd8/0bhNIOP9CvFj1ORDggjMXwrFffdlxVy+rYueC9PAUADq Wd3Q== X-Gm-Message-State: ALoCoQmSWG3O/eU6Zyk4YuXfRSN9P6tPJNlpiWMndxccpGrn43Lfns775K3WnDhPL8e56eR3aRKR X-Received: by 10.182.129.37 with SMTP id nt5mr4135445obb.8.1408729440971; Fri, 22 Aug 2014 10:44:00 -0700 (PDT) Received: from corp2gmr1-1.hot.corp.google.com (corp2gmr1-1.hot.corp.google.com [172.24.189.92]) by gmr-mx.google.com with ESMTPS id f44si344374yhf.1.2014.08.22.10.44.00 for (version=TLSv1.1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 22 Aug 2014 10:44:00 -0700 (PDT) Received: from tictac.mtv.corp.google.com (tictac.mtv.corp.google.com [172.22.162.15]) by corp2gmr1-1.hot.corp.google.com (Postfix) with ESMTP id C7A5831C1E3; Fri, 22 Aug 2014 10:44:00 -0700 (PDT) Received: by tictac.mtv.corp.google.com (Postfix, from userid 121310) id 61D2F80399; Fri, 22 Aug 2014 10:44:00 -0700 (PDT) From: Doug Anderson To: Wolfram Sang , Dmitry Torokhov Subject: [PATCH] i2c: rk3x: Remove unlikely() annotations Date: Fri, 22 Aug 2014 10:43:44 -0700 Message-Id: <1408729424-11433-1-git-send-email-dianders@chromium.org> X-Mailer: git-send-email 2.1.0.rc2.206.gedb03e5 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140822_104422_302610_AF1C443B X-CRM114-Status: GOOD ( 12.88 ) X-Spam-Score: -1.4 (-) Cc: Addy Ke , heiko@sntech.de, max.schwarz@online.de, Doug Anderson , linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.org, dan.carpenter@oracle.com, linux-arm-kernel@lists.infradead.org, linux-i2c@vger.kernel.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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 Having a transfer more than 32 bits is not all that unlikely. Remove the annotation. The unlikely in the IRQ handler can't gain us much. It's not in a loop, so at most it would save 1 instruction per IRQ, which isn't much. In fact on the compiler I tested it produced the exact same code. Remove it too. Suggested-by: Dmitry Torokhov Signed-off-by: Doug Anderson --- drivers/i2c/busses/i2c-rk3x.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/i2c/busses/i2c-rk3x.c b/drivers/i2c/busses/i2c-rk3x.c index 69e1185..b8b2b89 100644 --- a/drivers/i2c/busses/i2c-rk3x.c +++ b/drivers/i2c/busses/i2c-rk3x.c @@ -208,7 +208,7 @@ static void rk3x_i2c_prepare_read(struct rk3x_i2c *i2c) * The hw can read up to 32 bytes at a time. If we need more than one * chunk, send an ACK after the last byte of the current chunk. */ - if (unlikely(len > 32)) { + if (len > 32) { len = 32; con &= ~REG_CON_LASTACK; } else { @@ -399,7 +399,7 @@ static irqreturn_t rk3x_i2c_irq(int irqno, void *dev_id) } /* is there anything left to handle? */ - if (unlikely((ipd & REG_INT_ALL) == 0)) + if ((ipd & REG_INT_ALL) == 0) goto out; switch (i2c->state) {