From: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
To: lgirdwood@gmail.com, broonie@kernel.org
Cc: linux-sound@vger.kernel.org, kai.vehmanen@linux.intel.com,
ranjani.sridharan@linux.intel.com,
yung-chuan.liao@linux.intel.com, pierre-louis.bossart@linux.dev,
daniel.baluta@nxp.com
Subject: [PATCH 5/7] ASoC: SOF: mediatek: mtk-adsp-common: Use guard() for spinlock_irqsave
Date: Mon, 12 Jan 2026 12:10:02 +0200 [thread overview]
Message-ID: <20260112101004.7648-6-peter.ujfalusi@linux.intel.com> (raw)
In-Reply-To: <20260112101004.7648-1-peter.ujfalusi@linux.intel.com>
Replace the manual spinlock_irqsave lock/unlock pairs with guard().
Only code refactoring, and no behavior change.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
---
sound/soc/sof/mediatek/mtk-adsp-common.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/sound/soc/sof/mediatek/mtk-adsp-common.c b/sound/soc/sof/mediatek/mtk-adsp-common.c
index 01bbadb160ff..75b4af4b5111 100644
--- a/sound/soc/sof/mediatek/mtk-adsp-common.c
+++ b/sound/soc/sof/mediatek/mtk-adsp-common.c
@@ -107,11 +107,9 @@ EXPORT_SYMBOL(mtk_adsp_send_msg);
void mtk_adsp_handle_reply(struct mtk_adsp_ipc *ipc)
{
struct adsp_priv *priv = mtk_adsp_ipc_get_data(ipc);
- unsigned long flags;
- spin_lock_irqsave(&priv->sdev->ipc_lock, flags);
+ guard(spinlock_irqsave)(&priv->sdev->ipc_lock);
snd_sof_ipc_process_reply(priv->sdev, 0);
- spin_unlock_irqrestore(&priv->sdev->ipc_lock, flags);
}
EXPORT_SYMBOL(mtk_adsp_handle_reply);
--
2.52.0
next prev parent reply other threads:[~2026-01-12 10:09 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-12 10:09 [PATCH 0/7] ASoC: SOF: Use guard()/scoped_guard() for locks when makes sense Peter Ujfalusi
2026-01-12 10:09 ` [PATCH 1/7] ASoC: SOF: Use guard()/scoped_guard() for mutex locks where it " Peter Ujfalusi
2026-01-12 10:09 ` [PATCH 2/7] ASoC: SOF: Intel: " Peter Ujfalusi
2026-01-12 10:10 ` [PATCH 3/7] ASoC: SOF: amd: acp-ipc: Use guard() for spinlock_irq() Peter Ujfalusi
2026-01-12 10:10 ` [PATCH 4/7] ASoC: SOF: imx: imx-common: Use guard() for spinlock_irqsafe() Peter Ujfalusi
2026-01-12 10:10 ` Peter Ujfalusi [this message]
2026-01-12 10:10 ` [PATCH 6/7] ASoC: SOF: Intel: Use guard() for spinlocks where it makes sense Peter Ujfalusi
2026-01-12 10:10 ` [PATCH 7/7] ASoC: SOF: ipc/ops: Use guard() for spinlocks Peter Ujfalusi
2026-01-13 13:49 ` [PATCH 0/7] ASoC: SOF: Use guard()/scoped_guard() for locks when makes sense Mark Brown
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=20260112101004.7648-6-peter.ujfalusi@linux.intel.com \
--to=peter.ujfalusi@linux.intel.com \
--cc=broonie@kernel.org \
--cc=daniel.baluta@nxp.com \
--cc=kai.vehmanen@linux.intel.com \
--cc=lgirdwood@gmail.com \
--cc=linux-sound@vger.kernel.org \
--cc=pierre-louis.bossart@linux.dev \
--cc=ranjani.sridharan@linux.intel.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