Re: [PATCH v2 0/3] ASoC: rockchip: Use guard() for spin locks

From: Bui Duc Phuc

Date: Fri Jun 19 2026 - 02:58:44 EST


Hi Nicolas,

Thanks for the clarification.

> If you want to try again, do so in a way where you don't have to indent
> large parts of a function another level, it's possible and the diff
> will be something I can actually read. Remember that you can place a
> guard for the spinlock in the middle of a function, and it'll only be
> picked up then, which should reduce the need for the scoped_guards in
> this. To avoid having to manually do pm unwind (and therefore require
> that the spinlock is dropped somehow before function exit), use the
> runtime pm guard macros as well. That should simplify this immensely.
>
> Last but not least, please run things through checkpatch. Even at the
> default options, it'll warn about the indentation level. With --strict,
> it'll also tell you about the braces. Personally I just use whatever
> preset `b4 prep --check` uses, which usually is quite reasonable.
>

I do run checkpatch before submitting patches, but I wasn't aware of the
`--strict` option. I also didn't know that runtime PM could be handled
with guard helpers.

I agree that using runtime PM guards would make the code much cleaner
and avoid much of the extra indentation.

These are useful suggestions, and I'll keep them in mind for future
submissions.

Best regards,
Phuc