diff mbox

ASoC: rcar: remove unused variable

Message ID 4929159.b95vLdVRYU@wuerfel (mailing list archive)
State Accepted
Delegated to: Geert Uytterhoeven
Headers show

Commit Message

Arnd Bergmann Nov. 23, 2015, 9:35 a.m. UTC
After a recent cleanup, the soc_card variable became unused
and now produces a warning:

soc/sh/rcar/core.c: In function '__rsnd_kctrl_new':
soc/sh/rcar/core.c:801:23: warning: unused variable 'soc_card' [-Wunused-variable]

This removes the variable.

Fixes: 1a497983a5ae ("ASoC: Change the PCM runtime array to a list")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>


--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Kuninori Morimoto Nov. 25, 2015, 6:25 a.m. UTC | #1
Hi Arnd, Mark

> After a recent cleanup, the soc_card variable became unused
> and now produces a warning:
> 
> soc/sh/rcar/core.c: In function '__rsnd_kctrl_new':
> soc/sh/rcar/core.c:801:23: warning: unused variable 'soc_card' [-Wunused-variable]
> 
> This removes the variable.
> 
> Fixes: 1a497983a5ae ("ASoC: Change the PCM runtime array to a list")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> 
> diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c
> index c6685f14b9cb..90b244c1f526 100644
> --- a/sound/soc/sh/rcar/core.c
> +++ b/sound/soc/sh/rcar/core.c
> @@ -798,7 +798,6 @@ static int __rsnd_kctrl_new(struct rsnd_mod *mod,
>  			    void (*update)(struct rsnd_dai_stream *io,
>  					   struct rsnd_mod *mod))
>  {
> -	struct snd_soc_card *soc_card = rtd->card;
>  	struct snd_card *card = rtd->card->snd_card;
>  	struct snd_kcontrol *kctrl;
>  	struct snd_kcontrol_new knew = {

It seems this patch was accepted to topic/rcar branch,
but I got compile error

/opt/home/morimoto/WORK/linux/sound/soc/sh/rcar/core.c: In function '__rsnd_kctrl_new':
/opt/home/morimoto/WORK/linux/sound/soc/sh/rcar/core.c:807:18: error: 'soc_card' undeclared (first use in this function)
   .index  = rtd - soc_card->rtd,
                  ^
/opt/home/morimoto/WORK/linux/sound/soc/sh/rcar/core.c:807:18: note: each undeclared identifier is reported only once for each function it appears in
make[6]: *** [sound/soc/sh/rcar/core.o] ??? 1
make[6]: *** ??????????????....
make[5]: *** [sound/soc/sh/rcar] ??? 2
make[4]: *** [sound/soc/sh] ??? 2

This __rsnd_kctrl_new() is using "soc_card"...


--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Arnd Bergmann Nov. 25, 2015, 8:36 a.m. UTC | #2
On Wednesday 25 November 2015 06:25:36 Kuninori Morimoto wrote:
> 
> Hi Arnd, Mark
> 
> > After a recent cleanup, the soc_card variable became unused
> > and now produces a warning:
> > 
> > soc/sh/rcar/core.c: In function '__rsnd_kctrl_new':
> > soc/sh/rcar/core.c:801:23: warning: unused variable 'soc_card' [-Wunused-variable]
> > 
> > This removes the variable.
> > 
> > Fixes: 1a497983a5ae ("ASoC: Change the PCM runtime array to a list")
> > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> > 
> > diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c
> > index c6685f14b9cb..90b244c1f526 100644
> > --- a/sound/soc/sh/rcar/core.c
> > +++ b/sound/soc/sh/rcar/core.c
> > @@ -798,7 +798,6 @@ static int __rsnd_kctrl_new(struct rsnd_mod *mod,
> >  			    void (*update)(struct rsnd_dai_stream *io,
> >  					   struct rsnd_mod *mod))
> >  {
> > -	struct snd_soc_card *soc_card = rtd->card;
> >  	struct snd_card *card = rtd->card->snd_card;
> >  	struct snd_kcontrol *kctrl;
> >  	struct snd_kcontrol_new knew = {
> 
> It seems this patch was accepted to topic/rcar branch,
> but I got compile error
> 
> /opt/home/morimoto/WORK/linux/sound/soc/sh/rcar/core.c: In function '__rsnd_kctrl_new':
> /opt/home/morimoto/WORK/linux/sound/soc/sh/rcar/core.c:807:18: error: 'soc_card' undeclared (first use in this function)
>    .index  = rtd - soc_card->rtd,
>                   ^
> /opt/home/morimoto/WORK/linux/sound/soc/sh/rcar/core.c:807:18: note: each undeclared identifier is reported only once for each function it appears in
> make[6]: *** [sound/soc/sh/rcar/core.o] ??? 1
> make[6]: *** ??????????????....
> make[5]: *** [sound/soc/sh/rcar] ??? 2
> make[4]: *** [sound/soc/sh] ??? 2
> 
> This __rsnd_kctrl_new() is using "soc_card"...

It looks like the commit that removed the user of that variable is in the
"topic/pcm-list" branch instead of "topic/rcar".

	Arnd
--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Kuninori Morimoto Nov. 25, 2015, 11:54 p.m. UTC | #3
Hi Mark, Arnd

> > /opt/home/morimoto/WORK/linux/sound/soc/sh/rcar/core.c: In function '__rsnd_kctrl_new':
> > /opt/home/morimoto/WORK/linux/sound/soc/sh/rcar/core.c:807:18: error: 'soc_card' undeclared (first use in this function)
> >    .index  = rtd - soc_card->rtd,
> >                   ^
> > /opt/home/morimoto/WORK/linux/sound/soc/sh/rcar/core.c:807:18: note: each undeclared identifier is reported only once for each function it appears in
> > make[6]: *** [sound/soc/sh/rcar/core.o] ??? 1
> > make[6]: *** ??????????????....
> > make[5]: *** [sound/soc/sh/rcar] ??? 2
> > make[4]: *** [sound/soc/sh] ??? 2
> > 
> > This __rsnd_kctrl_new() is using "soc_card"...
> 
> It looks like the commit that removed the user of that variable is in the
> "topic/pcm-list" branch instead of "topic/rcar".

Mark

It is possible to remove this patch from topic/rcar,
and, apply it to topic/pcm-list ?

ccae40fa973f5b0eec5d5ad27e81c5a2b95f7b7c
(" ASoC: rcar: remove unused variable")
--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Mark Brown Nov. 26, 2015, 1:05 a.m. UTC | #4
On Wed, Nov 25, 2015 at 11:54:06PM +0000, Kuninori Morimoto wrote:

> It is possible to remove this patch from topic/rcar,
> and, apply it to topic/pcm-list ?

> ccae40fa973f5b0eec5d5ad27e81c5a2b95f7b7c
> (" ASoC: rcar: remove unused variable")

I did that already.
Kuninori Morimoto Nov. 26, 2015, 2:17 a.m. UTC | #5
Hi

> > It is possible to remove this patch from topic/rcar,
> > and, apply it to topic/pcm-list ?
> 
> > ccae40fa973f5b0eec5d5ad27e81c5a2b95f7b7c
> > (" ASoC: rcar: remove unused variable")
> 
> I did that already.

Thanks !

--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c
index c6685f14b9cb..90b244c1f526 100644
--- a/sound/soc/sh/rcar/core.c
+++ b/sound/soc/sh/rcar/core.c
@@ -798,7 +798,6 @@  static int __rsnd_kctrl_new(struct rsnd_mod *mod,
 			    void (*update)(struct rsnd_dai_stream *io,
 					   struct rsnd_mod *mod))
 {
-	struct snd_soc_card *soc_card = rtd->card;
 	struct snd_card *card = rtd->card->snd_card;
 	struct snd_kcontrol *kctrl;
 	struct snd_kcontrol_new knew = {