Re: [PATCH v4] ACPI: pmic: Replace mutex_lock/unlock() with guard()/scoped_guard()
From: Maxwell Doose
Date: Wed Apr 29 2026 - 09:21:57 EST
On Wed, Apr 29, 2026 at 4:55 AM Andy Shevchenko
<andriy.shevchenko@xxxxxxxxx> wrote:
>
> On Tue, Apr 28, 2026 at 08:24:32PM -0500, Maxwell Doose wrote:
>
> ...
>
> > v4:
> > - Added else keyword to if statement in
> > intel_soc_pmic_exec_mipi_pmic_seq_element() per Andy's request.
>
> Nope, sorry if I was not clear. The idea is to drop 'else'.
> Also make the patch less invasive.
>
Ah, I see. Just a misunderstanding, I'll make sure to fix that once I'm home.
> ...
>
> > - __func__, i2c_address, reg_address, value, mask);
>
> > + __func__, i2c_address, reg_address, value, mask);
>
> Still a stray change.
Yea, I'm not sure what's going on with this one. I think in my editor
it looked like there was some misalignment from before but I'll see
about dropping that.
> ...
>
> It should be
>
> int ret; // also left untouched, drop that from commit message as well
>
> if (d->exec_mipi_pmic_seq_element) {
> // the below if-else-if just should be left untouched.
> if (i2c_address == d->pmic_i2c_address) {
> ...
> } else {
> ...
> }
>
> return ret;
> }
>
> if (d->pmic_i2c_address) {
> }
>
> ...warnings...
> return -EOPNOTSUPP;
>
Alright, thanks for clarifying this. I'll make sure this gets in for the v4.
best regards,
maxwell
> We may get a second patch for deeper refactoring later on.
>
> --
> With Best Regards,
> Andy Shevchenko
>
>