[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <350949de-00ee-a664-d979-fd47803a80e4@gmail.com>
Date: Sun, 6 Sep 2020 01:24:14 +0300
From: Dmitry Osipenko <digetx@...il.com>
To: Michał Mirosław <mirq-linux@...e.qmqm.pl>
Cc: Thierry Reding <thierry.reding@...il.com>,
Jonathan Hunter <jonathanh@...dia.com>,
Laxman Dewangan <ldewangan@...dia.com>,
Wolfram Sang <wsa@...-dreams.de>,
Andy Shevchenko <andy.shevchenko@...il.com>,
linux-i2c@...r.kernel.org, linux-tegra@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v4 11/31] i2c: tegra: Factor out runtime PM and hardware
initialization
06.09.2020 01:10, Michał Mirosław пишет:
> On Sat, Sep 05, 2020 at 11:41:31PM +0300, Dmitry Osipenko wrote:
>> Factor out runtime PM and hardware initialization into separate function
>> in order have a cleaner error unwinding in the probe function.
> [...]
>> + ret = tegra_i2c_init_runtime_pm_and_hardware(i2c_dev);
> [...]
>
> This one doesn't improve the code for me. The problems are: 1) putting two
> unrelated parts in one function, 2) silently reordered initialization.
The hardware initialization depends on the resumed RPM and the rest of
the probe function doesn't care about the RPM. I don't quite understand
why you're saying that they are unrelated, could you please explain?
The DMA/RPM initialization is intentionally reordered in order to clean
up the error handling, like the commit message says. To me it's a clear
improvement :)
Powered by blists - more mailing lists