All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: rsnd: fixup index of SSI mod when SRC is used
@ 2014-07-02 11:18 Jürg Billeter
  2014-07-03 13:57 ` Kuninori Morimoto
  0 siblings, 1 reply; 5+ messages in thread
From: Jürg Billeter @ 2014-07-02 11:18 UTC (permalink / raw)
  To: Mark Brown, Kuninori Morimoto
  Cc: Liam Girdwood, Jaroslav Kysela, Takashi Iwai, Simon Horman,
	Magnus Damm, alsa-devel, linux-kernel, Jürg Billeter

The default index 1 was used as the loop was terminated before the
following code could be reached:

	if (mod[i] == this)
		index = i;

Signed-off-by: Jürg Billeter <j@bitron.ch>
---
 sound/soc/sh/rcar/core.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c
index 4e86265..d737fea 100644
--- a/sound/soc/sh/rcar/core.c
+++ b/sound/soc/sh/rcar/core.c
@@ -295,9 +295,11 @@ static void rsnd_dma_of_name(struct rsnd_dma *dma,
 	mod[0] = NULL; /* for "mem" */
 	index = 1;
 	for (i = 1; i < MOD_MAX; i++) {
-		if (!src) {
-			mod[i] = ssi;
+		if (!ssi) {
 			break;
+		} else if (!src) {
+			mod[i] = ssi;
+			ssi = NULL;
 		} else if (!dvc) {
 			mod[i] = src;
 			src = NULL;
-- 
2.0.1


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

* Re: [PATCH] ASoC: rsnd: fixup index of SSI mod when SRC is used
  2014-07-02 11:18 [PATCH] ASoC: rsnd: fixup index of SSI mod when SRC is used Jürg Billeter
@ 2014-07-03 13:57 ` Kuninori Morimoto
  2014-07-03 14:05   ` Kuninori Morimoto
  2014-07-03 14:09   ` [alsa-devel] " Jürg Billeter
  0 siblings, 2 replies; 5+ messages in thread
From: Kuninori Morimoto @ 2014-07-03 13:57 UTC (permalink / raw)
  To: Jürg Billeter
  Cc: Linux-ALSA, Simon Horman, Takashi Iwai, Magnus Damm,
	linux-kernel, Liam Girdwood, Mark Brown

Hi

If you add this code,

        if (!ssi) {
               break;
        } else ...

then, I guess we can remove this code ?

	if (mod[i] == ssi)
	break;



2014-07-02 20:18 GMT+09:00 Jürg Billeter <j@bitron.ch>:

> The default index 1 was used as the loop was terminated before the
> following code could be reached:
>
>         if (mod[i] == this)
>                 index = i;
>
> Signed-off-by: Jürg Billeter <j@bitron.ch>
> ---
>  sound/soc/sh/rcar/core.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c
> index 4e86265..d737fea 100644
> --- a/sound/soc/sh/rcar/core.c
> +++ b/sound/soc/sh/rcar/core.c
> @@ -295,9 +295,11 @@ static void rsnd_dma_of_name(struct rsnd_dma *dma,
>         mod[0] = NULL; /* for "mem" */
>         index = 1;
>         for (i = 1; i < MOD_MAX; i++) {
> -               if (!src) {
> -                       mod[i] = ssi;
> +               if (!ssi) {
>                         break;
> +               } else if (!src) {
> +                       mod[i] = ssi;
> +                       ssi = NULL;
>                 } else if (!dvc) {
>                         mod[i] = src;
>                         src = NULL;
> --
> 2.0.1
>
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel@alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
>
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

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

* Re: [PATCH] ASoC: rsnd: fixup index of SSI mod when SRC is used
  2014-07-03 13:57 ` Kuninori Morimoto
@ 2014-07-03 14:05   ` Kuninori Morimoto
  2014-07-03 14:09   ` [alsa-devel] " Jürg Billeter
  1 sibling, 0 replies; 5+ messages in thread
From: Kuninori Morimoto @ 2014-07-03 14:05 UTC (permalink / raw)
  To: Jürg Billeter
  Cc: Linux-ALSA, Simon Horman, Takashi Iwai, Magnus Damm,
	linux-kernel, Liam Girdwood, Mark Brown

Hi again


2014-07-03 22:57 GMT+09:00 Kuninori Morimoto <kuninori.morimoto.gx@gmail.com
>:

> Hi
>
> If you add this code,
>
>         if (!ssi) {
>                break;
>         } else ...
>
> then, I guess we can remove this code ?
>
> 	if (mod[i] == ssi)
> 	break;
>
>
>
Maybe this is not correct comment.
Now, I'm confusing about this patch.
What kind of issue happen without this patch ?



>
> 2014-07-02 20:18 GMT+09:00 Jürg Billeter <j@bitron.ch>:
>
> The default index 1 was used as the loop was terminated before the
>> following code could be reached:
>>
>>         if (mod[i] == this)
>>                 index = i;
>>
>> Signed-off-by: Jürg Billeter <j@bitron.ch>
>> ---
>>  sound/soc/sh/rcar/core.c | 6 ++++--
>>  1 file changed, 4 insertions(+), 2 deletions(-)
>>
>> diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c
>> index 4e86265..d737fea 100644
>> --- a/sound/soc/sh/rcar/core.c
>> +++ b/sound/soc/sh/rcar/core.c
>> @@ -295,9 +295,11 @@ static void rsnd_dma_of_name(struct rsnd_dma *dma,
>>         mod[0] = NULL; /* for "mem" */
>>         index = 1;
>>         for (i = 1; i < MOD_MAX; i++) {
>> -               if (!src) {
>> -                       mod[i] = ssi;
>> +               if (!ssi) {
>>                         break;
>> +               } else if (!src) {
>> +                       mod[i] = ssi;
>> +                       ssi = NULL;
>>                 } else if (!dvc) {
>>                         mod[i] = src;
>>                         src = NULL;
>> --
>> 2.0.1
>>
>> _______________________________________________
>> Alsa-devel mailing list
>> Alsa-devel@alsa-project.org
>> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
>>
>
>
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

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

* Re: [alsa-devel] [PATCH] ASoC: rsnd: fixup index of SSI mod when SRC is used
  2014-07-03 13:57 ` Kuninori Morimoto
  2014-07-03 14:05   ` Kuninori Morimoto
@ 2014-07-03 14:09   ` Jürg Billeter
  2014-07-04  8:08     ` Kuninori Morimoto
  1 sibling, 1 reply; 5+ messages in thread
From: Jürg Billeter @ 2014-07-03 14:09 UTC (permalink / raw)
  To: Kuninori Morimoto
  Cc: Mark Brown, Linux-ALSA, Takashi Iwai, linux-kernel, Magnus Damm,
	Liam Girdwood, Simon Horman

Hi,

On Thu, 2014-07-03 at 22:57 +0900, Kuninori Morimoto wrote:
> If you add this code,
>
>         if (!ssi) {
>                break;
>         } else ...
>  
> then, I guess we can remove this code ?
> 
> 	if (mod[i] == ssi)
> 	break;

I checked the issue on mainline master where the above two lines are not
present yet. Looking at Mark's for-next tree reveals that you already
fixed the issue in a slightly different way (commit c08c3b08). You may
disregard my patch.

Jürg



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

* Re: [PATCH] ASoC: rsnd: fixup index of SSI mod when SRC is used
  2014-07-03 14:09   ` [alsa-devel] " Jürg Billeter
@ 2014-07-04  8:08     ` Kuninori Morimoto
  0 siblings, 0 replies; 5+ messages in thread
From: Kuninori Morimoto @ 2014-07-04  8:08 UTC (permalink / raw)
  To: Jürg Billeter
  Cc: Linux-ALSA, Simon Horman, Takashi Iwai, Magnus Damm,
	linux-kernel, Liam Girdwood, Mark Brown

Hi Jürg


I checked the issue on mainline master where the above two lines are not
> present yet. Looking at Mark's for-next tree reveals that you already
> fixed the issue in a slightly different way (commit c08c3b08). You may
> disregard my patch.
>

I understand.
Thank you for your reply, and thank you for your test.
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

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

end of thread, other threads:[~2014-07-04  8:08 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-02 11:18 [PATCH] ASoC: rsnd: fixup index of SSI mod when SRC is used Jürg Billeter
2014-07-03 13:57 ` Kuninori Morimoto
2014-07-03 14:05   ` Kuninori Morimoto
2014-07-03 14:09   ` [alsa-devel] " Jürg Billeter
2014-07-04  8:08     ` Kuninori Morimoto

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.