kernel-janitors.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ASoC: mediatek: mt8195: Fix unused initialization of pointer etdm_data
@ 2021-09-03 11:49 Colin King
  2021-09-07  8:00 ` Trevor Wu
  2021-09-13 10:53 ` Mark Brown
  0 siblings, 2 replies; 3+ messages in thread
From: Colin King @ 2021-09-03 11:49 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai,
	Matthias Brugger, alsa-devel, linux-arm-kernel, linux-mediatek
  Cc: kernel-janitors, linux-kernel

From: Colin Ian King <colin.king@canonical.com>

The pointer etdm_data is being inintialized with a value that is never
read, it is later being re-assigned a new value. Remove the redundant
initialization.

Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 sound/soc/mediatek/mt8195/mt8195-dai-etdm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/mediatek/mt8195/mt8195-dai-etdm.c b/sound/soc/mediatek/mt8195/mt8195-dai-etdm.c
index 7378e42f2766..ac591d453e1e 100644
--- a/sound/soc/mediatek/mt8195/mt8195-dai-etdm.c
+++ b/sound/soc/mediatek/mt8195/mt8195-dai-etdm.c
@@ -2094,7 +2094,7 @@ static int mtk_dai_etdm_set_sysclk(struct snd_soc_dai *dai,
 {
 	struct mtk_base_afe *afe = snd_soc_dai_get_drvdata(dai);
 	struct mt8195_afe_private *afe_priv = afe->platform_priv;
-	struct mtk_dai_etdm_priv *etdm_data = afe_priv->dai_priv[dai->id];
+	struct mtk_dai_etdm_priv *etdm_data;
 	int dai_id;
 
 	dev_dbg(dai->dev, "%s id %d freq %u, dir %d\n",
-- 
2.32.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] ASoC: mediatek: mt8195: Fix unused initialization of pointer etdm_data
  2021-09-03 11:49 [PATCH] ASoC: mediatek: mt8195: Fix unused initialization of pointer etdm_data Colin King
@ 2021-09-07  8:00 ` Trevor Wu
  2021-09-13 10:53 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Trevor Wu @ 2021-09-07  8:00 UTC (permalink / raw)
  To: Colin King, Liam Girdwood, Mark Brown, Jaroslav Kysela,
	Takashi Iwai, Matthias Brugger, alsa-devel, linux-arm-kernel,
	linux-mediatek
  Cc: kernel-janitors, linux-kernel

On Fri, 2021-09-03 at 12:49 +0100, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> The pointer etdm_data is being inintialized with a value that is
> never
> read, it is later being re-assigned a new value. Remove the redundant
> initialization.
> 
> Addresses-Coverity: ("Unused value")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>  sound/soc/mediatek/mt8195/mt8195-dai-etdm.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/sound/soc/mediatek/mt8195/mt8195-dai-etdm.c
> b/sound/soc/mediatek/mt8195/mt8195-dai-etdm.c
> index 7378e42f2766..ac591d453e1e 100644
> --- a/sound/soc/mediatek/mt8195/mt8195-dai-etdm.c
> +++ b/sound/soc/mediatek/mt8195/mt8195-dai-etdm.c
> @@ -2094,7 +2094,7 @@ static int mtk_dai_etdm_set_sysclk(struct
> snd_soc_dai *dai,
>  {
>  	struct mtk_base_afe *afe = snd_soc_dai_get_drvdata(dai);
>  	struct mt8195_afe_private *afe_priv = afe->platform_priv;
> -	struct mtk_dai_etdm_priv *etdm_data = afe_priv->dai_priv[dai-
> >id];
> +	struct mtk_dai_etdm_priv *etdm_data;
>  	int dai_id;
>  
>  	dev_dbg(dai->dev, "%s id %d freq %u, dir %d\n",

Acked-by: Trevor Wu <trevor.wu@mediatek.com>

Thanks.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] ASoC: mediatek: mt8195: Fix unused initialization of pointer etdm_data
  2021-09-03 11:49 [PATCH] ASoC: mediatek: mt8195: Fix unused initialization of pointer etdm_data Colin King
  2021-09-07  8:00 ` Trevor Wu
@ 2021-09-13 10:53 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2021-09-13 10:53 UTC (permalink / raw)
  To: Matthias Brugger, Jaroslav Kysela, linux-arm-kernel, Colin King,
	Liam Girdwood, alsa-devel, Takashi Iwai, linux-mediatek
  Cc: Mark Brown, linux-kernel, kernel-janitors

On Fri, 3 Sep 2021 12:49:28 +0100, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> The pointer etdm_data is being inintialized with a value that is never
> read, it is later being re-assigned a new value. Remove the redundant
> initialization.
> 
> 
> [...]

Applied to

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

Thanks!

[1/1] ASoC: mediatek: mt8195: Fix unused initialization of pointer etdm_data
      commit: d67bbdda25c4156da079312a3594a41770123abd

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-09-13 10:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-03 11:49 [PATCH] ASoC: mediatek: mt8195: Fix unused initialization of pointer etdm_data Colin King
2021-09-07  8:00 ` Trevor Wu
2021-09-13 10:53 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).