From patchwork Tue Apr 2 14:59:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 785149 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 B8015C6FD1F for ; Tue, 2 Apr 2024 15:01:36 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 1E77E2C3A; Tue, 2 Apr 2024 17:01:25 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 1E77E2C3A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1712070095; bh=Z+Ybbt9Fy1SY0EwppncHnxJ8noudvlaEyZRsTHXtmrc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=q3NhLryAyWAQ/OewbRDna66GafswpTIF+clzln6tEJtkAn3p1bwDdyOXbCHPpQKxI wDVPJLWuoeiQ2ahsPBomchJDs+h0qh/N1yhxZKg+tcdKa1eJeDtqY0lHX1E4xOdL2P F0c4L//y2V7I983ldwkp5YGqRhnxxc2pLQ1FlsdI= Received: by alsa1.perex.cz (Postfix, from userid 50401) id EF77BF805D2; Tue, 2 Apr 2024 17:00:33 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 52B13F805BB; Tue, 2 Apr 2024 17:00:33 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 06316F805B2; Tue, 2 Apr 2024 17:00:29 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.15]) (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 6AE8DF8016E for ; Tue, 2 Apr 2024 17:00:19 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 6AE8DF8016E Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=i6DsXFjT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1712070020; x=1743606020; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Z+Ybbt9Fy1SY0EwppncHnxJ8noudvlaEyZRsTHXtmrc=; b=i6DsXFjT+oA02RuCzLqCXf+wFrjW0kGjuNni83bhUzYhI049xzxKLHHn YBbpBnSmncSl88vcTlULEEsRG7+lKpCOwROf/+pcYjnLMLyqNMwMUaePL QHLSKC0g2eRfttxu2CnVMxZ6grmOUDjEcyya5FfoPRx9/2X9sf1ffVv+3 FdVEsV2IxjMS9sgrmkVifm8944Hh/I6wkHioFiYoT86CrpAVaP6mfTtOv sAdaALoy+Se4tJZlO/91R7LCHkibIVhJ34OWumzzvhBT4IvsRRFj0Jeg5 Si7KMF06Cn1DutF2lKqiyDqJJi07RHFAAzqr/jGLHT02q77vxYzGfBCus w==; X-CSE-ConnectionGUID: zaCcvi8zTpWSOH+kZ4ND4w== X-CSE-MsgGUID: Q4SnmtOBSjq7Q3Dh4YkW9Q== X-IronPort-AV: E=McAfee;i="6600,9927,11032"; a="7433822" X-IronPort-AV: E=Sophos;i="6.07,175,1708416000"; d="scan'208";a="7433822" Received: from fmviesa003.fm.intel.com ([10.60.135.143]) by fmvoesa109.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Apr 2024 08:00:12 -0700 X-CSE-ConnectionGUID: TvxuCwT4SmegYy/4R03HAg== X-CSE-MsgGUID: A4QkwMyIS4q/i3CB+PNzew== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,175,1708416000"; d="scan'208";a="22558027" Received: from skhare-mobl5.amr.corp.intel.com (HELO pbossart-mobl6.intel.com) ([10.212.8.83]) by fmviesa003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Apr 2024 08:00:12 -0700 From: Pierre-Louis Bossart To: linux-sound@vger.kernel.org Cc: alsa-devel@alsa-project.org, tiwai@suse.de, broonie@kernel.org, Yong Zhi , Ranjani Sridharan , Bard Liao , Pierre-Louis Bossart Subject: [PATCH 1/4] ASoC: SOF: ipc4-loader: save FW version info to debugfs Date: Tue, 2 Apr 2024 09:59:56 -0500 Message-Id: <20240402145959.172619-2-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240402145959.172619-1-pierre-louis.bossart@linux.intel.com> References: <20240402145959.172619-1-pierre-louis.bossart@linux.intel.com> MIME-Version: 1.0 Message-ID-Hash: U5TUKLDF65Y4YM44Y4ALPD2RVQRZLO3N X-Message-ID-Hash: U5TUKLDF65Y4YM44Y4ALPD2RVQRZLO3N X-MailFrom: pierre-louis.bossart@linux.intel.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.9 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: <> List-Archive: <> List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Yong Zhi To check loaded FW version: $ hexdump -C /sys/kernel/debug/sof/fw_version 00000000 02 00 07 00 63 00 01 00 00 00 00 00 00 00 00 00 |....c...........| Reviewed-by: Ranjani Sridharan Reviewed-by: Bard Liao Signed-off-by: Yong Zhi Signed-off-by: Pierre-Louis Bossart --- sound/soc/sof/ipc4-loader.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sound/soc/sof/ipc4-loader.c b/sound/soc/sof/ipc4-loader.c index c79479afa8d0..641c4f24cca9 100644 --- a/sound/soc/sof/ipc4-loader.c +++ b/sound/soc/sof/ipc4-loader.c @@ -80,6 +80,14 @@ static ssize_t sof_ipc4_fw_parse_ext_man(struct snd_sof_dev *sdev, dev_dbg(sdev->dev, "Header length: %u, module count: %u\n", fw_header->len, fw_header->num_module_entries); + /* copy the fw_version of basefw into debugfs at first boot */ + if (fw == sdev->basefw.fw) { + sdev->fw_version.major = fw_header->major_version; + sdev->fw_version.minor = fw_header->minor_version; + sdev->fw_version.micro = fw_header->hotfix_version; + sdev->fw_version.build = fw_header->build_version; + } + fw_lib->modules = devm_kmalloc_array(sdev->dev, fw_header->num_module_entries, sizeof(*fw_module), GFP_KERNEL); if (!fw_lib->modules) From patchwork Tue Apr 2 14:59:57 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 785900 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 641B1CD1284 for ; Tue, 2 Apr 2024 15:01:25 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 763B12C08; Tue, 2 Apr 2024 17:01:12 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 763B12C08 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1712070082; bh=KEiSZsipQm/e3f21LS8Ya39Ul+7YeHp7MqC0Uee8uzY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=m8V0v0w/rbf79cUxt3XOTIihkcS6+H+PRuy0q0XfS60tkqouj1RSyfHslvmDNYKOY BDPlRW3DkilllBrr+x5wXx39DD/uGhfTPA+6N1xjQaVPasmK81NQRRkHn4SF2vP9de CjEyeQmKu4KlNhoUTnEyi98CetsQVwo92+zehoY0= Received: by alsa1.perex.cz (Postfix, from userid 50401) id B8094F805B5; Tue, 2 Apr 2024 17:00:32 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 68691F80580; Tue, 2 Apr 2024 17:00:31 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 1EA9DF8055C; Tue, 2 Apr 2024 17:00:26 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.15]) (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 1B1CAF80114 for ; Tue, 2 Apr 2024 17:00:20 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 1B1CAF80114 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=J8Hg1yo5 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1712070021; x=1743606021; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=KEiSZsipQm/e3f21LS8Ya39Ul+7YeHp7MqC0Uee8uzY=; b=J8Hg1yo5MXcZNO8lzOgqZ1rLBmpPmk6uH2korh+cjEer9zpL3j9eYGNn e6aviJKus/OKlRl3B9ra6M6EcTYMN25TFwk+NJ2z4YYRhzHZcDVVq24XC g90gfyDIadtm+GSrq6BYY+cgid9LXmMCO0Vp/8A0NUQFm0+peKWRiiLbA 2UuUzvz2O53T5RJ6TfDd51jUAHXzbUBnv4ht9544fJSRCUZSKQnkyF5d9 gMzXEwzSqXB4O6VmmXWaEnaziIKx3H1+BkZfU1tHhSfE+iNYGOa8sF1xD iHkX7Qn5w35kGH/XiUZk0hYbD716pVfxxWJjyo4BdgO7LeV6XIOrMFGDY Q==; X-CSE-ConnectionGUID: 9SQgLNFSS7GWRDjvmhnKUw== X-CSE-MsgGUID: bqg6Np27SdO5Fr7DFXtvSQ== X-IronPort-AV: E=McAfee;i="6600,9927,11032"; a="7433826" X-IronPort-AV: E=Sophos;i="6.07,175,1708416000"; d="scan'208";a="7433826" Received: from fmviesa003.fm.intel.com ([10.60.135.143]) by fmvoesa109.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Apr 2024 08:00:12 -0700 X-CSE-ConnectionGUID: j7c6EjLCQ2G1F8K60/gzEg== X-CSE-MsgGUID: LyJ8yZEbR/ujCc/5/Oj1YQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,175,1708416000"; d="scan'208";a="22558028" Received: from skhare-mobl5.amr.corp.intel.com (HELO pbossart-mobl6.intel.com) ([10.212.8.83]) by fmviesa003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Apr 2024 08:00:13 -0700 From: Pierre-Louis Bossart To: linux-sound@vger.kernel.org Cc: alsa-devel@alsa-project.org, tiwai@suse.de, broonie@kernel.org, Pierre-Louis Bossart , Bard Liao Subject: [PATCH 2/4] ASoC: SOF: amd: acp-loader: abort firmware download on write error Date: Tue, 2 Apr 2024 09:59:57 -0500 Message-Id: <20240402145959.172619-3-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240402145959.172619-1-pierre-louis.bossart@linux.intel.com> References: <20240402145959.172619-1-pierre-louis.bossart@linux.intel.com> MIME-Version: 1.0 Message-ID-Hash: 4I2AMLVMK23C4NAHPQPG23UMK4OBSXQQ X-Message-ID-Hash: 4I2AMLVMK23C4NAHPQPG23UMK4OBSXQQ X-MailFrom: pierre-louis.bossart@linux.intel.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.9 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: cppcheck reports this issue: sound/soc/sof/amd/acp-loader.c:299:6: style: Variable 'ret' is reassigned a value before the old one has been used. [redundantAssignment] ret = request_firmware(&adata->fw_dbin, fw_filename, sdev->dev); ^ sound/soc/sof/amd/acp-loader.c:289:6: note: ret is assigned ret = snd_sof_dsp_block_write(sdev, SOF_FW_BLK_TYPE_IRAM, 0, ^ sound/soc/sof/amd/acp-loader.c:299:6: note: ret is overwritten ret = request_firmware(&adata->fw_dbin, fw_filename, sdev->dev); ^ This behavior is probably unintentional, there's no reason to return an error for the DRAM but not the IRAM. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Bard Liao --- sound/soc/sof/amd/acp-loader.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sound/soc/sof/amd/acp-loader.c b/sound/soc/sof/amd/acp-loader.c index aad904839b81..2d5e58846499 100644 --- a/sound/soc/sof/amd/acp-loader.c +++ b/sound/soc/sof/amd/acp-loader.c @@ -289,6 +289,8 @@ int acp_sof_load_signed_firmware(struct snd_sof_dev *sdev) ret = snd_sof_dsp_block_write(sdev, SOF_FW_BLK_TYPE_IRAM, 0, (void *)sdev->basefw.fw->data, sdev->basefw.fw->size); + if (ret < 0) + return ret; fw_filename = kasprintf(GFP_KERNEL, "%s/%s", plat_data->fw_filename_prefix, From patchwork Tue Apr 2 14:59:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 785899 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 D6F7CCD1284 for ; Tue, 2 Apr 2024 15:02:06 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id A498C2C34; Tue, 2 Apr 2024 17:01:54 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz A498C2C34 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1712070124; bh=7SUUzrMM9vVUTGjyOMCz5njlZv6H/FWKf1uf9PfnM48=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=Jn0uFS0SDGFUIVZY7rD8hpmuaUdKOPx7CkhTkPERkKVBP7j4pjGXTmCpmjTYSZ7jc X11KMEeXJTZyAGWm4ZOH6ZHx7zlvw6xT+YkpKWmwhk82W9yv0PblDTh6WgEN7T9nSj 6ydoHCSB/y4jWMObF/5WjUHv/tC0b00V2svOaxxw= Received: by alsa1.perex.cz (Postfix, from userid 50401) id EF507F80007; Tue, 2 Apr 2024 17:01:44 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 2B30DF8055C; Tue, 2 Apr 2024 17:01:44 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id CC855F80238; Tue, 2 Apr 2024 17:01:38 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.15]) (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 6B727F80236 for ; Tue, 2 Apr 2024 17:00:21 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 6B727F80236 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=EiPVIszm DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1712070022; x=1743606022; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=7SUUzrMM9vVUTGjyOMCz5njlZv6H/FWKf1uf9PfnM48=; b=EiPVIszmRhY8vQG77BkfMjocdt6s30AcfnBGaMhsffxPy7GLvrjcVO66 3VB06aMagY9mwtooBiQecHcEk4T2ZiaiCrt3aaIxSCZJhxXuDi31HkP5Y PqhtAqRiCphdY4XemhruczxcC+eUvQ4M/NK88nn8oZKmG6FWNRgk8w0uG f+4C0lmQIeNpFMb8Ddm7u/cPRuHalEX9uhc7BMzmnYw67ZVP8ti0sZ+MG uZhnTHgca26qMPpvJpVRAXg9QnZUv+8AE5MiZ1Bo3nTPoHX1Q/ky6pF/c lvvZPEm6Q1kRKgXxi8rvrxLvJiLYUs+4fPC8VxnMPmOE1kuRBZzxCe0lN A==; X-CSE-ConnectionGUID: d3TpK5muSYSFL0L+YWcUDQ== X-CSE-MsgGUID: e4x/tH4vTRaYVL267khYWA== X-IronPort-AV: E=McAfee;i="6600,9927,11032"; a="7433831" X-IronPort-AV: E=Sophos;i="6.07,175,1708416000"; d="scan'208";a="7433831" Received: from fmviesa003.fm.intel.com ([10.60.135.143]) by fmvoesa109.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Apr 2024 08:00:13 -0700 X-CSE-ConnectionGUID: 6QlY+RSbSYimAso6nlNcmQ== X-CSE-MsgGUID: KsKYp1ZhRAqBurZSVlwiDA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,175,1708416000"; d="scan'208";a="22558029" Received: from skhare-mobl5.amr.corp.intel.com (HELO pbossart-mobl6.intel.com) ([10.212.8.83]) by fmviesa003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Apr 2024 08:00:13 -0700 From: Pierre-Louis Bossart To: linux-sound@vger.kernel.org Cc: alsa-devel@alsa-project.org, tiwai@suse.de, broonie@kernel.org, Pierre-Louis Bossart , Bard Liao Subject: [PATCH 3/4] ASoC: SOF: ipc4-priv: align prototype and function declaration Date: Tue, 2 Apr 2024 09:59:58 -0500 Message-Id: <20240402145959.172619-4-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240402145959.172619-1-pierre-louis.bossart@linux.intel.com> References: <20240402145959.172619-1-pierre-louis.bossart@linux.intel.com> MIME-Version: 1.0 Message-ID-Hash: YDG7E2OZ33Q37WF7JLFF2UWZYWXOMNTC X-Message-ID-Hash: YDG7E2OZ33Q37WF7JLFF2UWZYWXOMNTC X-MailFrom: pierre-louis.bossart@linux.intel.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.9 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Somehow instance_id and id were mixed. Align on instance_id for consistency. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Bard Liao --- sound/soc/sof/ipc4-priv.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/sof/ipc4-priv.h b/sound/soc/sof/ipc4-priv.h index afed618a15f0..e157ab80a103 100644 --- a/sound/soc/sof/ipc4-priv.h +++ b/sound/soc/sof/ipc4-priv.h @@ -98,7 +98,7 @@ extern const struct sof_ipc_tplg_control_ops tplg_ipc4_control_ops; extern const struct sof_ipc_pcm_ops ipc4_pcm_ops; extern const struct sof_ipc_fw_tracing_ops ipc4_mtrace_ops; -int sof_ipc4_set_pipeline_state(struct snd_sof_dev *sdev, u32 id, u32 state); +int sof_ipc4_set_pipeline_state(struct snd_sof_dev *sdev, u32 instance_id, u32 state); int sof_ipc4_mtrace_update_pos(struct snd_sof_dev *sdev, int core); int sof_ipc4_query_fw_configuration(struct snd_sof_dev *sdev); From patchwork Tue Apr 2 14:59:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 785148 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 9EC2CC6FD1F for ; Tue, 2 Apr 2024 15:02:17 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id C74642C20; Tue, 2 Apr 2024 17:02:05 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz C74642C20 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1712070135; bh=XC/KIBuVWENi+nZcHSHtH5poqdXkQwX6utx5Af8jDo4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=phyQ5REs1LXChWZvGnVRBPxyPONepMhFMqkhF3W6RwWiE5kA4kmoBaLHkN6VpQkFT eiMT13vQcnGH10qjDzmLdX6Z7t5dflu2ZlFlOSw796TE9qtkQpVXI5BkmR6hAN0yA8 6/yLBgJBcqEQ8sLMJAkmlXJ6bhx0sElXEpke77bI= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 9782FF805BD; Tue, 2 Apr 2024 17:01:46 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id DBE64F805C8; Tue, 2 Apr 2024 17:01:45 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 2C655F8016E; Tue, 2 Apr 2024 17:01:41 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.15]) (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 07F9AF8020D for ; Tue, 2 Apr 2024 17:00:22 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 07F9AF8020D Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=VndpswXJ DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1712070023; x=1743606023; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=XC/KIBuVWENi+nZcHSHtH5poqdXkQwX6utx5Af8jDo4=; b=VndpswXJGxFyaZJlYnh548HuxDTo7WeJko2LAROkJh+Kf6MukjzY5E5L BDXqzA94SHOzhFW5P7dxK14qMCHb+6Q6Wc8jwRdtjEbmJfFzAbcwyI2SF qcVnvO7XYsOMrpbNriuVYPuy990JBA1UIoxVpI4zNYuEiFi6fy+9TyoIv 2mOy3IBG1b+AlKuQdjWbfl5X2dHoD7gNj7cWsVo8Ud5QzgxYTkbtThOio vhnBJFqqdLVgzRicLCMhRt4O64qdnUB5ONcah88pAyMhHN1xo2/e3/7hp khYvrnO3Xtxp1adouVNxH6sFW6fz/g6NaOmFViAOCe6NSqc/QexCyoizu Q==; X-CSE-ConnectionGUID: KlSojDX2TZSzqW/EIyVa5Q== X-CSE-MsgGUID: dVt8299cSGy9B0TPIk7LOA== X-IronPort-AV: E=McAfee;i="6600,9927,11032"; a="7433835" X-IronPort-AV: E=Sophos;i="6.07,175,1708416000"; d="scan'208";a="7433835" Received: from fmviesa003.fm.intel.com ([10.60.135.143]) by fmvoesa109.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Apr 2024 08:00:13 -0700 X-CSE-ConnectionGUID: 7E16P8RbQUSCSgoWUteSSw== X-CSE-MsgGUID: GOPdG6s1RlyM+OvXzqjG8g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,175,1708416000"; d="scan'208";a="22558031" Received: from skhare-mobl5.amr.corp.intel.com (HELO pbossart-mobl6.intel.com) ([10.212.8.83]) by fmviesa003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Apr 2024 08:00:14 -0700 From: Pierre-Louis Bossart To: linux-sound@vger.kernel.org Cc: alsa-devel@alsa-project.org, tiwai@suse.de, broonie@kernel.org, Pierre-Louis Bossart , Bard Liao Subject: [PATCH 4/4] ASoC: SOF: ipc4-topology: remove shadowed variable Date: Tue, 2 Apr 2024 09:59:59 -0500 Message-Id: <20240402145959.172619-5-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240402145959.172619-1-pierre-louis.bossart@linux.intel.com> References: <20240402145959.172619-1-pierre-louis.bossart@linux.intel.com> MIME-Version: 1.0 Message-ID-Hash: 2XPAXZISXEOAGZNFGYLYMDUZ2BNNKXX3 X-Message-ID-Hash: 2XPAXZISXEOAGZNFGYLYMDUZ2BNNKXX3 X-MailFrom: pierre-louis.bossart@linux.intel.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.9 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Cppcheck reports this: sound/soc/sof/ipc4-topology.c:569:23: style: Local variable 'sdev' shadows outer variable [shadowVariable] struct snd_sof_dev *sdev = snd_soc_component_get_drvdata(scomp); ^ sound/soc/sof/ipc4-topology.c:512:22: note: Shadowed declaration struct snd_sof_dev *sdev = snd_soc_component_get_drvdata(scomp); ^ sound/soc/sof/ipc4-topology.c:569:23: note: Shadow variable struct snd_sof_dev *sdev = snd_soc_component_get_drvdata(scomp); ^ Remove shadowed variable. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Bard Liao --- sound/soc/sof/ipc4-topology.c | 1 - 1 file changed, 1 deletion(-) diff --git a/sound/soc/sof/ipc4-topology.c b/sound/soc/sof/ipc4-topology.c index 5cca05842126..427f186ddc11 100644 --- a/sound/soc/sof/ipc4-topology.c +++ b/sound/soc/sof/ipc4-topology.c @@ -586,7 +586,6 @@ static int sof_ipc4_widget_setup_comp_dai(struct snd_sof_widget *swidget) switch (ipc4_copier->dai_type) { case SOF_DAI_INTEL_ALH: { - struct snd_sof_dev *sdev = snd_soc_component_get_drvdata(scomp); struct sof_ipc4_alh_configuration_blob *blob; struct snd_soc_dapm_path *p; struct snd_sof_widget *w;