From: Charles Keepax <ckeepax@opensource.cirrus.com>
To: broonie@kernel.org
Cc: lgirdwood@gmail.com, yung-chuan.liao@linux.intel.com,
pierre-louis.bossart@linux.dev, peter.ujfalusi@linux.intel.com,
linux-sound@vger.kernel.org, patches@opensource.cirrus.com
Subject: [PATCH 1/5] ASoC: SDCA: Fix overwritten var within for loop
Date: Wed, 8 Apr 2026 10:38:31 +0100 [thread overview]
Message-ID: <20260408093835.2881486-2-ckeepax@opensource.cirrus.com> (raw)
In-Reply-To: <20260408093835.2881486-1-ckeepax@opensource.cirrus.com>
From: Maciej Strozek <mstrozek@opensource.cirrus.com>
mask variable should not be overwritten within the for loop or it will
skip certain bits. Change to using BIT() macro.
Fixes: b9ab3b618241 ("ASoC: SDCA: Add some initial IRQ handlers")
Signed-off-by: Maciej Strozek <mstrozek@opensource.cirrus.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
---
sound/soc/sdca/sdca_interrupts.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/sound/soc/sdca/sdca_interrupts.c b/sound/soc/sdca/sdca_interrupts.c
index 1838dabcdf604..9acb0be84674c 100644
--- a/sound/soc/sdca/sdca_interrupts.c
+++ b/sound/soc/sdca/sdca_interrupts.c
@@ -117,9 +117,7 @@ static irqreturn_t function_status_handler(int irq, void *data)
status = val;
for_each_set_bit(mask, &status, BITS_PER_BYTE) {
- mask = 1 << mask;
-
- switch (mask) {
+ switch (BIT(mask)) {
case SDCA_CTL_ENTITY_0_FUNCTION_NEEDS_INITIALIZATION:
//FIXME: Add init writes
break;
--
2.47.3
next prev parent reply other threads:[~2026-04-08 9:39 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-08 9:38 [PATCH 0/5] Yet another round of SDCA fixes Charles Keepax
2026-04-08 9:38 ` Charles Keepax [this message]
2026-04-08 9:38 ` [PATCH 2/5] ASoC: SDCA: mask Function_Status value Charles Keepax
2026-04-08 9:38 ` [PATCH 3/5] ASoC: SDCA: Fix cleanup inversion in class driver Charles Keepax
2026-04-08 13:43 ` Mark Brown
2026-04-08 14:11 ` Charles Keepax
2026-04-08 9:38 ` [PATCH 4/5] ASoC: SDCA: Unregister IRQ handlers on module remove Charles Keepax
2026-04-08 9:38 ` [PATCH 5/5] ASoC: SDCA: Tidy up irq_enable_flags()/sdca_irq_disable() Charles Keepax
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=20260408093835.2881486-2-ckeepax@opensource.cirrus.com \
--to=ckeepax@opensource.cirrus.com \
--cc=broonie@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-sound@vger.kernel.org \
--cc=patches@opensource.cirrus.com \
--cc=peter.ujfalusi@linux.intel.com \
--cc=pierre-louis.bossart@linux.dev \
--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