mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Cezary Rojewski <cezary.rojewski@intel.com>
To: Bui Duc Phuc <phucduc.bui@gmail.com>
Cc: Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
	"Peter Ujfalusi" <peter.ujfalusi@linux.intel.com>,
	Bard Liao <yung-chuan.liao@linux.intel.com>,
	Kai Vehmanen <kai.vehmanen@linux.intel.com>,
	Pierre-Louis Bossart <pierre-louis.bossart@linux.dev>,
	<linux-sound@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	Mark Brown <broonie@kernel.org>,
	"Liam Girdwood" <liam.r.girdwood@linux.intel.com>
Subject: Re: [PATCH 04/20] ASoC: Intel: avs: probes: Use guard() for spin locks
Date: Fri, 12 Jun 2026 10:32:06 +0200	[thread overview]
Message-ID: <9bb2bc5e-507c-4a73-ae44-dff6659fae93@intel.com> (raw)
In-Reply-To: <CAABR9nGVKMJjCOQ1S72HR6iAS8Sx+wDT3L0tNyvn2AaAdhWodw@mail.gmail.com>

On 6/12/2026 6:48 AM, Bui Duc Phuc wrote:

...

>> 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.
1. per-driver approach.  I haven't checked if there are any non-liner 
cases for scoped_guard() but if there were any:

	ASoC: Intel: avs: Use guard() for locking
	ASoC: Intel: avs: Use scoped_guard() for scoped locking
	ASoC: Intel: atom: Use guard() for locking
	ASoC: Intel: atom: Use scoped_guard() for scoped locking

2. yes
3. leave guard() as is. As I mentioned, guard() carries no readability 
cost what cannot be said about its scoped_guard() friend.

  reply	other threads:[~2026-06-12  8:32 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-11 11:58 [PATCH 00/20] ASoC: Intel: Use guard() for mutex & " phucduc.bui
2026-06-11 11:58 ` [PATCH 01/20] ASoC: Intel: catpt: ipc: " phucduc.bui
2026-06-11 18:44   ` Cezary Rojewski
2026-06-12  4:05     ` Bui Duc Phuc
2026-06-12  8:35       ` Cezary Rojewski
2026-06-11 11:58 ` [PATCH 02/20] ASoC: Intel: catpt: dsp: Use guard() for mutex locks phucduc.bui
2026-06-11 18:39   ` Cezary Rojewski
2026-06-11 11:58 ` [PATCH 03/20] ASoC: Intel: avs: utils: " phucduc.bui
2026-06-11 11:58 ` [PATCH 04/20] ASoC: Intel: avs: probes: Use guard() for spin locks phucduc.bui
2026-06-11 19:34   ` Cezary Rojewski
2026-06-12  4:48     ` Bui Duc Phuc
2026-06-12  8:32       ` Cezary Rojewski [this message]
2026-06-17  2:47         ` Bui Duc Phuc
2026-06-11 11:58 ` [PATCH 05/20] ASoC: Intel: avs: pcm: Use guard() for mutex & " phucduc.bui
2026-06-11 11:58 ` [PATCH 06/20] ASoC: Intel: avs: path: " phucduc.bui
2026-06-11 11:58 ` [PATCH 07/20] ASoC: Intel: avs: loader: Use guard() for mutex locks phucduc.bui
2026-06-11 11:58 ` [PATCH 08/20] ASoC: Intel: avs: ipc: Use guard() for mutex & spin locks phucduc.bui
2026-06-11 11:58 ` [PATCH 09/20] ASoC: Intel: avs: icl: Use guard() for " phucduc.bui
2026-06-11 11:58 ` [PATCH 10/20] ASoC: Intel: avs: debugfs: " phucduc.bui
2026-06-11 11:58 ` [PATCH 11/20] ASoC: Intel: avs: debug: " phucduc.bui
2026-06-11 11:58 ` [PATCH 12/20] ASoC: Intel: avs: core: Use guard() for mutex & " phucduc.bui
2026-06-11 11:58 ` [PATCH 13/20] ASoC: Intel: avs: control: Use guard() for " phucduc.bui
2026-06-11 11:58 ` [PATCH 14/20] ASoC: Intel: avs: apl: " phucduc.bui
2026-06-11 11:58 ` [PATCH 15/20] ASoC: Intel: atom: sst_stream: Use guard() for mutex locks phucduc.bui
2026-06-11 11:58 ` [PATCH 16/20] ASoC: Intel: atom: sst_pvt: Use guard() for mutex & spin locks phucduc.bui
2026-06-11 11:58 ` [PATCH 17/20] ASoC: Intel: atom: sst: Use guard() for " phucduc.bui
2026-06-11 11:58 ` [PATCH 18/20] ASoC: Intel: atom: sst-atom-controls: Use guard() for mutex locks phucduc.bui
2026-06-11 11:59 ` [PATCH 19/20] ASoC: Intel: atom: sst-mfld-platform-pcm: Use guard() for mutex & spin locks phucduc.bui
2026-06-11 11:59 ` [PATCH 20/20] ASoC: Intel: atom: sst_ipc: Use guard() for " phucduc.bui
2026-06-11 19:04 ` [PATCH 00/20] ASoC: Intel: Use guard() for mutex & " Cezary Rojewski
2026-06-12  3:45   ` Bui Duc Phuc
2026-06-12  8:27     ` Cezary Rojewski
2026-06-17  2:40       ` Bui Duc Phuc

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9bb2bc5e-507c-4a73-ae44-dff6659fae93@intel.com \
    --to=cezary.rojewski@intel.com \
    --cc=broonie@kernel.org \
    --cc=kai.vehmanen@linux.intel.com \
    --cc=liam.r.girdwood@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=peter.ujfalusi@linux.intel.com \
    --cc=phucduc.bui@gmail.com \
    --cc=pierre-louis.bossart@linux.dev \
    --cc=tiwai@suse.com \
    --cc=yung-chuan.liao@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®