All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: compress: Remove duplicated code
@ 2017-08-07 12:56 Peng Donglin
  0 siblings, 0 replies; 8+ messages in thread
From: Peng Donglin @ 2017-08-07 12:56 UTC (permalink / raw)
  To: broonie; +Cc: alsa-devel, Peng Donglin

The value of the variable new_name is assigned repeatedly.

Signed-off-by: Peng Donglin <pengdonglin137@163.com>
---
 sound/soc/soc-compress.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/sound/soc/soc-compress.c b/sound/soc/soc-compress.c
index 206f36b..2c16f42 100644
--- a/sound/soc/soc-compress.c
+++ b/sound/soc/soc-compress.c
@@ -737,9 +737,6 @@ int snd_soc_new_compress(struct snd_soc_pcm_runtime *rtd, int num)
 	}
 
 	/* check client and interface hw capabilities */
-	snprintf(new_name, sizeof(new_name), "%s %s-%d",
-			rtd->dai_link->stream_name, codec_dai->name, num);
-
 	if (codec_dai->driver->playback.channels_min)
 		playback = 1;
 	if (codec_dai->driver->capture.channels_min)
-- 
1.9.1

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

* [PATCH] ASoC: compress: Remove duplicated code
       [not found] <1502111504-7996-1-git-send-email-pengdonglin137@163.com>
@ 2017-08-07 13:18 ` Donglin Peng
  2017-08-07 15:07     ` Mark Brown
  0 siblings, 1 reply; 8+ messages in thread
From: Donglin Peng @ 2017-08-07 13:18 UTC (permalink / raw)
  To: broonie; +Cc: alsa-devel, linux-kernel

The value of the variable new_name is assigned repeatedly.

Signed-off-by: Peng Donglin <pengdonglin137@163.com>
---
 sound/soc/soc-compress.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/sound/soc/soc-compress.c b/sound/soc/soc-compress.c
index 206f36b..2c16f42 100644
--- a/sound/soc/soc-compress.c
+++ b/sound/soc/soc-compress.c
@@ -737,9 +737,6 @@ int snd_soc_new_compress(struct snd_soc_pcm_runtime
*rtd, int num)
        }

        /* check client and interface hw capabilities */
-       snprintf(new_name, sizeof(new_name), "%s %s-%d",
-                       rtd->dai_link->stream_name, codec_dai->name, num);
-
        if (codec_dai->driver->playback.channels_min)
                playback = 1;
        if (codec_dai->driver->capture.channels_min)
--
1.9.1

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

* Re: [PATCH] ASoC: compress: Remove duplicated code
  2017-08-07 13:18 ` [PATCH] ASoC: compress: Remove duplicated code Donglin Peng
@ 2017-08-07 15:07     ` Mark Brown
  0 siblings, 0 replies; 8+ messages in thread
From: Mark Brown @ 2017-08-07 15:07 UTC (permalink / raw)
  To: Donglin Peng; +Cc: alsa-devel, linux-kernel


[-- Attachment #1.1: Type: text/plain, Size: 683 bytes --]

On Mon, Aug 07, 2017 at 09:18:09PM +0800, Donglin Peng wrote:

> The value of the variable new_name is assigned repeatedly.

> @@ -737,9 +737,6 @@ int snd_soc_new_compress(struct snd_soc_pcm_runtime
> *rtd, int num)
>         }
> 
>         /* check client and interface hw capabilities */
> -       snprintf(new_name, sizeof(new_name), "%s %s-%d",
> -                       rtd->dai_link->stream_name, codec_dai->name, num);
> -

Are you sure that this is the assignment that should be deleted, and if
so why?  Note that it's both conditionally and unconditionally assigned
later on...  Some words in the commit log about why this copy is removed
would be helpful.

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



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

* Re: [PATCH] ASoC: compress: Remove duplicated code
@ 2017-08-07 15:07     ` Mark Brown
  0 siblings, 0 replies; 8+ messages in thread
From: Mark Brown @ 2017-08-07 15:07 UTC (permalink / raw)
  To: Donglin Peng; +Cc: alsa-devel, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 683 bytes --]

On Mon, Aug 07, 2017 at 09:18:09PM +0800, Donglin Peng wrote:

> The value of the variable new_name is assigned repeatedly.

> @@ -737,9 +737,6 @@ int snd_soc_new_compress(struct snd_soc_pcm_runtime
> *rtd, int num)
>         }
> 
>         /* check client and interface hw capabilities */
> -       snprintf(new_name, sizeof(new_name), "%s %s-%d",
> -                       rtd->dai_link->stream_name, codec_dai->name, num);
> -

Are you sure that this is the assignment that should be deleted, and if
so why?  Note that it's both conditionally and unconditionally assigned
later on...  Some words in the commit log about why this copy is removed
would be helpful.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: [PATCH] ASoC: compress: Remove duplicated code
  2017-08-07 15:07     ` Mark Brown
  (?)
@ 2017-08-07 15:28     ` Pierre-Louis Bossart
  2017-08-07 15:42       ` Mark Brown
  -1 siblings, 1 reply; 8+ messages in thread
From: Pierre-Louis Bossart @ 2017-08-07 15:28 UTC (permalink / raw)
  To: Mark Brown, Donglin Peng; +Cc: Liam Girdwood, alsa-devel

On 8/7/17 10:07 AM, Mark Brown wrote:
> On Mon, Aug 07, 2017 at 09:18:09PM +0800, Donglin Peng wrote:
>
>> The value of the variable new_name is assigned repeatedly.
>
>> @@ -737,9 +737,6 @@ int snd_soc_new_compress(struct snd_soc_pcm_runtime
>> *rtd, int num)
>>         }
>>
>>         /* check client and interface hw capabilities */
>> -       snprintf(new_name, sizeof(new_name), "%s %s-%d",
>> -                       rtd->dai_link->stream_name, codec_dai->name, num);
>> -
>
> Are you sure that this is the assignment that should be deleted, and if
> so why?  Note that it's both conditionally and unconditionally assigned
> later on...  Some words in the commit log about why this copy is removed
> would be helpful.

Thanks for the report. Yes, the logic escapes me as well, there were two 
separate changes from Liam and Richard Fitzgerald and I can't figure out 
why the reassignments of the variable new_name are required.

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

* Re: [PATCH] ASoC: compress: Remove duplicated code
  2017-08-07 15:28     ` Pierre-Louis Bossart
@ 2017-08-07 15:42       ` Mark Brown
  2017-08-07 15:59         ` Liam Girdwood
  0 siblings, 1 reply; 8+ messages in thread
From: Mark Brown @ 2017-08-07 15:42 UTC (permalink / raw)
  To: Pierre-Louis Bossart; +Cc: Liam Girdwood, alsa-devel, Donglin Peng


[-- Attachment #1.1: Type: text/plain, Size: 745 bytes --]

On Mon, Aug 07, 2017 at 10:28:30AM -0500, Pierre-Louis Bossart wrote:
> On 8/7/17 10:07 AM, Mark Brown wrote:

> > Are you sure that this is the assignment that should be deleted, and if
> > so why?  Note that it's both conditionally and unconditionally assigned
> > later on...  Some words in the commit log about why this copy is removed
> > would be helpful.

> Thanks for the report. Yes, the logic escapes me as well, there were two
> separate changes from Liam and Richard Fitzgerald and I can't figure out why
> the reassignments of the variable new_name are required.

I've got a feeling it was people not working and testing against
mainline independently trying to fix similar issues and ending up
colliding when things went upstream.

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



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

* Re: [PATCH] ASoC: compress: Remove duplicated code
  2017-08-07 15:42       ` Mark Brown
@ 2017-08-07 15:59         ` Liam Girdwood
  2017-08-07 16:33           ` Donglin Peng
  0 siblings, 1 reply; 8+ messages in thread
From: Liam Girdwood @ 2017-08-07 15:59 UTC (permalink / raw)
  To: Mark Brown
  Cc: alsa-devel, Richard Fitzgerald, Pierre-Louis Bossart,
	Donglin Peng

On Mon, 2017-08-07 at 16:42 +0100, Mark Brown wrote:
> On Mon, Aug 07, 2017 at 10:28:30AM -0500, Pierre-Louis Bossart wrote:
> > On 8/7/17 10:07 AM, Mark Brown wrote:
> 
> > > Are you sure that this is the assignment that should be deleted, and if
> > > so why?  Note that it's both conditionally and unconditionally assigned
> > > later on...  Some words in the commit log about why this copy is removed
> > > would be helpful.
> 
> > Thanks for the report. Yes, the logic escapes me as well, there were two
> > separate changes from Liam and Richard Fitzgerald and I can't figure out why
> > the reassignments of the variable new_name are required.
> 
> I've got a feeling it was people not working and testing against
> mainline independently trying to fix similar issues and ending up
> colliding when things went upstream.

Yeah, probably Richard and I working on something similar in the past. 

Liam

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

* Re: [PATCH] ASoC: compress: Remove duplicated code
  2017-08-07 15:59         ` Liam Girdwood
@ 2017-08-07 16:33           ` Donglin Peng
  0 siblings, 0 replies; 8+ messages in thread
From: Donglin Peng @ 2017-08-07 16:33 UTC (permalink / raw)
  To: broonie
  Cc: liam.r.girdwood, alsa-devel@alsa-project.org, Richard Fitzgerald,
	Pierre-Louis Bossart

ok, I need to think twice.

On Monday, August 7, 2017, Liam Girdwood <liam.r.girdwood@linux.intel.com>
wrote:

> On Mon, 2017-08-07 at 16:42 +0100, Mark Brown wrote:
> > On Mon, Aug 07, 2017 at 10:28:30AM -0500, Pierre-Louis Bossart wrote:
> > > On 8/7/17 10:07 AM, Mark Brown wrote:
> >
> > > > Are you sure that this is the assignment that should be deleted, and
> if
> > > > so why?  Note that it's both conditionally and unconditionally
> assigned
> > > > later on...  Some words in the commit log about why this copy is
> removed
> > > > would be helpful.
> >
> > > Thanks for the report. Yes, the logic escapes me as well, there were
> two
> > > separate changes from Liam and Richard Fitzgerald and I can't figure
> out why
> > > the reassignments of the variable new_name are required.
> >
> > I've got a feeling it was people not working and testing against
> > mainline independently trying to fix similar issues and ending up
> > colliding when things went upstream.
>
> Yeah, probably Richard and I working on something similar in the past.
>
> Liam
>
>

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

end of thread, other threads:[~2017-08-07 16:33 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1502111504-7996-1-git-send-email-pengdonglin137@163.com>
2017-08-07 13:18 ` [PATCH] ASoC: compress: Remove duplicated code Donglin Peng
2017-08-07 15:07   ` Mark Brown
2017-08-07 15:07     ` Mark Brown
2017-08-07 15:28     ` Pierre-Louis Bossart
2017-08-07 15:42       ` Mark Brown
2017-08-07 15:59         ` Liam Girdwood
2017-08-07 16:33           ` Donglin Peng
2017-08-07 12:56 Peng Donglin

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.