From 64ca77d9f55afbbe5e63b1d290cade4acfb8e4fa Mon Sep 17 00:00:00 2001 From: Julia Lawall Date: Sat, 13 Feb 2021 11:19:04 +0100 Subject: ASoC: mmp-sspa: drop unneeded snd_soc_dai_set_drvdata snd_soc_dai_set_drvdata is not needed when the set data comes from snd_soc_dai_get_drvdata or dev_get_drvdata. The problem was fixed usingthe following semantic patch: (http://coccinelle.lip6.fr/) // @@ expression x,y,e; @@ x = dev_get_drvdata(y->dev) ... when != x = e - snd_soc_dai_set_drvdata(y,x); @@ expression x,y,e; @@ x = snd_soc_dai_get_drvdata(y) ... when != x = e - snd_soc_dai_set_drvdata(y,x); // Signed-off-by: Julia Lawall Link: https://lore.kernel.org/r/20210213101907.1318496-2-Julia.Lawall@inria.fr Signed-off-by: Mark Brown --- sound/soc/pxa/mmp-sspa.c | 1 - 1 file changed, 1 deletion(-) (limited to 'sound/soc/pxa') diff --git a/sound/soc/pxa/mmp-sspa.c b/sound/soc/pxa/mmp-sspa.c index 4803972ee655..7e39210a0b38 100644 --- a/sound/soc/pxa/mmp-sspa.c +++ b/sound/soc/pxa/mmp-sspa.c @@ -330,7 +330,6 @@ static int mmp_sspa_probe(struct snd_soc_dai *dai) &sspa->playback_dma_data, &sspa->capture_dma_data); - snd_soc_dai_set_drvdata(dai, sspa); return 0; } -- cgit v1.2.3 From 00a25480cca4a094765084964c753c8f28e0f6fd Mon Sep 17 00:00:00 2001 From: Pierre-Louis Bossart Date: Fri, 26 Mar 2021 16:59:17 -0500 Subject: ASoC: pxa: remove useless assignment cppcheck warning: sound/soc/pxa/mmp-pcm.c:207:10: style: Variable 'ret' is assigned a value that is never used. [unreadVariable] int ret = 0, stream; ^ Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210326215927.936377-8-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown --- sound/soc/pxa/mmp-pcm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sound/soc/pxa') diff --git a/sound/soc/pxa/mmp-pcm.c b/sound/soc/pxa/mmp-pcm.c index 53fc49e32fbc..5d520e18e512 100644 --- a/sound/soc/pxa/mmp-pcm.c +++ b/sound/soc/pxa/mmp-pcm.c @@ -204,7 +204,7 @@ static int mmp_pcm_new(struct snd_soc_component *component, { struct snd_pcm_substream *substream; struct snd_pcm *pcm = rtd->pcm; - int ret = 0, stream; + int ret, stream; for (stream = 0; stream < 2; stream++) { substream = pcm->streams[stream].substream; -- cgit v1.2.3