From: wangdich9700@163.com
To: tiwai@suse.de, david.laight.linux@gmail.com, wangdich9700@163.com
Cc: wangdicheng@kylinos.cn, linux-sound@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: [PATCH v2 1/3] ASoC: mediatek: mt8189: Remove redundant else-if branch with identical body
Date: Fri, 17 Jul 2026 17:15:40 +0800 [thread overview]
Message-ID: <20260717091542.721877-2-wangdich9700@163.com> (raw)
In-Reply-To: <20260717091542.721877-1-wangdich9700@163.com>
From: wangdicheng <wangdicheng@kylinos.cn>
Fix a compiler warning about a condition with no effect:
sound/mediatek/mt8189/mt8189-dai-adda.c:388:7-9: WARNING: possible condition with no effect (if == else)
The MTKAIF_PROTOCOL_2 branch and the else branch both write the same
value 0xB0 to AFE_AUD_PAD_TOP_CFG0, making the else-if condition
meaningless. Remove the redundant branch.
Signed-off-by: wangdicheng <wangdicheng@kylinos.cn>
---
sound/soc/mediatek/mt8189/mt8189-dai-adda.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/sound/soc/mediatek/mt8189/mt8189-dai-adda.c b/sound/soc/mediatek/mt8189/mt8189-dai-adda.c
index ad5b9546ff63..5c41a6386204 100644
--- a/sound/soc/mediatek/mt8189/mt8189-dai-adda.c
+++ b/sound/soc/mediatek/mt8189/mt8189-dai-adda.c
@@ -385,8 +385,6 @@ static int mtk_adda_pad_top_event(struct snd_soc_dapm_widget *w,
if (event == SND_SOC_DAPM_PRE_PMU) {
if (afe_priv->mtkaif_protocol == MTKAIF_PROTOCOL_2_CLK_P2)
regmap_write(afe->regmap, AFE_AUD_PAD_TOP_CFG0, 0xB8);
- else if (afe_priv->mtkaif_protocol == MTKAIF_PROTOCOL_2)
- regmap_write(afe->regmap, AFE_AUD_PAD_TOP_CFG0, 0xB0);
else
regmap_write(afe->regmap, AFE_AUD_PAD_TOP_CFG0, 0xB0);
}
--
2.25.1
next prev parent reply other threads:[~2026-07-17 9:15 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-17 9:15 [PATCH v2 0/3] ALSA: Fix compiler warnings in sound subsystem wangdich9700
2026-07-17 9:15 ` wangdich9700 [this message]
2026-07-17 9:15 ` [PATCH v2 2/3] ALSA: sparc/dbri: Fix "possible condition with no effect" warning wangdich9700
2026-07-17 9:15 ` [PATCH v2 3/3] ASoC: fsl_easrc: Use div64_u64 for 64-by-64 division wangdich9700
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=20260717091542.721877-2-wangdich9700@163.com \
--to=wangdich9700@163.com \
--cc=david.laight.linux@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=tiwai@suse.de \
--cc=wangdicheng@kylinos.cn \
/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