All of lore.kernel.org
 help / color / mirror / Atom feed
* Commit 8f7206d69a ("ASoC: imx-wm8962: Remove global variables") looks strange
@ 2018-02-26 14:21 Daniel Baluta
  2018-02-26 14:34 ` Fabio Estevam
  0 siblings, 1 reply; 4+ messages in thread
From: Daniel Baluta @ 2018-02-26 14:21 UTC (permalink / raw)
  To: festevam; +Cc: S.j. Wang, Leonard Crestez, alsa-devel

Hi Fabio,

Leonard (Cc'ed) noticed that commit in $subject looks very strange.

For example:

@@ -139,7 +140,7 @@ static int imx_wm8962_late_probe(struct snd_soc_card *card)
 {
        struct snd_soc_pcm_runtime *rtd;
        struct snd_soc_dai *codec_dai;
-       struct imx_priv *priv = &card_priv;
+       struct imx_priv *priv = snd_soc_card_get_drvdata(card);
        struct imx_wm8962_data *data = snd_soc_card_get_drvdata(card);

So, now data and priv point to the same memory area but they are completely
different structures!

Unless we are missing something this is obviously a bug. I will try to have a look at
the end of the week, but any comments are welcome.

I think the fix would be to have one global priv structure and to unify imx_wm8962_data
with imx_priv.

thanks,
Daniel.

_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

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

* Re: Commit 8f7206d69a ("ASoC: imx-wm8962: Remove global variables") looks strange
  2018-02-26 14:21 Commit 8f7206d69a ("ASoC: imx-wm8962: Remove global variables") looks strange Daniel Baluta
@ 2018-02-26 14:34 ` Fabio Estevam
  2018-02-26 14:51   ` Daniel Baluta
  0 siblings, 1 reply; 4+ messages in thread
From: Fabio Estevam @ 2018-02-26 14:34 UTC (permalink / raw)
  To: Daniel Baluta; +Cc: S.j. Wang, Leonard Crestez, alsa-devel

Hi Daniel,

On Mon, Feb 26, 2018 at 11:21 AM, Daniel Baluta <daniel.baluta@nxp.com> wrote:
> Hi Fabio,
>
> Leonard (Cc'ed) noticed that commit in $subject looks very strange.
>
> For example:
>
> @@ -139,7 +140,7 @@ static int imx_wm8962_late_probe(struct snd_soc_card *card)
>  {
>         struct snd_soc_pcm_runtime *rtd;
>         struct snd_soc_dai *codec_dai;
> -       struct imx_priv *priv = &card_priv;
> +       struct imx_priv *priv = snd_soc_card_get_drvdata(card);
>         struct imx_wm8962_data *data = snd_soc_card_get_drvdata(card);
>
> So, now data and priv point to the same memory area but they are completely
> different structures!
>
> Unless we are missing something this is obviously a bug. I will try to have a look at
> the end of the week, but any comments are welcome.
>
> I think the fix would be to have one global priv structure and to unify imx_wm8962_data
> with imx_priv.

Could you please look in mainline? The structs were re arranged there
and I do not see this problem.

Please confirm.

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

* Re: Commit 8f7206d69a ("ASoC: imx-wm8962: Remove global variables") looks strange
  2018-02-26 14:34 ` Fabio Estevam
@ 2018-02-26 14:51   ` Daniel Baluta
  2018-02-26 17:33     ` Fabio Estevam
  0 siblings, 1 reply; 4+ messages in thread
From: Daniel Baluta @ 2018-02-26 14:51 UTC (permalink / raw)
  To: festevam; +Cc: S.j. Wang, Leonard Crestez, alsa-devel

On Lu, 2018-02-26 at 11:34 -0300, Fabio Estevam wrote:
> Hi Daniel,
> 
> On Mon, Feb 26, 2018 at 11:21 AM, Daniel Baluta <daniel.baluta@nxp.com> wrote:
> > 
> > Hi Fabio,
> > 
> > Leonard (Cc'ed) noticed that commit in $subject looks very strange.
> > 
> > For example:
> > 
> > @@ -139,7 +140,7 @@ static int imx_wm8962_late_probe(struct snd_soc_card *card)
> >  {
> >         struct snd_soc_pcm_runtime *rtd;
> >         struct snd_soc_dai *codec_dai;
> > -       struct imx_priv *priv = &card_priv;
> > +       struct imx_priv *priv = snd_soc_card_get_drvdata(card);
> >         struct imx_wm8962_data *data = snd_soc_card_get_drvdata(card);
> > 
> > So, now data and priv point to the same memory area but they are completely
> > different structures!
> > 
> > Unless we are missing something this is obviously a bug. I will try to have a look at
> > the end of the week, but any comments are welcome.
> > 
> > I think the fix would be to have one global priv structure and to unify imx_wm8962_data
> > with imx_priv.
> Could you please look in mainline? The structs were re arranged there
> and I do not see this problem.
> 
> Please confirm.

Hmm,

Looking into latest:

git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git

for-next branch and the commit in subject is the last on this file.

Is there any other more updated tree/branch? Can you point the commit hash that did the re-arrangement.

Daniel.
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

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

* Re: Commit 8f7206d69a ("ASoC: imx-wm8962: Remove global variables") looks strange
  2018-02-26 14:51   ` Daniel Baluta
@ 2018-02-26 17:33     ` Fabio Estevam
  0 siblings, 0 replies; 4+ messages in thread
From: Fabio Estevam @ 2018-02-26 17:33 UTC (permalink / raw)
  To: Daniel Baluta; +Cc: S.j. Wang, Leonard Crestez, alsa-devel

On Mon, Feb 26, 2018 at 11:51 AM, Daniel Baluta <daniel.baluta@nxp.com> wrote:

> Hmm,
>
> Looking into latest:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
>
> for-next branch and the commit in subject is the last on this file.
>
> Is there any other more updated tree/branch? Can you point the commit hash that did the re-arrangement.

Sorry, I was looking at the codec file instead of the machine driver one.

I will work on a fix.

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

end of thread, other threads:[~2018-02-26 17:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-26 14:21 Commit 8f7206d69a ("ASoC: imx-wm8962: Remove global variables") looks strange Daniel Baluta
2018-02-26 14:34 ` Fabio Estevam
2018-02-26 14:51   ` Daniel Baluta
2018-02-26 17:33     ` Fabio Estevam

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.