i2c: tegra: Remove likely/unlikely from the code
authorDmitry Osipenko <digetx@gmail.com>
Tue, 29 Sep 2020 22:19:01 +0000 (01:19 +0300)
committerWolfram Sang <wsa@kernel.org>
Mon, 5 Oct 2020 20:57:42 +0000 (22:57 +0200)
The likely/unlikely annotations should be used only in a hot paths of
performance-critical code. The I2C driver doesn't have such paths, and
thus, there is no justification for usage of likely/unlikely annotations
in the code. Hence remove them.

Reviewed-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Acked-by: Thierry Reding <treding@nvidia.com>
Tested-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
drivers/i2c/busses/i2c-tegra.c

index 3476514..dc25578 100644 (file)
@@ -852,7 +852,7 @@ static irqreturn_t tegra_i2c_isr(int irq, void *dev_id)
                goto err;
        }
 
-       if (unlikely(status & status_err)) {
+       if (status & status_err) {
                tegra_i2c_disable_packet_mode(i2c_dev);
                if (status & I2C_INT_NO_ACK)
                        i2c_dev->msg_err |= I2C_ERR_NO_ACK;
@@ -1294,7 +1294,7 @@ static int tegra_i2c_xfer_msg(struct tegra_i2c_dev *i2c_dev,
                i2c_dev->msg_err);
 
        i2c_dev->is_curr_dma_xfer = false;
-       if (likely(i2c_dev->msg_err == I2C_ERR_NONE))
+       if (i2c_dev->msg_err == I2C_ERR_NONE)
                return 0;
 
        tegra_i2c_init(i2c_dev);