From patchwork Thu Sep 20 17:35:23 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 147112 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp2279376ljw; Thu, 20 Sep 2018 10:35:35 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZOfdo7oWHTiTq+XOGefYAAtfZHjwxJOA+rmcajm6X5+/olIOuywu/7CzjuSf7Q/Eg7dZfc X-Received: by 2002:a1c:1d0:: with SMTP id 199-v6mr3825769wmb.2.1537464935882; Thu, 20 Sep 2018 10:35:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537464935; cv=none; d=google.com; s=arc-20160816; b=gdM9HMeVw7MztN/jU6r0RHlddOSUEE0mS92SRhrzIqzWAOQBW8LDsbwY1NI89HV8+B AIGy9DKzTDeYxJ/im2maopScKC4c9U+2yjyQ/fnIYNeVAc7MjI7ofrzy0tsZgNmBEoy9 niElWh84V+p8tvetyuuE73j5VfEpFBEB/BLf4xV95yZ/7qNxcIjqbF0TfkkA8cfPjpZ6 S2BGXC8Gk7ISULcmanzgfaoD/e8S5k8kAOlVfynq++3IkAYRDtGnZyRi6i8OHxw351We WCoaSP85YXPcqGZD3JVTKZYk/tlfHrjydYeM1LKs8R6bY1/fqv35cK863WrYZsfV7mmf MuzA== 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; bh=VnUvyAtez7diIO8miK5JdWmrtXkcEw2NpV7DDmFlqBw=; b=JXwgUgOUL09EXOkctyc0gY40AaLKTzRn451nTx46Ptzr/OSaI9+MxScFdaAdf8o1wF CFlihniIJN4H88X9ssN/TwtAb5zJf6dJlLCGNL77JYMMPrPvRsenw7KlAt70fKDZplC6 A8eTNXOi/ymURndmSPCnCQZkZ7KuN6rwEtRFo8kXE6cgcClpLZThSENgujVtq9OubvFw C8cw4oiA1A0ihPPxRkQCKWpu3fuxE65g0/9ES6QdhRLGv3GTHHZSxxzMOWjXQqjN22ke jM7aG72Pskr4hLHwZuXwoFjIqil0P6aqJdADhuViZ0FiQ+eSwJ97el/P0oFeJqcIE0kC pyIQ== 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=Uu4m2PMb; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from alsa0.perex.cz (alsa0.perex.cz. [77.48.224.243]) by mx.google.com with ESMTP id 74-v6si3160358wmo.86.2018.09.20.10.35.35; Thu, 20 Sep 2018 10:35:35 -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=Uu4m2PMb; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 29FD92678AF; Thu, 20 Sep 2018 19:35:31 +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 4579E2678AB; Thu, 20 Sep 2018 19:35:28 +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.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE, 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 7875726789F for ; Thu, 20 Sep 2018 19:35:26 +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=6kjGnSqVNNqEw8GLeyol8g8pEY7vOjh6z43p1s8A4Ao=; b=Uu4m2PMbkVtb 1rGMIOuU2rYdFkfkJWH37UUENmEJ6NcXyShFLL1Qh2Pa2Xl+GpdLEe2IGKjowr10ceAJomAVVzvEZ RnSkM1/ro5YnLrEHBGCzVrVe+XPk78AndKZIr8uL1pR6MQ6rqrUyB75qSMvSMFDYmZd24TOOM2hTE 9edYw=; Received: from [209.121.128.187] (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 1g32rO-0007Dm-4F; Thu, 20 Sep 2018 17:35:26 +0000 Received: by finisterre.ee.mobilebroadband (Postfix, from userid 1000) id EEC41440078; Thu, 20 Sep 2018 18:35:23 +0100 (BST) From: Mark Brown To: Kuninori Morimoto In-Reply-To: <87musfppig.wl-kuninori.morimoto.gx@renesas.com> Message-Id: <20180920173523.EEC41440078@finisterre.ee.mobilebroadband> Date: Thu, 20 Sep 2018 18:35:23 +0100 (BST) Cc: alsa-devel@alsa-project.org, Mark Brown Subject: [alsa-devel] Applied "ASoC: add for_each_dpcm_fe() macro" 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: add for_each_dpcm_fe() macro has been applied to the asoc tree at https://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 d2e24d64652bf9d272e5496ae8a562bc64facff3 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Tue, 18 Sep 2018 01:30:54 +0000 Subject: [PATCH] ASoC: add for_each_dpcm_fe() macro To be more readable code, this patch adds new for_each_dpcm_fe() macro, and replace existing code to it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- include/sound/soc-dpcm.h | 3 +++ sound/soc/soc-pcm.c | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) -- 2.19.0 _______________________________________________ Alsa-devel mailing list Alsa-devel@alsa-project.org http://mailman.alsa-project.org/mailman/listinfo/alsa-devel diff --git a/include/sound/soc-dpcm.h b/include/sound/soc-dpcm.h index 9bb92f187af8..f130de6cfe8e 100644 --- a/include/sound/soc-dpcm.h +++ b/include/sound/soc-dpcm.h @@ -103,6 +103,9 @@ struct snd_soc_dpcm_runtime { int trigger_pending; /* trigger cmd + 1 if pending, 0 if not */ }; +#define for_each_dpcm_fe(be, stream, dpcm) \ + list_for_each_entry(dpcm, &(be)->dpcm[stream].fe_clients, list_fe) + /* can this BE stop and free */ int snd_soc_dpcm_can_be_free_stop(struct snd_soc_pcm_runtime *fe, struct snd_soc_pcm_runtime *be, int stream); diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c index 09d0f668c78e..e7916630e6fa 100644 --- a/sound/soc/soc-pcm.c +++ b/sound/soc/soc-pcm.c @@ -1252,7 +1252,7 @@ static void dpcm_be_reparent(struct snd_soc_pcm_runtime *fe, be_substream = snd_soc_dpcm_get_substream(be, stream); - list_for_each_entry(dpcm, &be->dpcm[stream].fe_clients, list_fe) { + for_each_dpcm_fe(be, stream, dpcm) { if (dpcm->fe == fe) continue; @@ -3219,7 +3219,7 @@ int snd_soc_dpcm_can_be_free_stop(struct snd_soc_pcm_runtime *fe, struct snd_soc_dpcm *dpcm; int state; - list_for_each_entry(dpcm, &be->dpcm[stream].fe_clients, list_fe) { + for_each_dpcm_fe(be, stream, dpcm) { if (dpcm->fe == fe) continue; @@ -3246,7 +3246,7 @@ int snd_soc_dpcm_can_be_params(struct snd_soc_pcm_runtime *fe, struct snd_soc_dpcm *dpcm; int state; - list_for_each_entry(dpcm, &be->dpcm[stream].fe_clients, list_fe) { + for_each_dpcm_fe(be, stream, dpcm) { if (dpcm->fe == fe) continue;