From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.3 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 385BBC10F25 for ; Mon, 9 Mar 2020 22:08:51 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id BB91324654 for ; Mon, 9 Mar 2020 22:08:50 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="p54LPCaH" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BB91324654 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 20EDC167A; Mon, 9 Mar 2020 23:07:59 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 20EDC167A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1583791729; bh=ZdJ+2zSaho0JndyLjkoXUQHFJgKSKi95GSINzDqmFI0=; h=Subject:To:References:From:Date:In-Reply-To:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=p54LPCaHgwjzKLnrWAGswOVPM3LhZzXEsrkv703kFZ64HUemLzJqshWs3B7OnrNgs BiKstzitVpcfEPBYUDnswLE+OliAaAFQdvo9Vzb5rwq76o0QmqsuHbEFqDd91r29rj uT2PSuJ+3abMX+JhzH6JAdxBKaXYde7ImT/1uj7U= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 9928DF8028E; Mon, 9 Mar 2020 23:06:24 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 8916BF80260; Mon, 9 Mar 2020 23:06:17 +0100 (CET) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 351F2F801A3; Mon, 9 Mar 2020 23:06:10 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 351F2F801A3 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 Mar 2020 15:06:06 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,534,1574150400"; d="scan'208";a="388711044" Received: from bnkannan-mobl.amr.corp.intel.com (HELO [10.254.6.234]) ([10.254.6.234]) by orsmga004.jf.intel.com with ESMTP; 09 Mar 2020 15:06:05 -0700 Subject: Re: [PATCH 1/3] ASoC: (cosmetic) simplify dpcm_prune_paths() To: Guennadi Liakhovetski , alsa-devel@alsa-project.org References: <20200309170749.32313-1-guennadi.liakhovetski@linux.intel.com> <20200309170749.32313-2-guennadi.liakhovetski@linux.intel.com> From: Pierre-Louis Bossart Message-ID: <0a514b46-171c-78e7-aaa9-8f20b38e433a@linux.intel.com> Date: Mon, 9 Mar 2020 16:37:26 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 In-Reply-To: <20200309170749.32313-2-guennadi.liakhovetski@linux.intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Cc: Liam Girdwood , Takashi Iwai , Mark Brown , sound-open-firmware@alsa-project.org X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 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: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" On 3/9/20 12:07 PM, Guennadi Liakhovetski wrote: > Currently dpcm_prune_paths() has up to 4 nested condition and loop > levels, which forces the code to use flags for flow control. > Extracting widget status verification code from dpcm_prune_paths() > into a separate function simplifies the code. > > Signed-off-by: Guennadi Liakhovetski The diff format makes it hard to review, but with --patience it looks fine indeed and a nice code refactoring. Minor comment below: > + /* is there a valid CPU DAI widget for this BE */ > + for_each_rtd_cpu_dai(dpcm->be, i, dai) { this will conflict with Morimoto-san's cleanup step6 shared today. > + /* is there a valid CODEC DAI widget for this BE */ > + for_each_rtd_codec_dai(dpcm->be, i, dai) { and this as well, will be _dais, not _dai.