Re: [PATCH 04/20] ASoC: Intel: avs: probes: Use guard() for spin locks

From: Bui Duc Phuc

Date: Fri Jun 12 2026 - 00:48:26 EST


Hi Czarek,

Got it, thank you for the explanation.

>
> Well, maybe one patch per driver suggestion of mine was a little too
> much.. Let's separate guard() changes from scoped_guard() ones.
> guard()s carry no readability cost.
>
> I'm not a fan of scoped_guard() update for any existing code block that
> looks like below:
>
> lock()
> one_liner()
> unlock()
>
> Adding tab to the picture ruins readability. The cost of tab is OK if
> there are more operations between the locking/unlocking though.
>


To save both of our time and avoid endless revisions, here is the plan for v2:

1. I will keep the patch structure exactly as it is now (individual
patches per file/driver),
instead of combining them into 2 big patches.
2. I will completely drop the scoped_guard() changes for those short
1-2 liner blocks.
3. For the remaining code, I will only apply guard() or scoped_guard()
where it genuinely improves readability.

Does this approach work for you? If so, I'll send out v2.

Best regards,
Phuc