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 4/7] ASoC: SOF: imx: imx-common: Use guard() for spinlock_irqsafe()
Date: Mon, 12 Jan 2026 12:10:01 +0200 [thread overview]
Message-ID: <20260112101004.7648-5-peter.ujfalusi@linux.intel.com> (raw)
In-Reply-To: <20260112101004.7648-1-peter.ujfalusi@linux.intel.com>
Replace the manual spinlock_irqsafe 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/imx/imx-common.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/sound/soc/sof/imx/imx-common.c b/sound/soc/sof/imx/imx-common.c
index e787d3932fbb..7a03c8cc5dd4 100644
--- a/sound/soc/sof/imx/imx-common.c
+++ b/sound/soc/sof/imx/imx-common.c
@@ -81,14 +81,10 @@ EXPORT_SYMBOL(imx8_dump);
static void imx_handle_reply(struct imx_dsp_ipc *ipc)
{
- struct snd_sof_dev *sdev;
- unsigned long flags;
-
- sdev = imx_dsp_get_data(ipc);
+ struct snd_sof_dev *sdev = imx_dsp_get_data(ipc);
- spin_lock_irqsave(&sdev->ipc_lock, flags);
+ guard(spinlock_irqsave)(&sdev->ipc_lock);
snd_sof_ipc_process_reply(sdev, 0);
- spin_unlock_irqrestore(&sdev->ipc_lock, flags);
}
static void imx_handle_request(struct imx_dsp_ipc *ipc)
--
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 ` Peter Ujfalusi [this message]
2026-01-12 10:10 ` [PATCH 5/7] ASoC: SOF: mediatek: mtk-adsp-common: Use guard() for spinlock_irqsave Peter Ujfalusi
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-5-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