linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matthias Kaehlcke <mka@chromium.org>
To: "Alex Deucher" <alexander.deucher@amd.com>,
	"Christian König" <christian.koenig@amd.com>,
	"David Zhou" <David1.Zhou@amd.com>,
	"David Airlie" <airlied@linux.ie>,
	"Harry Wentland" <harry.wentland@amd.com>,
	"Tony Cheng" <Tony.Cheng@amd.com>,
	"Dmytro Laktyushkin" <Dmytro.Laktyushkin@amd.com>
Cc: amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
	linux-kernel@vger.kernel.org, Guenter Roeck <groeck@chromium.org>,
	Justin TerAvest <teravest@chromium.org>,
	Craig Bergstrom <craigb@chromium.org>,
	KaiChieh Chuang <kaichieh.chuang@mediatek.com>,
	Mark Brown <broonie@kernel.org>
Subject: Re: [PATCH v3 1/4] ASoC: dapm: fix debugfs read using path->connected
Date: Fri, 9 Feb 2018 13:25:30 -0800	[thread overview]
Message-ID: <20180209212530.GF116483@google.com> (raw)
In-Reply-To: <20180209212216.71447-1-mka@chromium.org>

Sorry, I unintentionally 'recycled' git send-email parameters, please
ignore this patch :(

El Fri, Feb 09, 2018 at 01:22:13PM -0800 Matthias Kaehlcke ha dit:

> From: KaiChieh Chuang <kaichieh.chuang@mediatek.com>
> 
> This fix a bug in dapm_widget_power_read_file(),
> where it may sent opposite order of source/sink widget
> into the p->connected().
> 
> for example,
> static int connected_check(source, sink);
> {"w_sink", NULL, "w_source", connected_check}
> 
> the dapm_widget_power_read_file() will query p->connected()
> in following case
> 	p->conneted("w_source", "w_sink")
> 	p->conneted("w_sink", "w_source")
> we should avoid the last case, since it's the wrong order (source/sink)
> as declared in snd_soc_dapm_route.
> 
> Signed-off-by: KaiChieh Chuang <kaichieh.chuang@mediatek.com>
> Signed-off-by: Mark Brown <broonie@kernel.org>
> Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
> ---
>  sound/soc/soc-dapm.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
> index a10b21cfc31e..ee6d9d9a3c5e 100644
> --- a/sound/soc/soc-dapm.c
> +++ b/sound/soc/soc-dapm.c
> @@ -2026,7 +2026,7 @@ static ssize_t dapm_widget_power_read_file(struct file *file,
>  	snd_soc_dapm_for_each_direction(dir) {
>  		rdir = SND_SOC_DAPM_DIR_REVERSE(dir);
>  		snd_soc_dapm_widget_for_each_path(w, dir, p) {
> -			if (p->connected && !p->connected(w, p->node[rdir]))
> +			if (p->connected && !p->connected(p->source, p->sink))
>  				continue;
>  
>  			if (!p->connect)

      reply	other threads:[~2018-02-09 21:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-09 21:22 [PATCH v3 1/4] ASoC: dapm: fix debugfs read using path->connected Matthias Kaehlcke
2018-02-09 21:25 ` Matthias Kaehlcke [this message]

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=20180209212530.GF116483@google.com \
    --to=mka@chromium.org \
    --cc=David1.Zhou@amd.com \
    --cc=Dmytro.Laktyushkin@amd.com \
    --cc=Tony.Cheng@amd.com \
    --cc=airlied@linux.ie \
    --cc=alexander.deucher@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=broonie@kernel.org \
    --cc=christian.koenig@amd.com \
    --cc=craigb@chromium.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=groeck@chromium.org \
    --cc=harry.wentland@amd.com \
    --cc=kaichieh.chuang@mediatek.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=teravest@chromium.org \
    /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;
as well as URLs for NNTP newsgroup(s).