Skip to contentSkip to conversation

ASoC: mediatek: mt8186: Remove condition with no effect

PATCH In review Zhongjun Tan 5 participants 6 messages Jul 8, 2022 – Jul 11, 2022

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ASoC: mediatek: mt8186: Remove condition with no effect

From: Zhongjun Tan <[email protected]>

Remove condition with no effect

---
 sound/soc/mediatek/mt8186/mt8186-dai-adda.c | 2 --
 1 file changed, 2 deletions(-)
sound/soc/mediatek/mt8186/mt8186-dai-adda.c +0 -2
index db71b032770d..6be6d4f3b585 100644
@@ -295,8 +295,6 @@ static int mtk_adda_pad_top_event(struct snd_soc_dapm_widget *w,
 	case SND_SOC_DAPM_PRE_PMU:
 		if (afe_priv->mtkaif_protocol == MTKAIF_PROTOCOL_2_CLK_P2)
 			regmap_write(afe->regmap, AFE_AUD_PAD_TOP, 0x39);
-		else if (afe_priv->mtkaif_protocol == MTKAIF_PROTOCOL_2)
-			regmap_write(afe->regmap, AFE_AUD_PAD_TOP, 0x31);
 		else
 			regmap_write(afe->regmap, AFE_AUD_PAD_TOP, 0x31);
 		break;
Signature · 1 line
2.29.0
#1 lore raw

Il 08/07/22 04:46, Zhongjun Tan ha scritto:

Quoted 14 lines

From: Zhongjun Tan <[email protected]>

Remove condition with no effect

---
  sound/soc/mediatek/mt8186/mt8186-dai-adda.c | 2 --
  1 file changed, 2 deletions(-)
sound/soc/mediatek/mt8186/mt8186-dai-adda.c +0 -0
index db71b032770d..6be6d4f3b585 100644

sound/soc/mediatek/mt8186/mt8186-dai-adda.c static int mtk_adda_pad_top_event(struct snd_soc_dapm_widget *w, · line 299

Quoted 5 lines
sound/soc/mediatek/mt8186/mt8186-dai-adda.c +0 -2
@@ -295,8 +295,6 @@ static int mtk_adda_pad_top_event(struct snd_soc_dapm_widget *w,
  	case SND_SOC_DAPM_PRE_PMU:
  		if (afe_priv->mtkaif_protocol == MTKAIF_PROTOCOL_2_CLK_P2)
  			regmap_write(afe->regmap, AFE_AUD_PAD_TOP, 0x39);
-		else if (afe_priv->mtkaif_protocol == MTKAIF_PROTOCOL_2)
-			regmap_write(afe->regmap, AFE_AUD_PAD_TOP, 0x31);

I think that this needs some clarification from MediaTek: was 0x31 a typo here?

Regards,
Angelo

Quoted 3 lines
sound/soc/mediatek/mt8186/mt8186-dai-adda.c +0 -0
  		else
  			regmap_write(afe->regmap, AFE_AUD_PAD_TOP, 0x31);
  		break;
maintainer
#2 lore raw
Quoted 10 lines · AngeloGioacchino Del Regno

Il 08/07/22 04:46, Zhongjun Tan ha scritto:

Quoted 9 lines

From: Zhongjun Tan <[email protected]>

Remove condition with no effect

---
  sound/soc/mediatek/mt8186/mt8186-dai-adda.c | 2 --

  1 file changed, 2 deletions(-)
Quoted 14 lines
Quoted 11 lines
sound/soc/mediatek/mt8186/mt8186-dai-adda.c +0 -0
index db71b032770d..6be6d4f3b585 100644
@@ -295,8 +295,6 @@ static int mtk_adda_pad_top_event(struct 
 snd_soc_dapm_widget *w,

      case SND_SOC_DAPM_PRE_PMU:
          if (afe_priv->mtkaif_protocol == MTKAIF_PROTOCOL_2_CLK_P2) regmap_write(afe->regmap, AFE_AUD_PAD_TOP, 0x39); -        else if (afe_priv->mtkaif_protocol == MTKAIF_PROTOCOL_2) -            regmap_write(afe->regmap, AFE_AUD_PAD_TOP, 0x31);

I think that this needs some clarification from MediaTek: was 0x31 a typo here?

Looks like the write is covered by the else case already, so we don't need the else if here. In any case commit message could be improved.

Regards,
Matthias

Quoted 8 lines

Regards,
Angelo

Quoted 3 lines

          else
              regmap_write(afe->regmap, AFE_AUD_PAD_TOP, 0x31); break;

#3 lore raw
In reply to AngeloGioacchino Del Regno
Quoted 30 lines · AngeloGioacchino Del Regno

Il 08/07/22 04:46, Zhongjun Tan ha scritto:

Quoted 24 lines

From: Zhongjun Tan <[email protected]>

Remove condition with no effect

---
  sound/soc/mediatek/mt8186/mt8186-dai-adda.c | 2 --
  1 file changed, 2 deletions(-)
sound/soc/mediatek/mt8186/mt8186-dai-adda.c +0 -1
index db71b032770d..6be6d4f3b585 100644
@@ -295,8 +295,6 @@ static int mtk_adda_pad_top_event(struct
 snd_soc_dapm_widget *w,
  	case SND_SOC_DAPM_PRE_PMU:
  		if (afe_priv->mtkaif_protocol ==
 MTKAIF_PROTOCOL_2_CLK_P2)
  			regmap_write(afe->regmap, AFE_AUD_PAD_TOP,
 0x39);
-		else if (afe_priv->mtkaif_protocol ==

MTKAIF_PROTOCOL_2)

sound/soc/mediatek/mt8186/mt8186-dai-adda.c +0 -1
-			regmap_write(afe->regmap, AFE_AUD_PAD_TOP,
Quoted 1 line

0x31);

I think that this needs some clarification from MediaTek: was 0x31 a typo here?

Quoted 3 lines

Regards,
Angelo

Hi Angelo,

This patch can be accepted. The 0x31 is not typo, the logic of this code is not concise enough.

Thanks,
Jiaxin.Yu

Quoted 6 lines
Quoted 4 lines

else
regmap_write(afe->regmap, AFE_AUD_PAD_TOP,
0x31);
break;

maintainer Reviewed-by
#4 lore raw

Il 08/07/22 12:19, Jiaxin Yu ha scritto:

Quoted 34 lines · AngeloGioacchino Del Regno
Quoted 30 lines

Il 08/07/22 04:46, Zhongjun Tan ha scritto:

Quoted 24 lines

From: Zhongjun Tan <[email protected]>

Remove condition with no effect

---
   sound/soc/mediatek/mt8186/mt8186-dai-adda.c | 2 --
   1 file changed, 2 deletions(-)
sound/soc/mediatek/mt8186/mt8186-dai-adda.c +0 -1
index db71b032770d..6be6d4f3b585 100644
@@ -295,8 +295,6 @@ static int mtk_adda_pad_top_event(struct
 snd_soc_dapm_widget *w,
   	case SND_SOC_DAPM_PRE_PMU:
   		if (afe_priv->mtkaif_protocol ==
 MTKAIF_PROTOCOL_2_CLK_P2)
   			regmap_write(afe->regmap, AFE_AUD_PAD_TOP,
 0x39);
-		else if (afe_priv->mtkaif_protocol ==

MTKAIF_PROTOCOL_2)

sound/soc/mediatek/mt8186/mt8186-dai-adda.c +0 -1
-			regmap_write(afe->regmap, AFE_AUD_PAD_TOP,
Quoted 1 line

0x31);

I think that this needs some clarification from MediaTek: was 0x31 a typo here?

Quoted 3 lines

Regards,
Angelo

Quoted 7 lines

Hi Angelo,

This patch can be accepted. The 0x31 is not typo, the logic of this code is not concise enough.

Thanks,
Jiaxin.Yu

Thank you for the clarification. In this case:

Cheers!

Quoted 8 lines
Quoted 7 lines
Quoted 5 lines
   		else
   			regmap_write(afe->regmap, AFE_AUD_PAD_TOP,
0x31);
   		break;
maintainer
#5 lore raw
In reply to Zhongjun Tan
Quoted 5 lines · Zhongjun Tan

From: Zhongjun Tan <[email protected]>

Remove condition with no effect

Applied to

https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/1] ASoC: mediatek: mt8186: Remove condition with no effect

      commit: 19bb587f3ffcb9c166bac2debdc3b08fb362c0b7

All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying to this mail.

Thanks,
Mark