lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b28d8ec1-22d5-74f4-d8cf-c3881474a624@gmail.com>
Date:   Sun, 6 Sep 2020 02:10:20 +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:51, Michał Mirosław пишет:
> On Sun, Sep 06, 2020 at 01:24:14AM +0300, Dmitry Osipenko wrote:
>> 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 :)
> 
> Ok, then wouldn't it be enough to just move this part in the probe()?
> A sign of a problem for me is how much information you had to put in
> the name of the new function.

Looking at it again now, I think you're right. I also now noticed that
the RPM isn't disabled now if tegra_i2c_init() fails.

I'll try to take another look, but probably will lean to yours variant
in the v5. Thanks!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ