i2c: tegra: Remove "dma" variable from tegra_i2c_xfer_msg()
authorDmitry Osipenko <digetx@gmail.com>
Tue, 29 Sep 2020 22:19:03 +0000 (01:19 +0300)
committerWolfram Sang <wsa@kernel.org>
Mon, 5 Oct 2020 20:57:43 +0000 (22:57 +0200)
commit8d57c2f3654e7e23f5552d28fad5715cb567a148
treed7c773c3fdea63ec7e05a4d83984c695c2ac7e53
parentd6a7969b798096533928c2a57eb6b27ffdd344aa
i2c: tegra: Remove "dma" variable from tegra_i2c_xfer_msg()

The "dma" variable of tegra_i2c_xfer_msg() function doesn't bring much in
regards to readability and generation of the code.

Besides readability, it's also not very nice that the is_curr_dma_xfer
is initialized in tegra_i2c_xfer_msg() and then could be overridden by
tegra_i2c_config_fifo_trig(). In a result, the "dma" variable creates
slight confusion since it's not instantly obvious why it's set after
tegra_i2c_config_fifo_trig().

Hence should be better to have the variable removed. This makes code
more consistent.

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