aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDoug Anderson <dianders@chromium.org>2014-08-22 13:43:44 -0400
committerWolfram Sang <wsa@the-dreams.de>2014-09-29 16:41:18 -0400
commit29209338b22a61c9ba67badd5f36e96cda1892d8 (patch)
tree075156e346522b87506ec3c81b2b4304eda33b56
parentaa5beaf62588d095398415af5d0e14c79e2478a3 (diff)
i2c: rk3x: Remove unlikely() annotations
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 <dmitry.torokhov@gmail.com> Signed-off-by: Doug Anderson <dianders@chromium.org> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
-rw-r--r--drivers/i2c/busses/i2c-rk3x.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/i2c/busses/i2c-rk3x.c b/drivers/i2c/busses/i2c-rk3x.c
index 93cfc837200b..b41d97965669 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)
208 * The hw can read up to 32 bytes at a time. If we need more than one 208 * The hw can read up to 32 bytes at a time. If we need more than one
209 * chunk, send an ACK after the last byte of the current chunk. 209 * chunk, send an ACK after the last byte of the current chunk.
210 */ 210 */
211 if (unlikely(len > 32)) { 211 if (len > 32) {
212 len = 32; 212 len = 32;
213 con &= ~REG_CON_LASTACK; 213 con &= ~REG_CON_LASTACK;
214 } else { 214 } else {
@@ -403,7 +403,7 @@ static irqreturn_t rk3x_i2c_irq(int irqno, void *dev_id)
403 } 403 }
404 404
405 /* is there anything left to handle? */ 405 /* is there anything left to handle? */
406 if (unlikely((ipd & REG_INT_ALL) == 0)) 406 if ((ipd & REG_INT_ALL) == 0)
407 goto out; 407 goto out;
408 408
409 switch (i2c->state) { 409 switch (i2c->state) {