[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHp75VdGX7ntm356mm4fLKtYfpuUMnHx7xZVE90MOd_CxTwmmQ@mail.gmail.com>
Date: Thu, 11 Sep 2025 16:59:26 +0300
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: Petre Rodan <petre.rodan@...dimension.ro>
Cc: Krzysztof Kozlowski <krzk@...nel.org>, Jonathan Cameron <jic23@...nel.org>,
David Lechner <dlechner@...libre.com>, "Nuno S??" <nuno.sa@...log.com>,
Andy Shevchenko <andy@...nel.org>, Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>, Conor Dooley <conor+dt@...nel.org>,
Jonathan Cameron <Jonathan.Cameron@...wei.com>, linux-iio@...r.kernel.org,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 07/14] iio: accel: bma220: reset registers during init stage
On Thu, Sep 11, 2025 at 4:52 PM Petre Rodan <petre.rodan@...dimension.ro> wrote:
> On Thu, Sep 11, 2025 at 03:07:05PM +0200, Krzysztof Kozlowski wrote:
> > On 11/09/2025 14:36, Petre Rodan wrote:
> > > On Thu, Sep 11, 2025 at 09:35:52AM +0200, Krzysztof Kozlowski wrote:
> > >> On 10/09/2025 09:57, Petre Rodan wrote:
...
> > >> You just added this code in patch 6. Don't add code which immediately
> > >> you remove. I understand you re-add this later, so basically it is a
> > >> move, but such patch diff is still confusing.
> > >
> > > sorry, but this is an artefact of 'git diff' I don't think I have no control of.
> >
> >
> > Don't think so. Before bma220_init() was above bma220_power(). After
> > your patch bma220_init() is BELOW bma220_power(), so that's a move.
>
> you are correct, these two functions did change places due to the fact that
> _init() started using _power(). I preffered to do the move instead
> of adding a forward declaration and leaving _power() between _init() and _deinit().
> the code was optimized for how it will look at the end of all this patching.
The idea is to balance between two, but for certain I agree with
Krzysztof, we need to avoid "ping-pong"ing the code in the same
series. If you need to move, create a no change patch that _just
moves_ one function up in the code.
> I thought you ment the code that was added the previous patch was not removed per
> se from _init(), which was not the case.
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists