From patchwork Wed Sep 20 11:42:09 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 113102 Delivered-To: patch@linaro.org Received: by 10.140.106.117 with SMTP id d108csp661289qgf; Wed, 20 Sep 2017 04:43:16 -0700 (PDT) X-Google-Smtp-Source: AOwi7QDsZu57Lev/4yV2LXng+1eF7q6BWmANT/f1JzGGjWZaeXCmSeocPG5Du70+L6jdr5Dw20GQ X-Received: by 10.28.128.19 with SMTP id b19mr3622588wmd.136.1505907796159; Wed, 20 Sep 2017 04:43:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1505907796; cv=none; d=google.com; s=arc-20160816; b=jBqiT5reODv1WtzO87crmuvlhJ4eCh1/Ol6EM0UK0hPdMyqRi6Ozf1dzFeKHoBoALo UWn0MsjcLS4+mb1nN51/jTDMeEEgblIPJooL0RtDc8QABeSwUfFbpc8/KBKHrQvLhe9m Hk2iJZFDeoL9oeKep0cIRrmfVcy0eu3xGmSCdE7xy7z4qagSD1Ag6RuCLvFV7RM4dZg2 kuhZQzABRYAU5Po6fxpnU9DpDQkXMY1hRAhAJgp8sstWLaI11pLowB+jnokTEc6x/3HJ xNtC0ZN49CKd28dCEH7SnlxzmU2eTp38kzX439SBr3Y1IdXpTmOmcnoUz3gZolrKH+Bd io/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:cc:date:message-id:in-reply-to:to:from :dkim-signature:delivered-to:arc-authentication-results; bh=6tSyHct7V+365+aO1ZbFx8zDI6myl41K4eaWscGBXhk=; b=Nq9D7VEvaPyIf+/m1VuB2JordLsPdyhcvpqgwlCcnjBtA2OYedgdSz+wHbY68EjEzY hGRyY1hFR00udV0Kwa6j1B8Buhod5q9IwUGXWLXrVfsrmuzQGa67ROlGX9yiSJVTYPvJ mUfjLk1Ztp8ut4JS2K+2kaiPLVe9yryTZqql2UYIZR/KEt2yjWOT5BjQMH4FK8GdC32L AjQ3TF33A2TmXutez/hVtzTbEGingfFNBBXdzCpYyo49uqY6I2c4TB3l4NGVF0Y5p6hd QfYhTsN8mCJ5I6JSzBTohc2cdC1lhjyoWOJYN5+g58ZF1vaHpAjPn8B9HkvazEp5AP7R X1Ww== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=Pq8A5mMo; spf=pass (google.com: domain of alsa-devel-bounces@alsa-project.org designates 77.48.224.243 as permitted sender) smtp.mailfrom=alsa-devel-bounces@alsa-project.org Return-Path: Received: from alsa0.perex.cz (alsa0.perex.cz. [77.48.224.243]) by mx.google.com with ESMTP id 36si1356709wrk.246.2017.09.20.04.43.15; Wed, 20 Sep 2017 04:43:16 -0700 (PDT) Received-SPF: pass (google.com: domain of alsa-devel-bounces@alsa-project.org designates 77.48.224.243 as permitted sender) client-ip=77.48.224.243; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=Pq8A5mMo; spf=pass (google.com: domain of alsa-devel-bounces@alsa-project.org designates 77.48.224.243 as permitted sender) smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id B136026751B; Wed, 20 Sep 2017 13:42:13 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id E562626751C; Wed, 20 Sep 2017 13:42:12 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail1.perex.cz X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, RP_MATCHES_RCVD, SPF_PASS autolearn=disabled version=3.4.0 Received: from heliosphere.sirena.org.uk (heliosphere.sirena.org.uk [172.104.155.198]) by alsa0.perex.cz (Postfix) with ESMTP id 9CAE3267506 for ; Wed, 20 Sep 2017 13:42:10 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sirena.org.uk; s=20170815-heliosphere; h=Date:Message-Id:In-Reply-To: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:References: List-Id:List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner: List-Archive; bh=vtKKBJ8/GjHxi4So19YCNItEDu5DLPBiZbZsTaeBUXs=; b=Pq8A5mMozFs5 BZXAi2SPplfUvlkn8BsnrteqSzIAF5rH3Pi7rh5hZDr9X1gN66FHsL3B49jpYVS6kMpCXN0NsGxiZ PJcPWguHjdIuMc1ZtUnwuYsXSmv2zNnG8foMXD3gHsIf92BLAA3RnWG5pKOFRXaGMS5WVLkKR3zwb IQx8c=; Received: from [2001:470:1f1d:6b5:7e7a:91ff:fede:4a45] (helo=finisterre.ee.mobilebroadband) by heliosphere.sirena.org.uk with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1dudOM-0003k6-A3; Wed, 20 Sep 2017 11:42:10 +0000 Received: by finisterre.ee.mobilebroadband (Postfix, from userid 1000) id E71AF4400D3; Wed, 20 Sep 2017 04:42:09 -0700 (PDT) From: Mark Brown To: anish kumar In-Reply-To: <20170826082938.35516-1-yesanishhere@gmail.com> Message-Id: <20170920114209.E71AF4400D3@finisterre.ee.mobilebroadband> Date: Wed, 20 Sep 2017 04:42:09 -0700 (PDT) Cc: alsa-devel@alsa-project.org, broonie@kernel.org, tiwai@suse.com, lgirdwood@gmail.com Subject: [alsa-devel] Applied "ASoC: dapm: Refactor the code in snd_soc_dapm_new_pcm" to the asoc tree X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org 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 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 Reviewed-by: Charles Keepax Signed-off-by: Mark Brown --- sound/soc/soc-dapm.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) -- 2.13.2 _______________________________________________ Alsa-devel mailing list Alsa-devel@alsa-project.org http://mailman.alsa-project.org/mailman/listinfo/alsa-devel 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++; }