alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* [patch 2/4] ASoC: dapm: Refactor the code in snd_soc_dapm_new_pcm
@ 2017-08-26  8:29 anish kumar
  2017-09-20 11:42 ` Applied "ASoC: dapm: Refactor the code in snd_soc_dapm_new_pcm" to the asoc tree Mark Brown
  0 siblings, 1 reply; 4+ messages in thread
From: anish kumar @ 2017-08-26  8:29 UTC (permalink / raw)
  To: broonie; +Cc: anish kumar, alsa-devel, tiwai, lgirdwood

refactor snd_soc_dapm_new_pcm to reduce the size of
this function to facilitate further refactoring.

Signed-off-by: anish kumar <yesanishhere@gmail.com>
---
 sound/soc/soc-dapm.c | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
index 6e10a9a..1687c8a 100644
--- a/sound/soc/soc-dapm.c
+++ b/sound/soc/soc-dapm.c
@@ -3821,19 +3821,15 @@ int snd_soc_dapm_new_pcm(struct snd_soc_card *card,
 				devm_kasprintf(card->dev, GFP_KERNEL,
 					       "Anonymous Configuration %d",
 					       count);
-			if (!w_param_text[count]) {
-				ret = -ENOMEM;
-				goto outfree_link_name;
-			}
 		} else {
 			w_param_text[count] = devm_kmemdup(card->dev,
 						config->stream_name,
 						strlen(config->stream_name) + 1,
 						GFP_KERNEL);
-			if (!w_param_text[count]) {
-				ret = -ENOMEM;
-				goto outfree_link_name;
-			}
+		}
+		if (!w_param_text[count]) {
+			ret = -ENOMEM;
+			goto outfree_link_name;
 		}
 		config++;
 	}
-- 
2.10.1 (Apple Git-78)

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

* [PATCH 2/4] ASoC: dapm: Refactor the code in snd_soc_dapm_new_pcm
@ 2017-09-15  5:02 anish kumar
  2017-09-19 12:32 ` Mark Brown
  0 siblings, 1 reply; 4+ messages in thread
From: anish kumar @ 2017-09-15  5:02 UTC (permalink / raw)
  To: broonie@kernel.org, Liam Girdwood, Linux-ALSA, perex, tiwai,
	Charles Keepax

From: anish kumar <yesanishhere@gmail.com>

refactor snd_soc_dapm_new_pcm to reduce the size of
this function to facilitate further refactoring.

Signed-off-by: anish kumar <yesanishhere@gmail.com>
---
 sound/soc/soc-dapm.c | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
index f51f613..d55cac6 100644
--- a/sound/soc/soc-dapm.c
+++ b/sound/soc/soc-dapm.c
@@ -3821,19 +3821,15 @@ int snd_soc_dapm_new_pcm(struct snd_soc_card *card,
                                devm_kasprintf(card->dev, GFP_KERNEL,
                                               "Anonymous Configuration %d",
                                               count);
-                       if (!w_param_text[count]) {
-                               ret = -ENOMEM;
-                               goto outfree_link_name;
-                       }
                } else {
                        w_param_text[count] = devm_kmemdup(card->dev,
                                                config->stream_name,
                                                strlen(config->stream_name) + 1,
                                                GFP_KERNEL);
-                       if (!w_param_text[count]) {
-                               ret = -ENOMEM;
-                               goto outfree_link_name;
-                       }
+               }
+               if (!w_param_text[count]) {
+                       ret = -ENOMEM;
+                       goto outfree_link_name;
                }
                config++;
        }
--
2.5.4 (Apple Git-61)

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

* Re: [PATCH 2/4] ASoC: dapm: Refactor the code in snd_soc_dapm_new_pcm
  2017-09-15  5:02 [PATCH 2/4] ASoC: dapm: Refactor the code in snd_soc_dapm_new_pcm anish kumar
@ 2017-09-19 12:32 ` Mark Brown
  0 siblings, 0 replies; 4+ messages in thread
From: Mark Brown @ 2017-09-19 12:32 UTC (permalink / raw)
  To: anish kumar; +Cc: Linux-ALSA, tiwai, Charles Keepax, Liam Girdwood


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

On Thu, Sep 14, 2017 at 10:02:40PM -0700, anish kumar wrote:
> From: anish kumar <yesanishhere@gmail.com>
> 
> refactor snd_soc_dapm_new_pcm to reduce the size of
> this function to facilitate further refactoring.

This doesn't apply against current code, please check and resend.

[-- 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] 4+ messages in thread

* Applied "ASoC: dapm: Refactor the code in snd_soc_dapm_new_pcm" to the asoc tree
  2017-08-26  8:29 [patch 2/4] ASoC: dapm: Refactor the code in snd_soc_dapm_new_pcm anish kumar
@ 2017-09-20 11:42 ` Mark Brown
  0 siblings, 0 replies; 4+ messages in thread
From: Mark Brown @ 2017-09-20 11:42 UTC (permalink / raw)
  To: anish kumar; +Cc: alsa-devel, broonie, tiwai, lgirdwood

The patch

   ASoC: dapm: Refactor the code in snd_soc_dapm_new_pcm

has been applied to the asoc tree at

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

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.  

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

>From 38b8e6f092fd71eee56a064487be335226b0a54d Mon Sep 17 00:00:00 2001
From: anish kumar <yesanishhere@gmail.com>
Date: Wed, 20 Sep 2017 01:28:34 -0700
Subject: [PATCH] ASoC: dapm: Refactor the code in snd_soc_dapm_new_pcm

refactor snd_soc_dapm_new_pcm to reduce the size of
this function to facilitate further refactoring.

Signed-off-by: anish kumar <yesanishhere@gmail.com>
Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/soc-dapm.c | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
index f51f61340f9c..d55cac655195 100644
--- a/sound/soc/soc-dapm.c
+++ b/sound/soc/soc-dapm.c
@@ -3821,19 +3821,15 @@ int snd_soc_dapm_new_pcm(struct snd_soc_card *card,
 				devm_kasprintf(card->dev, GFP_KERNEL,
 					       "Anonymous Configuration %d",
 					       count);
-			if (!w_param_text[count]) {
-				ret = -ENOMEM;
-				goto outfree_link_name;
-			}
 		} else {
 			w_param_text[count] = devm_kmemdup(card->dev,
 						config->stream_name,
 						strlen(config->stream_name) + 1,
 						GFP_KERNEL);
-			if (!w_param_text[count]) {
-				ret = -ENOMEM;
-				goto outfree_link_name;
-			}
+		}
+		if (!w_param_text[count]) {
+			ret = -ENOMEM;
+			goto outfree_link_name;
 		}
 		config++;
 	}
-- 
2.13.2

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

end of thread, other threads:[~2017-09-20 11:42 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-26  8:29 [patch 2/4] ASoC: dapm: Refactor the code in snd_soc_dapm_new_pcm anish kumar
2017-09-20 11:42 ` Applied "ASoC: dapm: Refactor the code in snd_soc_dapm_new_pcm" to the asoc tree Mark Brown
  -- strict thread matches above, loose matches on Subject: below --
2017-09-15  5:02 [PATCH 2/4] ASoC: dapm: Refactor the code in snd_soc_dapm_new_pcm anish kumar
2017-09-19 12:32 ` Mark Brown

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).