On Tue, Sep 8, 2020 at 5:11 AM Dmitry Osipenko <digetx@xxxxxxxxx> 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