Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Baluta <daniel.baluta@nxp.com>
To: "festevam@gmail.com" <festevam@gmail.com>
Cc: "S.j. Wang" <shengjiu.wang@nxp.com>,
	Leonard Crestez <leonard.crestez@nxp.com>,
	"alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>
Subject: Commit 8f7206d69a ("ASoC: imx-wm8962: Remove global variables") looks strange
Date: Mon, 26 Feb 2018 14:21:00 +0000	[thread overview]
Message-ID: <1519654860.13463.95.camel@nxp.com> (raw)

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

             reply	other threads:[~2018-02-26 14:21 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-26 14:21 Daniel Baluta [this message]
2018-02-26 14:34 ` Commit 8f7206d69a ("ASoC: imx-wm8962: Remove global variables") looks strange Fabio Estevam
2018-02-26 14:51   ` Daniel Baluta
2018-02-26 17:33     ` Fabio Estevam

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1519654860.13463.95.camel@nxp.com \
    --to=daniel.baluta@nxp.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=festevam@gmail.com \
    --cc=leonard.crestez@nxp.com \
    --cc=shengjiu.wang@nxp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox