mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: wangdich9700@163.com
To: tiwai@suse.de, wangdich9700@163.com, broonie@kernel.org
Cc: wangdicheng@kylinos.cn, linux-sound@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH 1/4] ASoC: mediatek: mt8189: Remove redundant else-if branch with identical body
Date: Fri, 17 Jul 2026 15:02:49 +0800	[thread overview]
Message-ID: <20260717070252.525545-2-wangdich9700@163.com> (raw)
In-Reply-To: <20260717070252.525545-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


  reply	other threads:[~2026-07-17  7:03 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-17  7:02 [PATCH 0/4] ALSA: Fix compiler warnings in sound subsystem wangdich9700
2026-07-17  7:02 ` wangdich9700 [this message]
2026-07-17  7:02 ` [PATCH 2/4] ALSA: sparc/dbri: Fix "possible condition with no effect" warning wangdich9700
2026-07-17  7:02 ` [PATCH 3/4] ASoC: fsl_easrc: Use div64_u64 for 64-by-64 division wangdich9700
2026-07-17  8:04   ` David Laight
2026-07-17  7:02 ` [PATCH 4/4] ASoC: tlv320aic32x4: Use div64_ul for division by unsigned long wangdich9700
2026-07-17  8:06   ` David Laight

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=20260717070252.525545-2-wangdich9700@163.com \
    --to=wangdich9700@163.com \
    --cc=broonie@kernel.org \
    --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

Powered by JetHome