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: <CAHp75Vc9srPR1BYes9ZEo46gxV2BAhZ71ov_JZ_sHrmtgdAr-g@mail.gmail.com>
Date:   Tue, 8 Sep 2020 11:40:30 +0300
From:   Andy Shevchenko <andy.shevchenko@...il.com>
To:     Dmitry Osipenko <digetx@...il.com>
Cc:     Thierry Reding <thierry.reding@...il.com>,
        Jonathan Hunter <jonathanh@...dia.com>,
        Laxman Dewangan <ldewangan@...dia.com>,
        Wolfram Sang <wsa@...-dreams.de>,
        Michał Mirosław <mirq-linux@...e.qmqm.pl>,
        linux-i2c <linux-i2c@...r.kernel.org>,
        linux-tegra@...r.kernel.org,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v6 14/35] i2c: tegra: Clean up probe function

On Tue, Sep 8, 2020 at 5:11 AM Dmitry Osipenko <digetx@...il.com> wrote:
>
> The driver's probe function code is a bit difficult to read. This patch
> reorders code of the probe function, forming groups of code that are easy
> to work with.
>
> The probe tear-down order now matches the driver-removal order.

> All dev/&pdev->dev are replaced with i2c_dev->dev in order to have uniform
> code style across the driver.

You see, below is my point why leaving a temporary variable can reduce a churn.

> The "ret" variable renamed to "err" since it only carries error code and
> the new name clearly shows that.

Overall it sounds like you need to split this into a few patches.

...

> -       struct device *dev = &pdev->dev;

> -       i2c_dev->rst = devm_reset_control_get_exclusive(&pdev->dev, "i2c");

> +       i2c_dev->rst = devm_reset_control_get_exclusive(i2c_dev->dev, "i2c");

You see, if it had been simple 'dev', this line would have not been changed.

And so on.

-- 
With Best Regards,
Andy Shevchenko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ