Re: [PATCH 01/20] ASoC: Intel: catpt: ipc: Use guard() for mutex & spin locks
From: Cezary Rojewski
Date: Fri Jun 12 2026 - 04:37:17 EST
On 6/12/2026 6:05 AM, Bui Duc Phuc wrote:
Hi,Yeah. As stated previously, I see no reason to update the catpt-driver, simply drop 1/20 and 2/20. Let's focus on the avs- and the atom- drivers.
The catpt_dsp_send_msg_timeout is already part of Mark's tree [1]. At
the same time I'm against using scoped_guard() for
catpt_dsp_do_send_msg(). The existing code is small and transparent,
there is no need to tabify it.
@@ -97,10 +96,10 @@ static int catpt_dsp_do_send_msg(struct catpt_dev *cdev,
(reply && reply->size > ipc->config.outbox_size))
return -EINVAL;
- spin_lock_irqsave(&ipc->lock, flags);
- catpt_ipc_msg_init(ipc, reply);
- catpt_dsp_send_tx(cdev, &request);
- spin_unlock_irqrestore(&ipc->lock, flags);
+ scoped_guard(spinlock_irqsave, &ipc->lock) {
+ catpt_ipc_msg_init(ipc, reply);
+ catpt_dsp_send_tx(cdev, &request);
+ }
ret = catpt_wait_msg_completion(cdev, timeout);
So I understand that, for this conversion effort, you would prefer a
case-by-case approach rather than converting everything to
guard()/scoped_guard() purely for consistency. Is that correct?