From patchwork Tue Sep 20 14:54:04 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 607670 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id B78EFECAAD8 for ; Tue, 20 Sep 2022 14:55:46 +0000 (UTC) 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 7F9D5AE9; Tue, 20 Sep 2022 16:54:54 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 7F9D5AE9 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1663685744; bh=ykfevg6ZoeMe+Ap6zzqFsfAcliUoOMeREUFDKueKetU=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=tqciKv4o67fCWp+nq/We4i9EcYjZJh58eTzXzmxGCQcAePGbweCaYLKDU5l7H/pJN X3tsM5gPvI/mv6KmET6RQYNswL0wT2ue7TrPAmphaoWnVwdD1O0LCiUVlEY1RmG2FZ O0Tkomqow4BBu+sP5nluSggh9ldJABVWPkqNUaZE= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 07282F80155; Tue, 20 Sep 2022 16:54:32 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 49FDDF804DA; Tue, 20 Sep 2022 16:54:31 +0200 (CEST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) (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 A42F0F800C9 for ; Tue, 20 Sep 2022 16:54:24 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz A42F0F800C9 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="nKdhp4hf" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1663685665; x=1695221665; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=ykfevg6ZoeMe+Ap6zzqFsfAcliUoOMeREUFDKueKetU=; b=nKdhp4hfsgsNZLXg1MiYpBU5jVzhKW7tZ+kQYenTPX0NegzSXy598Bil ssDErrqeCsusOMo1NzBGrzCCMSt3DY702d+m1/Nek9oSabS2T1/ZqYwM6 dNnnnFuEUYkrTKpE+JD0ksFcA4gpeOr2KSMUfs5RQxgmR43b/82zsBbJv Cewj87H74LdLbDCtiR5vQadOJCnhA/Hh3dhOUBdxHbl8MaezRFsyiepCo a706+T2m9omJtXI/U+lEO7S2H2sxr9tUfumSmjYxHRcBrZbc5lHSgfOhy mMiKXgCqW64K4fVh6bP37Qr4nDCgyJe1Moj5eLbffMkIr/IyPr9CxxvpI w==; X-IronPort-AV: E=McAfee;i="6500,9779,10476"; a="301095348" X-IronPort-AV: E=Sophos;i="5.93,330,1654585200"; d="scan'208";a="301095348" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Sep 2022 07:54:20 -0700 X-IronPort-AV: E=Sophos;i="5.93,330,1654585200"; d="scan'208";a="681341668" Received: from atcamara-mobl1.amr.corp.intel.com (HELO pbossart-mobl3.intel.com) ([10.251.209.87]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Sep 2022 07:54:18 -0700 From: Pierre-Louis Bossart To: alsa-devel@alsa-project.org Subject: [PATCH 1/2] ASoC: SOF: ipc4-topology: clarify calculation precedence Date: Tue, 20 Sep 2022 16:54:04 +0200 Message-Id: <20220920145405.2089147-2-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220920145405.2089147-1-pierre-louis.bossart@linux.intel.com> References: <20220920145405.2089147-1-pierre-louis.bossart@linux.intel.com> MIME-Version: 1.0 Cc: tiwai@suse.de, Pierre-Louis Bossart , Ranjani Sridharan , broonie@kernel.org, Chao Song , Bard Liao 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" cppcheck warning: sound/soc/sof/ipc4-topology.c:334:64: style: Clarify calculation precedence for '&' and '?'. [clarifyCalculation] type = fw_module->man4_module_entry.type & SOF_IPC4_MODULE_DP ? 1 : 0; ^ Signed-off-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Chao Song Reviewed-by: Bard Liao --- sound/soc/sof/ipc4-topology.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/sof/ipc4-topology.c b/sound/soc/sof/ipc4-topology.c index 64929dc9af397..1503e3c49e703 100644 --- a/sound/soc/sof/ipc4-topology.c +++ b/sound/soc/sof/ipc4-topology.c @@ -331,7 +331,7 @@ static int sof_ipc4_widget_setup_msg(struct snd_sof_widget *swidget, struct sof_ msg->extension = SOF_IPC4_MOD_EXT_PPL_ID(swidget->pipeline_id); msg->extension |= SOF_IPC4_MOD_EXT_CORE_ID(swidget->core); - type = fw_module->man4_module_entry.type & SOF_IPC4_MODULE_DP ? 1 : 0; + type = (fw_module->man4_module_entry.type & SOF_IPC4_MODULE_DP) ? 1 : 0; msg->extension |= SOF_IPC4_MOD_EXT_DOMAIN(type); return 0; From patchwork Tue Sep 20 14:54:05 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 607978 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 75AD1ECAAD8 for ; Tue, 20 Sep 2022 14:56:10 +0000 (UTC) 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 5A77B886; Tue, 20 Sep 2022 16:55:18 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 5A77B886 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1663685768; bh=9AUoeTqsJviu/QSHqj+2Oqy2yXJl7d1Bf3gDhwbkIco=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=kqKaWGQt4BTMyQJAqby+ZytUWza+BWhsdRmhbfG0uwek4RnKJAWyKGeqwpgWsoqSc KsVD/chUFvVUAyDXPhwmsQLj/EPTUpOm1KAwn6FJa2FTeU9UOYou/okGqzdt7S4JEK jIcDC9KA57tnY4C8osXOneWXLin9JuY5iL9ndCf8= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 777A6F80538; Tue, 20 Sep 2022 16:54:33 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 634EFF80155; Tue, 20 Sep 2022 16:54:32 +0200 (CEST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) (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 A9730F80153 for ; Tue, 20 Sep 2022 16:54:25 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz A9730F80153 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="TDNP74KE" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1663685666; x=1695221666; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=9AUoeTqsJviu/QSHqj+2Oqy2yXJl7d1Bf3gDhwbkIco=; b=TDNP74KE+SiLjJRqAOFK6s0xnPEC5KeaPsNgN9821k1/kTczCEDTszf/ TUyLjhHgdp+ZiCqojfVmAQ//SfYLrRfnmmHNIU57m02LewWIIqDdLI/lc BRZnrMACg7nk7enV/yc7E+tARsP2CtEGJTn4SridghesEkSTV+nTlv5q6 i3gvEWzxef0UtT4p56GmecrVrP7zxxQWhqV2LYxqDhuC+GzCiH6Jby8U3 nWtc6BnRpZfK1nUD2A+3dj2zaEP//7bQDdb7eIhIBdlGvL+8qKghDvof8 zhoUEisK5zDml8Oyy3KgcHKOR2RRJnH7onPfVInke8uYeqx9jgDPb+mHr g==; X-IronPort-AV: E=McAfee;i="6500,9779,10476"; a="301095356" X-IronPort-AV: E=Sophos;i="5.93,330,1654585200"; d="scan'208";a="301095356" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Sep 2022 07:54:23 -0700 X-IronPort-AV: E=Sophos;i="5.93,330,1654585200"; d="scan'208";a="681341675" Received: from atcamara-mobl1.amr.corp.intel.com (HELO pbossart-mobl3.intel.com) ([10.251.209.87]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Sep 2022 07:54:20 -0700 From: Pierre-Louis Bossart To: alsa-devel@alsa-project.org Subject: [PATCH 2/2] ASoC: SOF: ipc4-topology: remove useless assignment Date: Tue, 20 Sep 2022 16:54:05 +0200 Message-Id: <20220920145405.2089147-3-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220920145405.2089147-1-pierre-louis.bossart@linux.intel.com> References: <20220920145405.2089147-1-pierre-louis.bossart@linux.intel.com> MIME-Version: 1.0 Cc: tiwai@suse.de, Pierre-Louis Bossart , Ranjani Sridharan , broonie@kernel.org, Chao Song , Bard Liao 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" cppcheck warning: sound/soc/sof/ipc4-topology.c:1533:12: style: Variable 'pipeline' is assigned a value that is never used. [unreadVariable] pipeline = pipe_widget->private; ^ Signed-off-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Chao Song Reviewed-by: Bard Liao --- sound/soc/sof/ipc4-topology.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sound/soc/sof/ipc4-topology.c b/sound/soc/sof/ipc4-topology.c index 1503e3c49e703..66bbe101680cf 100644 --- a/sound/soc/sof/ipc4-topology.c +++ b/sound/soc/sof/ipc4-topology.c @@ -1447,7 +1447,6 @@ static int sof_ipc4_control_setup(struct snd_sof_dev *sdev, struct snd_sof_contr static int sof_ipc4_widget_setup(struct snd_sof_dev *sdev, struct snd_sof_widget *swidget) { - struct snd_sof_widget *pipe_widget = swidget->pipe_widget; struct sof_ipc4_pipeline *pipeline; struct sof_ipc4_msg *msg; void *ipc_data = NULL; @@ -1530,7 +1529,7 @@ static int sof_ipc4_widget_setup(struct snd_sof_dev *sdev, struct snd_sof_widget swidget->widget->name); return ret; } - pipeline = pipe_widget->private; + msg->primary &= ~SOF_IPC4_MOD_INSTANCE_MASK; msg->primary |= SOF_IPC4_MOD_INSTANCE(swidget->instance_id);