From patchwork Sun Apr 14 18:47:26 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13629214 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CB22713664B; Sun, 14 Apr 2024 18:47:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713120479; cv=none; b=RsmJoQMZfLyQ6l9rI7pi+wVVMHPgUcrNl5u44VBmM3a3t7BYPFOqxcGKJUv0g0nMItauSzgllfx1rv7xqrSJgE+fDl6CC/CnvrMfPLgM3xmNzKZ+oufEN8S9to6SP32odnhYbpQK/sy5M6wfyE25PUiLMizjwT1EMWoPXqHpIkc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713120479; c=relaxed/simple; bh=xmgaqXbLg3DeFTUiQoF4m+Ls2Yrq43+DOTaWCX8ZMKE=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=D2e/AQx6NR8wEfgDUe1b5BQpVRNJ3c/2jl/QTiX5IFogiwyWXA6g9GoPQ6hoAU7QncTZpWnQhzBjCYQJk/e7W4u4fhmwRHKlbNKNILjU4m+I6QmTtcRdh2SIyGd+SYKEN8RDzgAQSiS/i6o5pJHQHJQzLkQc9Sa0TbN2yzTOCDc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=BzkDFTUQ; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="BzkDFTUQ" Received: by smtp.kernel.org (Postfix) with ESMTPSA id B7878C4AF08; Sun, 14 Apr 2024 18:47:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1713120479; bh=xmgaqXbLg3DeFTUiQoF4m+Ls2Yrq43+DOTaWCX8ZMKE=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=BzkDFTUQxsljZAUIKewfboJWkThlb4pNhukaWaW8XHW9qECHI7KDf/NpjOl6XgEHS R2nas4NuLLnzHlqVruMOh393wYkJDN4VP+qRisHZbkidRWNrTNEFTeGGvVc+u7rhOT mhZ59/OvTelp9tXrfyqzUrL+XxNmQNaL8LuWg3xmS9Jgn53lKFNUhChTJdBL4nPLUt 1c83riQikffKxueMPKe1CLdhBwg9qKt0Ivm+yMZQGNPi7rWm1lugdqPzlG+PyYMo+A dXp4M6Y1iXmZr+Jx1a+PLdOI579kX4iSFcsOWs8SMJhak/tqYideWAaEtV1SBGH883 fhv5RoD3lyoYQ== From: Krzysztof Kozlowski Date: Sun, 14 Apr 2024 20:47:26 +0200 Subject: [PATCH 01/14] ASoC: SOF: debug: Constify local snd_sof_dsp_ops Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240414-n-const-ops-var-v1-1-8f53ee5d981c@kernel.org> References: <20240414-n-const-ops-var-v1-0-8f53ee5d981c@kernel.org> In-Reply-To: <20240414-n-const-ops-var-v1-0-8f53ee5d981c@kernel.org> To: Pierre-Louis Bossart , Liam Girdwood , Peter Ujfalusi , Bard Liao , Ranjani Sridharan , Daniel Baluta , Kai Vehmanen , Mark Brown , Jaroslav Kysela , Takashi Iwai , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Matthias Brugger , AngeloGioacchino Del Regno Cc: sound-open-firmware@alsa-project.org, linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, Krzysztof Kozlowski X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=784; i=krzk@kernel.org; h=from:subject:message-id; bh=xmgaqXbLg3DeFTUiQoF4m+Ls2Yrq43+DOTaWCX8ZMKE=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBmHCTFzPWZhyTxMEszRpvlQ0QKX4BQXB5xVIAH8 AJH3EdVyb+JAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZhwkxQAKCRDBN2bmhouD 14IdEACC/ThhaKlGNaics6QTPylF1r78OR3KQ/2urDY9mXFDh3t3WXvHbHI/JdjJZaPqmUsb7JY Sce6AQHbAN8aU7B6F9M1CRjqqlvd+CUG9AZ86jhsBKQEW4pkWf9H9bSXFbayb9KSKX+PjTp1OYN YCyQRroralceoFlT9rLPlVz0OrwYbSRcTte5mkyWQbutork3I+4CWpQjgdzVq6Df2Y/U+BxEJ9C OF96VFwTufA+LOTFaOKBE5F5E8dPB422xybwe5K60hwGWhjHlTtCfHaO/QiGqAZyuQR4K+wkwHv ptXKlPczgDZBeHm4kN5NLeorGCE61GyEXHzNUp3XkA3seVyOyUR4pNvMmxhVvFuNYqs8215Y9HL 4xO0+VKbmLAXjuGRBk7zO/88SCDso1fKgUnb5Q/QauJKX0lXEur4HY2K2AXSOut8L+C9NGW/16N On/xCkLjB854sOoN0CwzYzYWC5xLmkhmQr7c7gOl2DuEqpSbeCIXH9b8Y5FVY2WUbLTnDCcaCHt eM8hcIKaJ0hQzbbixSVgetepb0djr8J7vb4R2i47VDDzrcBnJ/lGW3YJP5MwTeiLslssCeaxTpL heO8xAx2LC6b8pjtvj2tq9jc1dISHf97cDlaIIIHVyck7ZfSeuy18fpZhhw2lO3St0wgnt4OF6G 4IUMkc2nyhMrzAA== X-Developer-Key: i=krzk@kernel.org; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B Constify the pointer to 'struct snd_sof_dsp_ops' to annotate that functioon does not modify pointed data. Signed-off-by: Krzysztof Kozlowski --- sound/soc/sof/debug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/sof/debug.c b/sound/soc/sof/debug.c index cf282c8b18af..884d85770426 100644 --- a/sound/soc/sof/debug.c +++ b/sound/soc/sof/debug.c @@ -311,8 +311,8 @@ EXPORT_SYMBOL_GPL(snd_sof_dbg_memory_info_init); int snd_sof_dbg_init(struct snd_sof_dev *sdev) { + const struct snd_sof_dsp_ops *ops = sof_ops(sdev); struct snd_sof_pdata *plat_data = sdev->pdata; - struct snd_sof_dsp_ops *ops = sof_ops(sdev); const struct snd_sof_debugfs_map *map; struct dentry *fw_profile; int i; From patchwork Sun Apr 14 18:47:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13629215 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EA423135A49; Sun, 14 Apr 2024 18:48:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713120487; cv=none; b=TYcLFfyJ9L6BFrWJe1TYJyqu1absSS/IZeVwKnzDdK5ucSflT0rS0GJwNO0c4vMgOu/5tRlXXqdGS+btYwEeLKEFbp9pHYhhMyn7/rxwyqeMsJu7CZSj6z6dzi5HzhtmnaEoneveSKiN5s1rmcBRlQXmBHCGAcNgJhCpBQGuVww= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713120487; c=relaxed/simple; bh=hNJ2G+P/dWd7vsgx62FCkrSeDakr9/PbBt3Vb3M9/xA=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=jmEpk/8n7SN9kNZPKu9dWuNOtzWd+5yvZ6FnNGLexWtrrgwFGAi+E3ZTkUmhEDmhN3NIYqhKSXLIOtUANtMzMxCqVkfftMseFT81wV9ifCb1URh0GpCOymju9sDX3+rhwPr2L8kOnvJCNP/hlVpukFs2O5aYlfzPiipjKkcUm84= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=FVpf9xir; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="FVpf9xir" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4BE34C3277B; Sun, 14 Apr 2024 18:48:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1713120486; bh=hNJ2G+P/dWd7vsgx62FCkrSeDakr9/PbBt3Vb3M9/xA=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=FVpf9xir32ka5d/mEH6VXlT5ee8iCgICnJbmAdUgBWcLm7X3LdvWgx5Xfdrrns/2t kRWY5cKyrF8ixMQK9czEHrGlEAVs4PpuYhpu+wjPeR2s76Q+EQzfNa4qnIxy+GHSPR EP0F/u6/RrDQ95Hi3+tX4LYTkRv0MguJFrwM9r+VzSXLfzwpgnRIBEpc6zDpAAvjk4 ogwDqro+ZLWdXwkWsRTSzL9O1Ccj4iDdpyuA7mpgQGcACax/gkhFoilwgBlyYQ8ZcN r00TNtFjyRJs0B5z7+w432oYrgytmy1/zSTMwk/pHvzVMb+xX62U549xedRuLvmqJt oTHh4uda5Hnxw== From: Krzysztof Kozlowski Date: Sun, 14 Apr 2024 20:47:27 +0200 Subject: [PATCH 02/14] ASoC: SOF: ipc3: Constify local snd_sof_dsp_ops Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240414-n-const-ops-var-v1-2-8f53ee5d981c@kernel.org> References: <20240414-n-const-ops-var-v1-0-8f53ee5d981c@kernel.org> In-Reply-To: <20240414-n-const-ops-var-v1-0-8f53ee5d981c@kernel.org> To: Pierre-Louis Bossart , Liam Girdwood , Peter Ujfalusi , Bard Liao , Ranjani Sridharan , Daniel Baluta , Kai Vehmanen , Mark Brown , Jaroslav Kysela , Takashi Iwai , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Matthias Brugger , AngeloGioacchino Del Regno Cc: sound-open-firmware@alsa-project.org, linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, Krzysztof Kozlowski X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1610; i=krzk@kernel.org; h=from:subject:message-id; bh=hNJ2G+P/dWd7vsgx62FCkrSeDakr9/PbBt3Vb3M9/xA=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBmHCTF3uQbFUD8ajbnGaZCZUG17venUqLmUXEMU OHBDYeeKIeJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZhwkxQAKCRDBN2bmhouD 18vwD/9tB/adriOXoYJFXctL1cBnqxA6W/ObflSsngdezLjeiWl9WbN9N6wL6KU3uueyVcx9udc 3IZ+dc1eh3Gpi/MIF/7tpR0djzZiyevMKsi+op7jsPNhJmmsHM/akaO6y/ygyGcQ+F6Gh5VdnOL Ls/2Q4b6yK4DQCINa0+LbL7aDKrCjeWAv9Cc5zyr7nAMoYPiFPdcGOeNvaQBpT+CNA6piHSfguQ yuf2svGbeCjGpQjcwi2LupfFV3LYyGoSEc2Y9vUD7ajTht9jdyl9hiTwQugzLRXatsaboI91qXF SAcl4tFOSS2L0eaYNQsOJSXvtUnGkWE6u+INoBpRg3HWrWswypcg/XY9thJx0vgNN3Wkde2AR3h rEEhsRo/HnFAFULU/pfwNv566/aX2mGEKgdNGY32ylmU7ZfMwfd8Wk9eZyBBs50q8LxRO4+tgci pOy2A5uzBijBjPJuiO2mUrkKhEsaL6WoSa3U1WOh6HSOae0L52f9TpYdKWycC57O3GQfC75Mn0Z egfNPWqvOtL/ahx5+qssvVfYr/5OWyemSsoE4EHagKJqS/9BNMTXjpLIDT2hI09YBaDIw/7wZJS UMH/xzb0GL6UQwPbUOz0A8zdQ1RZnhgVx++SCORD6cIiUGSOoXnoJNolYW4KreKMa7nM+ZXzPUR hIRB0ABv4uAv3Kw== X-Developer-Key: i=krzk@kernel.org; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B Constify the pointer to 'struct snd_sof_dsp_ops' to annotate that functioon does not modify pointed data. Signed-off-by: Krzysztof Kozlowski --- sound/soc/sof/ipc3-priv.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sound/soc/sof/ipc3-priv.h b/sound/soc/sof/ipc3-priv.h index 0bbca418e67e..9cd7794f3cb6 100644 --- a/sound/soc/sof/ipc3-priv.h +++ b/sound/soc/sof/ipc3-priv.h @@ -36,7 +36,7 @@ static inline int sof_dtrace_host_init(struct snd_sof_dev *sdev, struct snd_dma_buffer *dmatb, struct sof_ipc_dma_trace_params_ext *dtrace_params) { - struct snd_sof_dsp_ops *dsp_ops = sdev->pdata->desc->ops; + const struct snd_sof_dsp_ops *dsp_ops = sdev->pdata->desc->ops; if (dsp_ops->trace_init) return dsp_ops->trace_init(sdev, dmatb, dtrace_params); @@ -46,7 +46,7 @@ static inline int sof_dtrace_host_init(struct snd_sof_dev *sdev, static inline int sof_dtrace_host_release(struct snd_sof_dev *sdev) { - struct snd_sof_dsp_ops *dsp_ops = sdev->pdata->desc->ops; + const struct snd_sof_dsp_ops *dsp_ops = sdev->pdata->desc->ops; if (dsp_ops->trace_release) return dsp_ops->trace_release(sdev); @@ -56,7 +56,7 @@ static inline int sof_dtrace_host_release(struct snd_sof_dev *sdev) static inline int sof_dtrace_host_trigger(struct snd_sof_dev *sdev, int cmd) { - struct snd_sof_dsp_ops *dsp_ops = sdev->pdata->desc->ops; + const struct snd_sof_dsp_ops *dsp_ops = sdev->pdata->desc->ops; if (dsp_ops->trace_trigger) return dsp_ops->trace_trigger(sdev, cmd); From patchwork Sun Apr 14 18:47:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13629216 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AD004135A49; Sun, 14 Apr 2024 18:48:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713120493; cv=none; b=XA5BKg/ELCF+NVMWLbZnRuFSJoxz0T/YmWGdQypuh/yBye2Ogxze+oiVJ2kZA+xUbeC0YFmX8HQpLTsSXDgBiLDNuH6IXhaNjnYP2Rkb1wD7snnhdzSVmqdtNGkbh13KnxozDhnUD3vuUlpK64zTJcPJ3OBHcSweWgXoySiqjUo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713120493; c=relaxed/simple; bh=qX/0RDSf7YaTrXlR3yi+NM6JRFpDm9GRxz4kt0d2t/o=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=JIJNie13yXijte7Pyqnox4Ovj7MDWOtCfLNslBu2UF1nWQlPoQg7dwuULeC3+NdtyiUHTIvVPzsaixTiU0ZkTKYaTB5edoTGevg8TtjGWDd2wx/3x6eIdCAiQAXAznOFm2Fmtkyv8fZDZunxvDu1alzPKKCG87Ud8gwcpqKOE1g= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=dxhOPQc4; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="dxhOPQc4" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 58BBAC072AA; Sun, 14 Apr 2024 18:48:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1713120493; bh=qX/0RDSf7YaTrXlR3yi+NM6JRFpDm9GRxz4kt0d2t/o=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=dxhOPQc4X+cr4iX+wwKbi3v6HQJxq2imjwbnx1ozYjmW4ODcufGIAMXn2ZqPkfSn+ vV/7Imh+C+AdaMyty0blhQwDdL1WxP0rphby1DOml+fBXn1CWoWPBC+wRc1l+ZEJ+R 7C6UsF4zaZRo6RaXzu/8Xn3bCj6obaIEMsU94aVcVbcpFs7ngWNvd94B84VHHhEJBj k9PqJH1Z7Kg5kesFv0hFLq1JprWLdncLNeAa0lT+Uar1Of5DTK3QyHUQnkPyjNvkCQ KCXmr2pnpSRy4RceS4JkBQd/i9zk31k2Uk0dIt5idCF4Cf1sqza8nJzF5JWbJQClIu oibqORGAcOafw== From: Krzysztof Kozlowski Date: Sun, 14 Apr 2024 20:47:28 +0200 Subject: [PATCH 03/14] ASoC: SOF: pcm: Constify local snd_sof_dsp_ops Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240414-n-const-ops-var-v1-3-8f53ee5d981c@kernel.org> References: <20240414-n-const-ops-var-v1-0-8f53ee5d981c@kernel.org> In-Reply-To: <20240414-n-const-ops-var-v1-0-8f53ee5d981c@kernel.org> To: Pierre-Louis Bossart , Liam Girdwood , Peter Ujfalusi , Bard Liao , Ranjani Sridharan , Daniel Baluta , Kai Vehmanen , Mark Brown , Jaroslav Kysela , Takashi Iwai , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Matthias Brugger , AngeloGioacchino Del Regno Cc: sound-open-firmware@alsa-project.org, linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, Krzysztof Kozlowski X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=884; i=krzk@kernel.org; h=from:subject:message-id; bh=qX/0RDSf7YaTrXlR3yi+NM6JRFpDm9GRxz4kt0d2t/o=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBmHCTGuPhjtUfqWw7zvnjQ9BTn1c7afI+sEeIPY zXYln1O9qiJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZhwkxgAKCRDBN2bmhouD 17DREACMNQ0UTBMAHCLTz3wUYbBgS5RulwxroGsHqbC9N7LT98ZmJZPFh8uZ8zwatkOLU+8Qbf2 v3SKTqcaeT5pc4OrcMf63/GtyIoj76HXMJaOYHKnLZmadFKvtcyk0TqNim69aJNYQXbpNYWEgm9 df97UPfmfOTjEGmbbysu08KnLNNdPfMYDcOPxatTcNUav98K5pqFV3hGciN6PnyZG5YuLnFxzQw EIH0G1IEPzYxCv/zp2B0ZzVqvWQbS2+lrYtJliZxTe8JbiQXrZPVJBhyujV098/hswnMHz88ExN 880eytk6TYY/Hb2H4yVZuQqFlJhvNj5sWVZYYTK/BpB7BYxn3JibO+16v8uQXxnJugjqqO+z/sl YYKMe5KuBSet9/Hj+zv3JuVpdo9PNKpmQsLRildT0s8vQwjYVIMnCyZBrCZezBMLviL7o+AP1E5 r/26k5foQyya/Asx0T4bOIuxAkK0jL+uwS4+IJTthgS+PzanmoAJcQy1ubtnNkUFp5HPJPuht3B kwfLFYywB9B8TeHl79biKDY+ldbQIqlLvO+ooNBMQX3ubXsevEdK02qRhozY68jxych65Dr5WVC K0MFbw0Yxx0d/Xjmjgf0Q40SwPHY0c6jhfGkpWsLXlpxaf25Bp0m6loJK3xuwXXIfBvvTQovbZP NJfISERE7NMVYhA== X-Developer-Key: i=krzk@kernel.org; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B Constify the pointer to 'struct snd_sof_dsp_ops' to annotate that functioon does not modify pointed data. Signed-off-by: Krzysztof Kozlowski --- sound/soc/sof/pcm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/sof/pcm.c b/sound/soc/sof/pcm.c index 8fca4b0d63de..cb774e011e31 100644 --- a/sound/soc/sof/pcm.c +++ b/sound/soc/sof/pcm.c @@ -423,7 +423,7 @@ static int sof_pcm_open(struct snd_soc_component *component, struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); struct snd_pcm_runtime *runtime = substream->runtime; struct snd_sof_dev *sdev = snd_soc_component_get_drvdata(component); - struct snd_sof_dsp_ops *ops = sof_ops(sdev); + const struct snd_sof_dsp_ops *ops = sof_ops(sdev); struct snd_sof_pcm *spcm; struct snd_soc_tplg_stream_caps *caps; int ret; From patchwork Sun Apr 14 18:47:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13629217 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8AD03135A49; Sun, 14 Apr 2024 18:48:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713120500; cv=none; b=tCQpTaBHea3z3MBAPnBh7OL38PXstW+LVcXsrO4vhHaorbzyZP7f0T56LCA8OgwUbIgZAcfkn76tLXlyj88lfIdP9RRA1RUiRrunxlc21reJ1ZdDyt+hfLY4X97DFC7RfPmCPvz4uBoVcCzCSyu1Wl/u8R7QL8LCVWd4RdvK+xo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713120500; c=relaxed/simple; bh=n7wgW58QvGruDrxcgPHZ72/9XELas9m3qnwPa8llWsk=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=NAJZQv5nu79xzHONyfjzrZD9Jy/+Cfc/781ItXNip6LzdiKxucVfjEFyGVwuX7ScowBKgkrrdRD0yxnWPvLXJSsiQMa26GtPIuj9iA48k8iSQL0ApaFRC0mX/IDU26kUQcMaiC85hcYtKZUC4xY3A4ijEkR6kGP1tjHHVJeAExs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=oPd6yaiK; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="oPd6yaiK" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0D636C3277B; Sun, 14 Apr 2024 18:48:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1713120500; bh=n7wgW58QvGruDrxcgPHZ72/9XELas9m3qnwPa8llWsk=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=oPd6yaiKERZRfVPjEQ6paFa3Eued9/3Zifbwe7+YeE4e533+9/koXTx2XhCt6kRit EQgi+4+k7govpa6V9WlHHpvihWLlkvbrFif2qTCCV5ABSe9Qf+mIy1LQd7vR0s7G/O DWpNAjy6OMi7KvQgNR7Jx+cVOQelggwEvINbHWWlwEqh65rwhCHM+eF6CRn4RHqHBN qlMXJyQdEjJhVmNOooyGx4bgNEWpTD4o4gT99mG2Ct3oPuPpcHCHPDqGT6Am0+hEV+ GcARU4SBUVRixOBB+8/l918GpHJe8hbVkU4v4L8V1TwfQDkmQQUzi6CoDaHaP7D681 apGvQQcm4JetQ== From: Krzysztof Kozlowski Date: Sun, 14 Apr 2024 20:47:29 +0200 Subject: [PATCH 04/14] ASoC: SOF: Constify stored pointer to snd_sof_dsp_ops Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240414-n-const-ops-var-v1-4-8f53ee5d981c@kernel.org> References: <20240414-n-const-ops-var-v1-0-8f53ee5d981c@kernel.org> In-Reply-To: <20240414-n-const-ops-var-v1-0-8f53ee5d981c@kernel.org> To: Pierre-Louis Bossart , Liam Girdwood , Peter Ujfalusi , Bard Liao , Ranjani Sridharan , Daniel Baluta , Kai Vehmanen , Mark Brown , Jaroslav Kysela , Takashi Iwai , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Matthias Brugger , AngeloGioacchino Del Regno Cc: sound-open-firmware@alsa-project.org, linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, Krzysztof Kozlowski X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=865; i=krzk@kernel.org; h=from:subject:message-id; bh=n7wgW58QvGruDrxcgPHZ72/9XELas9m3qnwPa8llWsk=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBmHCTHoHVG8jIRMuSyEz6gw6s3WlC+CMzYEr3rQ MYLccCWoXGJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZhwkxwAKCRDBN2bmhouD 10RkD/9D3WRc5sgDCLrfb2gtoEJht5UdUfaYqmyCGnC4zF64/kGjFd3mRP0+XjHAYrAPJU2U0ev +aMgqK7guv6mDoeOaa1DIa9L+PQMlTnOwx/s5ZtUTvx/nSFrNhx4Yppt30QM3m0xsPtaKnc92HS mnvNs/dTZ4EcY9wd+VMwlxUEOOI9IJIGC5qZlh6f3eJuMx7q6Q68yiFUh/mCf2vQ4Q8cE7WK06S sxKQgICNKHgU5BO5szTlIoxYC9n7uu4Xlpdlf0VDPFPjsDLV+gK/bkpTkHirHXP6qRew9nqfg4t ilQ6oHvKLZ2rU/eyZD5bpFL06PLMMkFSNlAZVo4sSlXVpMG7/j/sQJUm4fWjTDIzIZi9Gzqp9Tl o4g6viiNkC49EkHiYKdtjsC3Ib3pczn2pmoTm6q6Vz8N2TCGcFS2CabtiKFKIdzkhRMMFi62u33 2JdLLGvqf0q205Ytt/yYUVQzkezPBRMeqESRUD5PqelX+RkYSaHz0ktt0Awm0Ox2QR4aV7dCohj JBTrq2cR56i3Z/RD43Yz1kqtX1sMVaiC00QKUBDnMp7DfMe6bBcfvKXpwHRNjnvSVD06XfLUkO0 h5lIdUzl6YlPnPYCvpHKxiUWwDBc/i6Dy+gUZfz06k669fkV21AYu3fspJ4Kt64ccqjp0spzr+7 ngqZjikSKjwv0iA== X-Developer-Key: i=krzk@kernel.org; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B The core code does not modify the 'struct snd_sof_dsp_ops', stored in 'struct sof_dev_desc'. Make the pointer to 'struct snd_sof_dsp_ops' const to annotate this, make code a bit safer and allow individual drivers to also define this structure as const. Signed-off-by: Krzysztof Kozlowski --- include/sound/sof.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/sound/sof.h b/include/sound/sof.h index 05213bb515a3..780c1a755917 100644 --- a/include/sound/sof.h +++ b/include/sound/sof.h @@ -166,7 +166,7 @@ struct sof_dev_desc { /* default firmware name */ const char *default_fw_filename[SOF_IPC_TYPE_COUNT]; - struct snd_sof_dsp_ops *ops; + const struct snd_sof_dsp_ops *ops; int (*ops_init)(struct snd_sof_dev *sdev); void (*ops_free)(struct snd_sof_dev *sdev); }; From patchwork Sun Apr 14 18:47:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13629218 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 74254136671; Sun, 14 Apr 2024 18:48:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713120508; cv=none; b=k6e3/x4FtUbabPZsp7p3GvZyt3TEOUgQ5CcaOpo45T2ThTxLPz4dr1audYpQE29PBSUOL3aKv+P/Fh/VBI0ue/3vMHHgCPF1TyCGeddyKRtNnbY/cPKXNHCj7Yn7SkBhvP3v21lOalePMjDTukMgEO+QzIVjBlzbkN4MyrCmwqc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713120508; c=relaxed/simple; bh=E3Lgb8V8RKpyH5zK9wcRNDE7dtQPH+EB6tyX8qozgKM=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Jyjn8OIcoM7/mthXxhkGPaAtlKbbCdQg069XWdi7bJVZeL1HATAqMvtxWuFo56HcZekJHT8q9npbxnvqIrrpB5ZdxklZ6xd7y9YBkmC1iFtVeB6EDJqy049f6zIFvQWWDbxwI43CX8MtkyuO0+X7e38RzWGnkZfnPJVCNes84WE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=OjvcFNH3; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="OjvcFNH3" Received: by smtp.kernel.org (Postfix) with ESMTPSA id F23B8C072AA; Sun, 14 Apr 2024 18:48:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1713120508; bh=E3Lgb8V8RKpyH5zK9wcRNDE7dtQPH+EB6tyX8qozgKM=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=OjvcFNH3/nQWL33ZQOe+YPPlV/qcDPqGarfUwtM7Yt1eYuGdjnmLwv+CURMh55uFp Jc2TEdCB9JymQt2mr56Kqxt5wxBpjx1xhcOSr96BnvKbq/g1lc5ehYs2everX6eAS9 7dkk2aFaP494U6uJjOzIt2vwx1xdoED96W0xYXHe7po4uLYFQDG771I1ZVSuCyWFxb 9GVRf5pVyI7CypZgKaoAz+Vc8gHPhNiTdO8HN6b2Qg3Pcxs02QX98vUyZg8W0CZEMS Dus7lv2fEJxNLu2DUARmkv5tbIqIDyiEhDMbmWyv1J/PiRwMB9xokQfooY+BSKD8ox 5IK3F0oxs0uYg== From: Krzysztof Kozlowski Date: Sun, 14 Apr 2024 20:47:30 +0200 Subject: [PATCH 05/14] ASoC: SOF: intel: pci-tng: Constify snd_sof_dsp_ops Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240414-n-const-ops-var-v1-5-8f53ee5d981c@kernel.org> References: <20240414-n-const-ops-var-v1-0-8f53ee5d981c@kernel.org> In-Reply-To: <20240414-n-const-ops-var-v1-0-8f53ee5d981c@kernel.org> To: Pierre-Louis Bossart , Liam Girdwood , Peter Ujfalusi , Bard Liao , Ranjani Sridharan , Daniel Baluta , Kai Vehmanen , Mark Brown , Jaroslav Kysela , Takashi Iwai , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Matthias Brugger , AngeloGioacchino Del Regno Cc: sound-open-firmware@alsa-project.org, linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, Krzysztof Kozlowski X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1218; i=krzk@kernel.org; h=from:subject:message-id; bh=E3Lgb8V8RKpyH5zK9wcRNDE7dtQPH+EB6tyX8qozgKM=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBmHCTIDy3Da7qtpblMGIwPzl1JuWlzNxlyq+NK4 zvMVQDu3geJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZhwkyAAKCRDBN2bmhouD 170/D/0c3KsuAsTQcXYmaow+UH/9VU+H51CVHZL7moe4HJJNPIEb309ntaOE6QQO2G38wsFzY4s IpSWVJFTkIYjPMP5t5u04Xj9C3k4nU+qhY2OZD4o/V2fTyhDFvSbzV4r9uqBxBnlOKmugO2KRBt gTMAYU6cObX2/VnooacJ6Ce6N0c6Ggbkh4H5fXKB9FIxVgQBgGs5N0goiA9wSEzlg8+P8LFbKBM WPiuiF9sHnDIZdiyMQfvayqN9IFBd0hb/9gOaOC/3tVMweNHCFkoXYUeFgJHuSZ7odpNpqZD90y 18/hzaIeeCg/uQKBEFe6aiqVpnCK3JmT2hRCZmDlZvSuyDzQU1liykKWJkzmznaYNhcgwg6pWn4 ITWzbhb7KzteZt3yrOOqFIpYcZSWcbY55CoUX3hQB5vy2jyGT0uKBffZiFALermHpXMUUuMVp6R cr9IKnJaPtaE8N0qAW0+hcxIkmacyLxSydN36onQfgk/bYWuml6gRlog5CcmeIa18g+pd99JOTf D1Nh5orj5oE90J6Xv3qIaM5SmTtUkqFkQjqkF0H2VnLqJKBMZwEfJl9jB5dwkI0oAjs7I/wMSby Wf2hC1rWk5D13Xz1fpKaYErRNd+cwQ1Tgq17b2jGuz5N/mqj3gjNTHRrm2jiKQNnxUBS1q+QwV9 IT2N8xI3TbDMUtg== X-Developer-Key: i=krzk@kernel.org; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B 'struct snd_sof_dsp_ops' is not modified by core code, so it can be made const for increased code safety. Signed-off-by: Krzysztof Kozlowski --- sound/soc/sof/intel/pci-tng.c | 2 +- sound/soc/sof/intel/shim.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/soc/sof/intel/pci-tng.c b/sound/soc/sof/intel/pci-tng.c index c90173003c2b..d8a36d5a29f7 100644 --- a/sound/soc/sof/intel/pci-tng.c +++ b/sound/soc/sof/intel/pci-tng.c @@ -132,7 +132,7 @@ static int tangier_pci_probe(struct snd_sof_dev *sdev) return ret; } -struct snd_sof_dsp_ops sof_tng_ops = { +const struct snd_sof_dsp_ops sof_tng_ops = { /* device init */ .probe = tangier_pci_probe, diff --git a/sound/soc/sof/intel/shim.h b/sound/soc/sof/intel/shim.h index 9515d753c816..18ce3d33fa80 100644 --- a/sound/soc/sof/intel/shim.h +++ b/sound/soc/sof/intel/shim.h @@ -196,7 +196,7 @@ struct sof_intel_dsp_desc { int (*cl_init)(struct snd_sof_dev *sdev, int stream_tag, bool imr_boot); }; -extern struct snd_sof_dsp_ops sof_tng_ops; +extern const struct snd_sof_dsp_ops sof_tng_ops; extern const struct sof_intel_dsp_desc tng_chip_info; From patchwork Sun Apr 14 18:47:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13629219 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D68BB2E3E0; Sun, 14 Apr 2024 18:48:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713120514; cv=none; b=U7HHQAmL7xQ4Hl/ogfdIROwZ1lxUlREbWuNPu5xDgNB/xD4uKkLehaLHMjrTPxsKX4vl59fd9up0cLcS6l5XZr/SPE5oTP6tRHR1AYXxWRdTdQZN9vVyIqrVcYLm4PLf4UGLbiTiIa+wPKIThc7j0sccBaO9STuaIZld/CufQWI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713120514; c=relaxed/simple; bh=ODYRn2RdENpaKnJgZLjiwAca8icK8fqKMWlq39yx68A=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=TA2WnhR2zD/fAj9XUafnXXptYentlZFi7X2wZHMzxpBoo+iugEZLg3CRj5IQ/OpoH1hqwi40i0ObFydd50Toqk0HzJkubsaiAqwPz1BQaGttn389QZA+BUrH/pOQYGiQTlv2eLEdi26AtFA81MD6x9eli9JZucd9kIosxxGWOOM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Tz9d0Fxd; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Tz9d0Fxd" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8ADCEC3277B; Sun, 14 Apr 2024 18:48:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1713120514; bh=ODYRn2RdENpaKnJgZLjiwAca8icK8fqKMWlq39yx68A=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=Tz9d0Fxdi92/WqzdH6POx08Z2+ZuVV0P/a4thX8q0xcpqwmwUy9JSc9OJ1pIU3Wfn L7VrBEsRlrtK6TogPf0I/svnoS0PWVk+kTTQDgHpYTbeS0VhG8DJbx70DGcgzg8/Ki CdYIHAne6z11iw6DQfGZxppZj9KUtowPIDLzq/it5ItXpe5lCACO5kgMa15ZNre6YF Q30Mzi+ewHlEo/18uC+QdZqlvw//8+8thbyeb7x2QYuctLvo3pjZSzRx2d3pVhVD4L gOzki8UrzMXTytlW9XePTuWP/9gYa0ZWHJU3sS23eRL70Lxg35CG1v9hEOiiOVkOgN mm/8rlEOvBJUQ== From: Krzysztof Kozlowski Date: Sun, 14 Apr 2024 20:47:31 +0200 Subject: [PATCH 06/14] ASoC: SOF: intel: hda: Constify snd_sof_dsp_ops Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240414-n-const-ops-var-v1-6-8f53ee5d981c@kernel.org> References: <20240414-n-const-ops-var-v1-0-8f53ee5d981c@kernel.org> In-Reply-To: <20240414-n-const-ops-var-v1-0-8f53ee5d981c@kernel.org> To: Pierre-Louis Bossart , Liam Girdwood , Peter Ujfalusi , Bard Liao , Ranjani Sridharan , Daniel Baluta , Kai Vehmanen , Mark Brown , Jaroslav Kysela , Takashi Iwai , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Matthias Brugger , AngeloGioacchino Del Regno Cc: sound-open-firmware@alsa-project.org, linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, Krzysztof Kozlowski X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1327; i=krzk@kernel.org; h=from:subject:message-id; bh=ODYRn2RdENpaKnJgZLjiwAca8icK8fqKMWlq39yx68A=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBmHCTJea+7a6S6/0ABA+BT4aNIYMDEgQLCwYl0y NVOjuIpHQ6JAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZhwkyQAKCRDBN2bmhouD 1w0/D/4kT2T/U2kjeb533yzTZJrtn1IQZrnfh2AARz5j1/KEXUbKhX3g23zIiE7v2uMAApP0XbG oMf4MZfc7/qxfxOTNF5eRJl164ezv/XfeOt+o+oh/CMEUg45jLOvgQZVgCwGEWg69WdPhq1Wllw 9mg+myz1Dhdw8SHJdmcuyWktFnliFSaLuoJm/gNoYJQ5ZBLwVDJN6KR5Daph/qb5p9BN071uE0n UNU5jfiPip/X9yMcmvbZRI/rxnKWlmvqSDq3GWkqT9eAdXFBZXwkYv73fkfaB63z1iOwIaIXSoI OZ/ekB+e9EG09ga9KKimHX/jEhzQk4kR7ypK8F0vLr2YrEaGQ95hpmBzsYSu70Px3ggKj14nFFv Dwf54mgvRiChYGnzxVa6WuYnVrvN6s/WmTEjmiMRm78dqD1JtSH3/O644bol12PTP39YNzZwzzR RbzWz8sy/n1WTeRCJJBK7K6RXbnbrvLYTg2sRTe+amJEhLjpL798Io6O69aZhO8GI2YF3leuVsl P2VTiXGQw4q14WhUuUkHitxtN2PKgC0QA1cYreDg6F/bWC/byVhFjNox1ziPoyoHoF8TqbIrmJe 9Fd/PjxONIj5GvJXa6GyeunyqfvJRaUCHlYQq8LnP3kHTrkHIQ+wLuwRCzNQ0J8PMhac1oe4iZ7 xj4+dUU5YGoX8Ug== X-Developer-Key: i=krzk@kernel.org; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B 'struct snd_sof_dsp_ops' is not modified by core code, so it can be made const for increased code safety. Signed-off-by: Krzysztof Kozlowski --- sound/soc/sof/intel/hda-common-ops.c | 2 +- sound/soc/sof/intel/hda.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/soc/sof/intel/hda-common-ops.c b/sound/soc/sof/intel/hda-common-ops.c index d71bb66b9991..466769c68da5 100644 --- a/sound/soc/sof/intel/hda-common-ops.c +++ b/sound/soc/sof/intel/hda-common-ops.c @@ -14,7 +14,7 @@ #include "hda.h" #include "../sof-audio.h" -struct snd_sof_dsp_ops sof_hda_common_ops = { +const struct snd_sof_dsp_ops sof_hda_common_ops = { /* probe/remove/shutdown */ .probe_early = hda_dsp_probe_early, .probe = hda_dsp_probe, diff --git a/sound/soc/sof/intel/hda.h b/sound/soc/sof/intel/hda.h index b59d1a572bce..7804c5b50c26 100644 --- a/sound/soc/sof/intel/hda.h +++ b/sound/soc/sof/intel/hda.h @@ -874,7 +874,7 @@ int hda_dsp_dais_suspend(struct snd_sof_dev *sdev); /* * Platform Specific HW abstraction Ops. */ -extern struct snd_sof_dsp_ops sof_hda_common_ops; +extern const struct snd_sof_dsp_ops sof_hda_common_ops; extern struct snd_sof_dsp_ops sof_skl_ops; int sof_skl_ops_init(struct snd_sof_dev *sdev); From patchwork Sun Apr 14 18:47:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13629220 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B5F5C136662; Sun, 14 Apr 2024 18:48:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713120522; cv=none; b=PbPVu9wvPmaXzK3EmOrbvpFESDow/b8Ro5beJLt7E7f+/bEoXBFGHvqdYlPtTKtvP29DLcP3lVD6z6xNe90DwxnMNtYmNnD/kG/hrgVWoJFLViVOaKQwhFJTeEaA4F4E72B7iH0lmY7YPb/mDeowpBdbYXSZMaHwhQBUtmhTToY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713120522; c=relaxed/simple; bh=HDagpE0K3tDAxGmedsHe5hM24jccnUYiXri16WPhSmY=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=nVNQW2Rz1pEPniFCZWhXl1Z1NqfC4b6VPqGP5a2y+0tnw5fOMaOn21d++sZGidqj4lZ6DW7BvEeV/gX9LEKaQfH02Omh93IqYuoIqk1N6oGCF82WV7FfQrKqrogyo4hs1aiErd8NKPdk9PfRfCgBSjNJDEAF2DFTvV8hgjlwzwA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=QM4J4hJc; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="QM4J4hJc" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 53E70C32781; Sun, 14 Apr 2024 18:48:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1713120522; bh=HDagpE0K3tDAxGmedsHe5hM24jccnUYiXri16WPhSmY=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=QM4J4hJcAilQAenpmHougpgF45SkCpQowwdmEC7mjLwQxn3SErRt2cEfgz9FBjnQ2 lj36HPeWGJapW3+0NrMuHaqo885htr9soZR90k0kPDZVN613ufj29Z+KNRHhAxzobH NYodIYhcfQ5lMraOKONLWXeUp7Tod1LsDbm6AG9RCKIbSs4Z+FkLjc6a+hcwkb/wH3 Lcf+dEy4K4is9jGTNtLoNV4ULSIsH1dhsQ9cEeYv+P9dPvVqCInQKhyZCAJUxQHh6w tLzG81Vanl1yrcPjeNU4pxATHi9Kvf30wFt2QqT1QhTMUXrcmA3n4gP4WBPF/DgEb4 Oki/+R1eVZP+w== From: Krzysztof Kozlowski Date: Sun, 14 Apr 2024 20:47:32 +0200 Subject: [PATCH 07/14] ASoC: SOF: amd: acp: Constify snd_sof_dsp_ops Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240414-n-const-ops-var-v1-7-8f53ee5d981c@kernel.org> References: <20240414-n-const-ops-var-v1-0-8f53ee5d981c@kernel.org> In-Reply-To: <20240414-n-const-ops-var-v1-0-8f53ee5d981c@kernel.org> To: Pierre-Louis Bossart , Liam Girdwood , Peter Ujfalusi , Bard Liao , Ranjani Sridharan , Daniel Baluta , Kai Vehmanen , Mark Brown , Jaroslav Kysela , Takashi Iwai , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Matthias Brugger , AngeloGioacchino Del Regno Cc: sound-open-firmware@alsa-project.org, linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, Krzysztof Kozlowski X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1432; i=krzk@kernel.org; h=from:subject:message-id; bh=HDagpE0K3tDAxGmedsHe5hM24jccnUYiXri16WPhSmY=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBmHCTKjG1DimqE5FL7elEaDZsWbw26M3dARt30V vkAJmMPkTKJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZhwkygAKCRDBN2bmhouD 12exD/9/I3LdS3pGpcogHE3mZN74qV9LHLLx8BAjFOWstYyp/MhmwFBpr05YOGXTNUwwzU3wfbt +Ebrbl6hLU+8umJX67uayipYOqDyG8/svaV8m6iVVhRlItAv4Tbh9bRA0fuHmNUKOr0Yy/5Yvzx e47sslCY5FpG98SE65qYwkT8ogKEE3K1PDQSMVs5xZDVuwKA/HEFUKKkaP7/8/up9UPlSM1v5Hc WJiK+CxwwiCx/Ji1iL76ea4qG3CDVvLfu6TAANxv3Ek6kpjO5HxssxZpXIxymw7O39N+pfeJCKx 8rpujOUpFaEZKjVXSPkkAgV9JBtasCMoDt5GosGxzi+FLRzYlsyjFhF6feAdnjc+dqi2G4I0jME ++VZx5hbBtfMPeWyE7x0TRIcunZTk9Gf9wkZGRyf27vxRX/9DoSnmtaFl3E5Xm9ZRnucXe0s+ij g2wHAOkUoPYvxZngSjFFSPnqL561OSmtaTcYW9zUrAEsoVWlmVuqNr19CkWevigZk+da4K1Py43 Gpv2FZWyUDYu0B64wCreFStdkBVk8WG0PBvK7CMd+vsSH9hRPHuf8YdBZMvEpY/As5R4Qza7kIZ 3SQbwhmi86SF8Pu2zEPJ7I2QjU4bEBO2HZgc/O59lY0Yp5SkZHZ9F3SJQLPp+qd+wAC5H1xemhJ zcYjEQI0qnGGyUA== X-Developer-Key: i=krzk@kernel.org; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B 'struct snd_sof_dsp_ops' is not modified by core code, so it can be made const for increased code safety. Signed-off-by: Krzysztof Kozlowski --- sound/soc/sof/amd/acp-common.c | 2 +- sound/soc/sof/amd/acp.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/soc/sof/amd/acp-common.c b/sound/soc/sof/amd/acp-common.c index 0fc4e20ec673..b26fa471b431 100644 --- a/sound/soc/sof/amd/acp-common.c +++ b/sound/soc/sof/amd/acp-common.c @@ -193,7 +193,7 @@ struct snd_soc_acpi_mach *amd_sof_machine_select(struct snd_sof_dev *sdev) } /* AMD Common DSP ops */ -struct snd_sof_dsp_ops sof_acp_common_ops = { +const struct snd_sof_dsp_ops sof_acp_common_ops = { /* probe and remove */ .probe = amd_sof_acp_probe, .remove = amd_sof_acp_remove, diff --git a/sound/soc/sof/amd/acp.h b/sound/soc/sof/amd/acp.h index e229bb6b849d..87e79d500865 100644 --- a/sound/soc/sof/amd/acp.h +++ b/sound/soc/sof/amd/acp.h @@ -310,7 +310,7 @@ int acp_pcm_hw_params(struct snd_sof_dev *sdev, struct snd_pcm_substream *substr snd_pcm_uframes_t acp_pcm_pointer(struct snd_sof_dev *sdev, struct snd_pcm_substream *substream); -extern struct snd_sof_dsp_ops sof_acp_common_ops; +extern const struct snd_sof_dsp_ops sof_acp_common_ops; extern struct snd_sof_dsp_ops sof_renoir_ops; int sof_renoir_ops_init(struct snd_sof_dev *sdev); From patchwork Sun Apr 14 18:47:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13629221 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B6FEC136E1A; Sun, 14 Apr 2024 18:48:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713120529; cv=none; b=llokTs8FVjOaKtkyWrYtDHhJjBL2AbMNgSjM+ODIFCRqo6ESVSJPVTedn/GfGq0mttXX49lPfjGD+LJScaFx4o0Xowyc7q079nmGG+BT6DV/tSWTNnooyBWEev6OETU1Ot9G5lh/n9dyO1IB3X6gYhoyxJ24W3gv3GHkVe73ND0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713120529; c=relaxed/simple; bh=qgb4PnCVl0dqQSpagyMoidmTAcUFqQ7boy1JaeGL+xw=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=e7kqdLZp6oXQHhruJDmKo8pVYgXwZduUpM6+lQefhjVA6PaadryIGvvQsim/Dzlz7RbYQB+81CiIc41tnqPF2DP6GSxR7E+F4WufKKf5kLwyVV1jBiVaYVoi1d90PkgFfFs/BNhYW4I6QcYouNZ/+dHvxjrS3/wv+p6cTj10408= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=SHEGDY+x; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="SHEGDY+x" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4BE0CC32781; Sun, 14 Apr 2024 18:48:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1713120529; bh=qgb4PnCVl0dqQSpagyMoidmTAcUFqQ7boy1JaeGL+xw=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=SHEGDY+xloKWsvdr1QregSOPFE5gZDmG8xvNFgBuIGon3puktflzKUrL9aUk2OXTb FojfSY5yP54bq24DZv1HJfC7IwwGCfwUmM51x01JKqhIh3O3/4tErqQGQg6nR7pVfG 4o2KfoWO2BOwWpyPu+PbilVoX2DWm55eKMxx5A5YVvkUtl1iY2QxyJ7yKpde+JT7SH ZBOtub+8OjKoeeUBONcyECzbylOZOWW7v8rIChX+qL3p7VYxq0Yf45dPTmVdIMcyGF e7qbWEaqg/mTrAllusKO0DYnT1fGjrNwFuaQXvvj83tq0eKHDK3fzDtD0zIvgoZggY o4U4QL/UTKSxQ== From: Krzysztof Kozlowski Date: Sun, 14 Apr 2024 20:47:33 +0200 Subject: [PATCH 08/14] ASoC: SOF: imx8: Constify snd_sof_dsp_ops Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240414-n-const-ops-var-v1-8-8f53ee5d981c@kernel.org> References: <20240414-n-const-ops-var-v1-0-8f53ee5d981c@kernel.org> In-Reply-To: <20240414-n-const-ops-var-v1-0-8f53ee5d981c@kernel.org> To: Pierre-Louis Bossart , Liam Girdwood , Peter Ujfalusi , Bard Liao , Ranjani Sridharan , Daniel Baluta , Kai Vehmanen , Mark Brown , Jaroslav Kysela , Takashi Iwai , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Matthias Brugger , AngeloGioacchino Del Regno Cc: sound-open-firmware@alsa-project.org, linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, Krzysztof Kozlowski X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1012; i=krzk@kernel.org; h=from:subject:message-id; bh=qgb4PnCVl0dqQSpagyMoidmTAcUFqQ7boy1JaeGL+xw=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBmHCTLxCrRFj2CbxXNcJMF1mYYqYrCPBlpVKzLk ZK0FIwRfi6JAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZhwkywAKCRDBN2bmhouD 18WqD/4t4JUa14a9ctzBg8GUlqATymsKIponwobiAd+pdWdo4nZULjKytV1nfQdgj2wsuviDLfW 6se3BJx7VHjcOfGcJXXXbrPVEDgXRwmP2j3bWYfwsfi+8nG6l338p160sOivSVoZ1vdcALpKe4k SYo/2t2Ugo/MnYOC4d7hI6ABT15UNpNOsmT4i5ELyAU3qswUbxVtffxB1H3KXCi4xl2cpS8NZeZ Z/KOrRuG31ZWmPrdr2wtHpQKMFHh1vBJMvriMVrvKpd+zOntTsYdS/fznqBCyjIVmJcWJwR2zof BKgS/O5gNEcW72mbpeUHeNj53kUg2j9I6KtUewi9asBJdudH5tcmLFHsfWGjo+F6c4f6vJtYd7R wFD941HoSLeuESMiqK4oO3kmf2FC1yDl50jhD2OxeehTbUN5KFV2tY9fJdYwCuy99Ie+hBmiVNr gtd8NV8+IhPNRRkWggI3/4RUmILVdYwqy2+K1Bf9BP7irQd4w9R5oZqP02TclMLArojpr16DKz7 d5+S6usRxjE6Sb89p9jwuWCBiGZ2gn9b2ZgWOmk5EZZeW5s2YKu7O+iYlWMwZwP5Xf6lKarIdor uybySSbglauDc4Iv7VBLAOAog5l2faNB5Vq7k2eX3YJLbjeiHyyt/TvfeEQmAWbT/xYlrsXSb4Y 1iemPv7EFYgM9Vg== X-Developer-Key: i=krzk@kernel.org; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B 'struct snd_sof_dsp_ops' is not modified by core code, so it can be made const for increased code safety. Signed-off-by: Krzysztof Kozlowski --- sound/soc/sof/imx/imx8.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/soc/sof/imx/imx8.c b/sound/soc/sof/imx/imx8.c index d65e09a927f6..3021dc87ab5a 100644 --- a/sound/soc/sof/imx/imx8.c +++ b/sound/soc/sof/imx/imx8.c @@ -478,7 +478,7 @@ static int imx8_dsp_set_power_state(struct snd_sof_dev *sdev, } /* i.MX8 ops */ -static struct snd_sof_dsp_ops sof_imx8_ops = { +static const struct snd_sof_dsp_ops sof_imx8_ops = { /* probe and remove */ .probe = imx8_probe, .remove = imx8_remove, @@ -539,7 +539,7 @@ static struct snd_sof_dsp_ops sof_imx8_ops = { }; /* i.MX8X ops */ -static struct snd_sof_dsp_ops sof_imx8x_ops = { +static const struct snd_sof_dsp_ops sof_imx8x_ops = { /* probe and remove */ .probe = imx8_probe, .remove = imx8_remove, From patchwork Sun Apr 14 18:47:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13629222 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 15ED6136E1A; Sun, 14 Apr 2024 18:48:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713120538; cv=none; b=Q2+5jmRXpPHWwEJtCP8Ouj4qUUM5Ue8iVd04aoBQnd3ohgugmGUh2L9rEuctxHj4o73RietGV4zz6BFVx5zZvTb/q8IGcMt9DIFxjAqCjwZ9AcajK9lvTmz3ts20Jn+6AHQBboOBk0cC+xZNBzMKNIYFVq9D26RrURd9qJ6BVp4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713120538; c=relaxed/simple; bh=qGfyTvGICPhMHxBZDbcLXXOoOsd+zSSiD1gfuAYE4MY=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=SrsvNMpg7n2fzW0eYyPjVxCY8oBwwREHT0WMBDviEFddqd30CwkiVYFOUalrD3KF09lVVnHTMnDYtS3SpW6Oxqez3jZK72668HBkayBYWo1BCNQN+20jicyEgMyjMmewCRiWs4/6f+I4Ivzbfqy0fU5yU8jDmjSE2ASaVkKwqYk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=niYESIi6; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="niYESIi6" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2C43DC072AA; Sun, 14 Apr 2024 18:48:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1713120537; bh=qGfyTvGICPhMHxBZDbcLXXOoOsd+zSSiD1gfuAYE4MY=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=niYESIi6e8GXhnX852cWMpeysLlS/4DIaVyqjzXERRtKYeECb5Jr7QwK6QUkQEQDT wWfQunAovcDWR9dPN47cygQXdTSOZDd/XEygWnA/gdVJuyItiJKlTAekWnGASf9bRP w5TpFqQDfgzHZYocMMcSaUi7Rw5DCOg2lYNzUSuvMsx19ZhoaOMJyQoqx+kEd+icqE VjmR4JVp3OvBvtpPSB9XzwM4ZFtKblGCLSAbLTJPoWayQEeBPhs6PPzSUm4Js3xoaD YuYmamA+vBEz0KfK36nN8sq4ITlp4Gmf2c+W6ihX/r9H8f37fIPpMmrH7bSwikhAWF EwNZxVZ0F+ZuQ== From: Krzysztof Kozlowski Date: Sun, 14 Apr 2024 20:47:34 +0200 Subject: [PATCH 09/14] ASoC: SOF: imx8m: Constify snd_sof_dsp_ops Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240414-n-const-ops-var-v1-9-8f53ee5d981c@kernel.org> References: <20240414-n-const-ops-var-v1-0-8f53ee5d981c@kernel.org> In-Reply-To: <20240414-n-const-ops-var-v1-0-8f53ee5d981c@kernel.org> To: Pierre-Louis Bossart , Liam Girdwood , Peter Ujfalusi , Bard Liao , Ranjani Sridharan , Daniel Baluta , Kai Vehmanen , Mark Brown , Jaroslav Kysela , Takashi Iwai , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Matthias Brugger , AngeloGioacchino Del Regno Cc: sound-open-firmware@alsa-project.org, linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, Krzysztof Kozlowski X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=757; i=krzk@kernel.org; h=from:subject:message-id; bh=qGfyTvGICPhMHxBZDbcLXXOoOsd+zSSiD1gfuAYE4MY=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBmHCTMy020XGfYFIH5zZasAx/0Yq+7kXrHiZidJ bs+CZTSp4CJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZhwkzAAKCRDBN2bmhouD 12/CD/4udUivIHc2GoSjjDdUwGppx+SlrIvBVJeW68W/cXwaOCyKth5jrChyQjpnz6AEj1GAzux E+3yBwwZ/tFyTqlcdC/21mYVXHynylQi2YuTXpvuW917Kjqife+XqkWYFWQzqfVq+qAA7n6VYDw ypPDRVorC84imXoLpKXK98BDfETTD0w9MuQqSoeQXAydIKI93iZbGmvnT0n5LM7v4ZRja5xG4Wg K9F4C4cl+FMVyXUeWpcOK7z7HDKKvZitNkJMPTKGCpSG9toJPBeYhbLde79BwlUU9Atc1CTE63s P4h15Vg6BpleEwTxVcn0q66n/f9bylIxMUHb4DA4swKcIFkWEJef0/cGrG2EOlyElSwJEELU68e kBsPFg343+A2YgffVnGac5++GYyYqFWtCEdl12nBA4PdhJ7HYdI+6gE7xnZzU51tvxZRbZ1mfSs yJcbNWEMOuE0EnA8WOD9pFx0kMshvQ/mcYA6rK5QefP/exy4110uWJxmAs08ySg73umrzc644Ux oDeFNOvWXhQaW7NGT/bUeU+hT9/NBglZX1WX8q6PwA0E8DsCCNToy4xtzqqkDei59Vd0Vy8DoMR TIS5IoNtOwDMt6OjzIfuJsewT8KRjl3TPKPSw126k5ODK9XvY7DEsUv4eKhjbq85M5qjqFOhyaD OnGoBk2dIFXz9yA== X-Developer-Key: i=krzk@kernel.org; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B 'struct snd_sof_dsp_ops' is not modified by core code, so it can be made const for increased code safety. Signed-off-by: Krzysztof Kozlowski --- sound/soc/sof/imx/imx8m.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/sof/imx/imx8m.c b/sound/soc/sof/imx/imx8m.c index 3e0b88002b4f..4ed415f04345 100644 --- a/sound/soc/sof/imx/imx8m.c +++ b/sound/soc/sof/imx/imx8m.c @@ -411,7 +411,7 @@ static int imx8m_dsp_suspend(struct snd_sof_dev *sdev, unsigned int target_state } /* i.MX8 ops */ -static struct snd_sof_dsp_ops sof_imx8m_ops = { +static const struct snd_sof_dsp_ops sof_imx8m_ops = { /* probe and remove */ .probe = imx8m_probe, .remove = imx8m_remove, From patchwork Sun Apr 14 18:47:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13629223 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B13CD13774E; Sun, 14 Apr 2024 18:49:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713120545; cv=none; b=tUUwmTDk77FcYgjZOqFglH0C7QiFIGNnjqt0ZT02XMkvpWg0rP+ez7YuqZ8OtWvGOnZB5V4qtojcfN6KiQVShxxPM5KbwKUS/BSDAE9rzLP8EXelYUwEGH62D8iWEzwr3hCZnDXuxScCsoyH9ZF04NGaDK46OC74FX4XdUJKixU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713120545; c=relaxed/simple; bh=jtqJAvdCzVf0KHLlWMGtcqe5mcAFkufBUSxCwKo/4SI=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=DD+As8XkKRFLcFyC8kQ4iyBIpkHEYVgrXe9XCy1+7rSMvSL76Uko0XJ3TUQffo2y416xmTToyYZXx96ICnm86wiS4nF7g85NO/TSE/EKPVlTu53600y2UXdgn8aFy14dlq9lvAEtAX1J6Oma+EhqNMFjs7f8NMgaL2bsyqhquco= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ReQCdqbb; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ReQCdqbb" Received: by smtp.kernel.org (Postfix) with ESMTPSA id C0964C3277B; Sun, 14 Apr 2024 18:48:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1713120545; bh=jtqJAvdCzVf0KHLlWMGtcqe5mcAFkufBUSxCwKo/4SI=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=ReQCdqbbnH0DOQNUXYk+seYVigCJ6US4GhxHsxbg3kGdn9Bc7qDo9uJyYrvcRuwLA H6jjvpo6rj5ZpGdJ4K9eq3a3VbAvyDFp9oSCv62ZBjm+df7cVSJOHTXBiM5sq6E+Ms oS+lZ8H51876UmIiL2YXy1PnFcOiARZ7dbRENiVb6rqBiH+CS2+vOzJ2mlXX7Po7GJ cjlMvRfWWsNDMfzv3X+o5oUx9TzCkBGe7czfzt84JpZ6mvgeyMc/lQ7AlXTC9CYHiy oq3cfQ+uoWazQM/gxEl6wqX2TReFJUAUERy6yxzH0Et7+VcTM1b2jlEOugW/hgNT9V sroNSXiqnC6JQ== From: Krzysztof Kozlowski Date: Sun, 14 Apr 2024 20:47:35 +0200 Subject: [PATCH 10/14] ASoC: SOF: imx8ulp: Constify snd_sof_dsp_ops Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240414-n-const-ops-var-v1-10-8f53ee5d981c@kernel.org> References: <20240414-n-const-ops-var-v1-0-8f53ee5d981c@kernel.org> In-Reply-To: <20240414-n-const-ops-var-v1-0-8f53ee5d981c@kernel.org> To: Pierre-Louis Bossart , Liam Girdwood , Peter Ujfalusi , Bard Liao , Ranjani Sridharan , Daniel Baluta , Kai Vehmanen , Mark Brown , Jaroslav Kysela , Takashi Iwai , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Matthias Brugger , AngeloGioacchino Del Regno Cc: sound-open-firmware@alsa-project.org, linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, Krzysztof Kozlowski X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=759; i=krzk@kernel.org; h=from:subject:message-id; bh=jtqJAvdCzVf0KHLlWMGtcqe5mcAFkufBUSxCwKo/4SI=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBmHCTMZvIPE90QIjHh4JDJGIIE6imTFU4GmmswP yyXSkheG0yJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZhwkzAAKCRDBN2bmhouD 1y2NEACXCTRj2D3a4ADYFmh0jZtAPLpxvUIiVRHBk53PjOv4nRt3dZgoFazC/j/O9Z6jPXNgBTw cIJ7hOguwi0gL4UijZ1ydMf4AfVdMMg3F6icDvFXe4iLt5RASdBTdQKw/7qXXo0Emse0B1xHJqw ncIPWBAslfh+FRlGVBjE+HL3/CfKdnUjvf2prGZVCejhAEZKiV/AtWbZ8QLkjkn0XE2vcmHz9KU YcdLpLdR3HHHXJXsBu2s+QL6KCnLI5pvzblSY6bmro+ah0ycU792HYJps7IvFA/ONgR/gFemL4r 3nNTtrNVejmifOi7VR/SBNgoKR7CzUOiLQ+rel8ByH5Xzj36ZryfCyNeWPx67ZmNKFvFB4IVSN0 RGQpGuGdqYm004sTagDasOceIBUsznRdNfmZkXbl0n/6N548l6vE9/VuIOPFXDkrTpZfLOhimZo mdqNF5HHbr7EMqaWAnAMVL+olJM/gdSWWDrutkZQQkNUJxYXEYoNMJwIOPJtdbsbdK1vqEtIzZa YgghG20mcoK1w0aoAK6nhp1MA/sAcwAN6+328yW8QFZ39W3LF/gMLOEp7DoqrxhUnAv9OZ5WH66 CGfBWS2ZPpUTbU6Z6n87+Q+e/v+sz9gf4XsChST06WomtmYTTaFBk2NhmkFTo29FyKCOxrdhsiH 66madR3UGdgLN9g== X-Developer-Key: i=krzk@kernel.org; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B 'struct snd_sof_dsp_ops' is not modified by core code, so it can be made const for increased code safety. Signed-off-by: Krzysztof Kozlowski --- sound/soc/sof/imx/imx8ulp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/sof/imx/imx8ulp.c b/sound/soc/sof/imx/imx8ulp.c index 296fbf11f6d0..8adfdd00413a 100644 --- a/sound/soc/sof/imx/imx8ulp.c +++ b/sound/soc/sof/imx/imx8ulp.c @@ -408,7 +408,7 @@ static int imx8ulp_dsp_set_power_state(struct snd_sof_dev *sdev, } /* i.MX8 ops */ -static struct snd_sof_dsp_ops sof_imx8ulp_ops = { +static const struct snd_sof_dsp_ops sof_imx8ulp_ops = { /* probe and remove */ .probe = imx8ulp_probe, .remove = imx8ulp_remove, From patchwork Sun Apr 14 18:47:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13629224 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7FE4913774E; Sun, 14 Apr 2024 18:49:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713120553; cv=none; b=sHg8KGJXdvkv/LQihridf6w5DnLWX7wL/dPNjKjMIll18l586Dpbhvojve9nNrB9Dqb1VyAhU+DM3tPktnTbsv31El9LlI8lgyCvQrjL6NpOnS7XQ2hFw/g2PI7FDxzEuXZCohnTgSEJIkFSEKbD/J3rh1wP92uq0oO0/pSmybg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713120553; c=relaxed/simple; bh=Db4WsSNM2FgoOQSGgEU4G93ggGnc3OdLIs1I7eFzzWE=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=K4OoYuIwe0naYiggwVDqcn9rq2K+mi+077j3HM3oK3VDLnASMUg3+1nlscOeSJj/vnGyXeZfmOpZJGvMI7nrDFqnQ5yG9++fhhWIMrmxjcblHkC/0mxZl5d6bK28oMwpG0DiWRDq/Hznwxq7HYCJOfN2ur+qfb4jfM0oPiytYn4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=VmS/9jly; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="VmS/9jly" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 29AD2C3277B; Sun, 14 Apr 2024 18:49:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1713120553; bh=Db4WsSNM2FgoOQSGgEU4G93ggGnc3OdLIs1I7eFzzWE=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=VmS/9jlyQ4dccHlLXUaQHIkl1zQz5LAXsDlXSjtbsDu4aLEk3nOGz1aktC644SWOS y33TIrNdE+g3Ze0eFdtUM/xU93SvPXSC991p2erQSZomhATgtVC4YuWHbC+Ut1ZbTb 4Igc1DZr6P3JstvjAzDKjq22aIztDWtO42G1C7Z7nSD00A/Xm6slmqbyK6ncrx+iae BZ/FHCwhwenCUKQtxH5afBzPONqmCw6dLhJAKjjYVxDPoY/x0RvKafavlZ9r+SR11E gMbk7h8YF9CSDtqe/f8SUxO8xvAg4v5pr9/bBfUBaJpoGppoUEBCcka+IN5lJZFB/d PADRZ8PgFd8lA== From: Krzysztof Kozlowski Date: Sun, 14 Apr 2024 20:47:36 +0200 Subject: [PATCH 11/14] ASoC: SOF: intel: bdw: Constify snd_sof_dsp_ops Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240414-n-const-ops-var-v1-11-8f53ee5d981c@kernel.org> References: <20240414-n-const-ops-var-v1-0-8f53ee5d981c@kernel.org> In-Reply-To: <20240414-n-const-ops-var-v1-0-8f53ee5d981c@kernel.org> To: Pierre-Louis Bossart , Liam Girdwood , Peter Ujfalusi , Bard Liao , Ranjani Sridharan , Daniel Baluta , Kai Vehmanen , Mark Brown , Jaroslav Kysela , Takashi Iwai , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Matthias Brugger , AngeloGioacchino Del Regno Cc: sound-open-firmware@alsa-project.org, linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, Krzysztof Kozlowski X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=699; i=krzk@kernel.org; h=from:subject:message-id; bh=Db4WsSNM2FgoOQSGgEU4G93ggGnc3OdLIs1I7eFzzWE=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBmHCTNXyPnD1k9PhT0IGglQogIL0hIpkrjzGLbn fTJ1GhAAz+JAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZhwkzQAKCRDBN2bmhouD 11o/D/4o/aVI6rNfgMctgSxzfRhCLSZE8MUPowQU6qt8JnDQXZCNgUGqXls89ap+m+sgna8TkUn C+Rw8fYNENZXviIemO9yqJirzRTqmIsID0whZ4Gj/++XWPshkF8Ruqb502ps0qg6hHfm44A1UL8 vZ55c82xWdaO2sfoTUJruIs9+HO+X1eXlSDOi83q2nLekxwPxmvbctKx/OkgR5fitGIYmnukz6v 0I1jr2l++iphrte5SJr9KXqALBYj/bZEdCiymT+2v/yxYbNDQ5G4EKYbNJHUw+k+K4Nro6VRZs6 2CLUBqvGb5QvEzzT7xZg4AkI/eli0fCkJ/5OGPwkVpEiakyknR7RfYXPVp2mXsuF+nGMKsFVwM2 198rpkov9I+yg9+PwJUAuA0z7V1bKY46I62kaeaOOdQPg7tkLYmfAsOdc/kiZKr6yYtc7ztPJkW 8V08A2oZNAGz/Giqhu3RTPgU8uKrc5Tu9dVIVVgZyFMPoP+afiqAv/bnnaLE543O3d6hdizzANI ztTZ5zExCDDYnNywGeP7jxHBNzevpZRYuylv/AtIniOuTLHl+J+4A61CrV012dY30ssG0YN8Lb0 vQDMuO9ApmJZP/mkzyynvkkzbFAircRrSG9Rlnzvq5fz6iPJ+8Wmkyex08xOZkPSxBHbVUaQ9SR fjgVeEn/HCCplxg== X-Developer-Key: i=krzk@kernel.org; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B 'struct snd_sof_dsp_ops' is not modified by core code, so it can be made const for increased code safety. Signed-off-by: Krzysztof Kozlowski --- sound/soc/sof/intel/bdw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/sof/intel/bdw.c b/sound/soc/sof/intel/bdw.c index e30ca086f3f8..2e8926cd00f6 100644 --- a/sound/soc/sof/intel/bdw.c +++ b/sound/soc/sof/intel/bdw.c @@ -567,7 +567,7 @@ static struct snd_soc_dai_driver bdw_dai[] = { }; /* broadwell ops */ -static struct snd_sof_dsp_ops sof_bdw_ops = { +static const struct snd_sof_dsp_ops sof_bdw_ops = { /*Device init */ .probe = bdw_probe, From patchwork Sun Apr 14 18:47:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13629225 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2ABF613774E; Sun, 14 Apr 2024 18:49:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713120560; cv=none; b=hQlo2/Z2VfPgVFV7PCB+xxF+cXeVEfLjADGlNr+EhfVRf5FWd84WoV0tLAvImcLN/o2MdKkD0slWtFtn7l8FwIjx1sx2m/rN0vffHWLub33tvarDoXYKDMdgLpzmlM6kf0+A6owLA6whl7ihZZ3+T48o/ai9aysOjBxg60qeYEw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713120560; c=relaxed/simple; bh=HDCjdUZ9nbqoLbalVPVe/UT1SONcMJH2I6HWQBc1Bwg=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=BSQie1WIrcJ57W+EwQdJqR9bntEHMhL2tdAe9eRsvXjAevXa2FA4WO0UYH/0375HGspNJSan24QLJXEdXC1DKCpcYLJAobk+u2czyo0/14JbPuVylsFGNiyXbnP/b/Ku+427ysud/uZTW6aoE/42xmL94jVmxkp8IPMCwP+/HRo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=D4UezHTK; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="D4UezHTK" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3ACB5C072AA; Sun, 14 Apr 2024 18:49:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1713120560; bh=HDCjdUZ9nbqoLbalVPVe/UT1SONcMJH2I6HWQBc1Bwg=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=D4UezHTK7gkYSB8U6BP8dGprcFYlx6MXcQcpiIzrnlGi6/cU5fo+9FSsCxX+8YQT1 ICz+VHyKvRbQedDXb+hZ/BiPZjYWtb61XAUQ1RcwwDkWcuViR2PFotNitqgUkVxg5E UZaguPyyN6f3pfg5gNXoabh7xY3uKe1OA/dtJtjEu5M2NQJjC0jEehJ8foJeBV1L6A aj3ZlJmhtbccpoKMwjDJ7/6P16FaJcuS0ECCJCyQk+TI3TzM2/oNsMdXu7w3QEGETd zsxayGMGN8DxkdU59fDgtoGl7dPLOTMCNymOIcl8O4bu91QV7TRsy62q3n8b8nHbuR y4PsfImOyuRow== From: Krzysztof Kozlowski Date: Sun, 14 Apr 2024 20:47:37 +0200 Subject: [PATCH 12/14] ASoC: SOF: intel: byt: Constify snd_sof_dsp_ops Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240414-n-const-ops-var-v1-12-8f53ee5d981c@kernel.org> References: <20240414-n-const-ops-var-v1-0-8f53ee5d981c@kernel.org> In-Reply-To: <20240414-n-const-ops-var-v1-0-8f53ee5d981c@kernel.org> To: Pierre-Louis Bossart , Liam Girdwood , Peter Ujfalusi , Bard Liao , Ranjani Sridharan , Daniel Baluta , Kai Vehmanen , Mark Brown , Jaroslav Kysela , Takashi Iwai , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Matthias Brugger , AngeloGioacchino Del Regno Cc: sound-open-firmware@alsa-project.org, linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, Krzysztof Kozlowski X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1028; i=krzk@kernel.org; h=from:subject:message-id; bh=HDCjdUZ9nbqoLbalVPVe/UT1SONcMJH2I6HWQBc1Bwg=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBmHCTOgSv/AebgOX4MZvM+Uh75zPZ0Rvctqm5Kz AmlxIeXz5yJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZhwkzgAKCRDBN2bmhouD 1y/6D/4z/POCI8W7rkjUkLA0M+QsTfEAS2ki1DPELX7wk/YqHgSOolz78b1M7laKFW2+QCZW4fV rKZ3oGlTY8sxvrDOkjRcE2/L9LGcQyaZvtafXCvBF7OobozCO2KLn1P9Tz82SoU7L51UGPfUzbv DBwEL+8qzHNL2vKBy2ELBepSeb44RvlsQ8bY33CnW8oZUqcnNoYI6SU0ks81RpX7YVO8e3NDIQT aOQRvs/RJ7GsxZhWBlR0BCsStYo0f3bo0i0JrzuBgnim3bsr4+/FikmTT5J8aAPctCo4a7ar5rk ftqk8nL+M1zF4gmFEFBpqmeeuHEvypXA59P60SGLzqV3ju904VAGx3769t43JH5Z/MEmZvfm73B U/AG+h+2d3l0bGCEev6eD6hdC6/cu1KBpoQqhnmb6owYg9sXOno1dfaPHr5fWL38gT74USUCZzu j6xyrbRvMVKIvIoLr6StR35+Ah2VFi081knqkJNWghEd2wEOjYPCmtAd50O0RYIBZTVKijDU0S7 7mJxwJKCBfhAOELf1Ll+r9VL85TXwThvz6r1tP60Ix0IVilM7I4r/+BoLtCJNe/bhbxwyG4ps3D wNSoXzLjeFdVFZ8fYdBpZDFtwkS3HDtDKgaqTFdGsr4N0wgpdm04zgh57ciWanELUhIIkDku441 NFAEvaNp4sgXogA== X-Developer-Key: i=krzk@kernel.org; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B 'struct snd_sof_dsp_ops' is not modified by core code, so it can be made const for increased code safety. Signed-off-by: Krzysztof Kozlowski --- sound/soc/sof/intel/byt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/soc/sof/intel/byt.c b/sound/soc/sof/intel/byt.c index 373527b206d7..14a065999a89 100644 --- a/sound/soc/sof/intel/byt.c +++ b/sound/soc/sof/intel/byt.c @@ -214,7 +214,7 @@ static int byt_acpi_probe(struct snd_sof_dev *sdev) } /* baytrail ops */ -static struct snd_sof_dsp_ops sof_byt_ops = { +static const struct snd_sof_dsp_ops sof_byt_ops = { /* device init */ .probe = byt_acpi_probe, .remove = byt_remove, @@ -289,7 +289,7 @@ static const struct sof_intel_dsp_desc byt_chip_info = { }; /* cherrytrail and braswell ops */ -static struct snd_sof_dsp_ops sof_cht_ops = { +static const struct snd_sof_dsp_ops sof_cht_ops = { /* device init */ .probe = byt_acpi_probe, .remove = byt_remove, From patchwork Sun Apr 14 18:47:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13629226 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D7B5D137911; Sun, 14 Apr 2024 18:49:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713120566; cv=none; b=ia/Nz4aDn0hhMqwxVFfQ81O5WgO20mefZmmgibjzNPZltnKJ6FUKXlDIAK80v+2Z4ge+iyfqI0xQ+3CdM+RSCYI/r9zG1YXqr5fHMkKY0JhvfT4Tu5PcGf+9kL0Bna90qMwtE3mtshabFrUjyTxOPhFmgbjDsuDwuvRipWuTGq8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713120566; c=relaxed/simple; bh=PTqTHg6RfiqGrMd0uUIo4Ojcwe5ZdipOblCxCj/1tgs=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=AJwkeQ27e9ZvbasFgGbAvS1MRH/XzM5WVTMd2m2jgCYdA3ZfS5SOulquYI3TIw6EoZC+SVEyg8qHizqLlP2A8kDV2y46Xker+H3MLOP6t0bwIENJuxYljEV9+j+zus1creSJrVfwbRs8bbAYrdfEExGZK0GV80pCpWJ6aMmQrsc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=IwATu6cR; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="IwATu6cR" Received: by smtp.kernel.org (Postfix) with ESMTPSA id C1463C32781; Sun, 14 Apr 2024 18:49:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1713120566; bh=PTqTHg6RfiqGrMd0uUIo4Ojcwe5ZdipOblCxCj/1tgs=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=IwATu6cRmszBY4gR2PIa7SDexM9molkMbo+DqxHpgMHUlb7fjP4I67pfkyikAvx+B 8AUIgr8XobjSReXhJrt1DSZTDiMkg47rDLyrrH2JEgeCFU7D+x9Hs5eu7t2gipbk1R XrlvZPZLHf85cZ4ATNly05hbHOG+d46hywerfCOCPPS/rTzOwVBMdFNJCyESfhi4/d U0vid3hw78JLcntpuEAhpRiFp+9UiQy0MjdFVRHZet6M+Fcb1mAmrjjXg2OG/CKjpN AL7C4C4DFwdg9cmMQm6LyML3hPjmMJtVd2hzv4P4KDfUSipX4A9Z03nQzBSN6Qoo5C 1Fflvm3LQo+mQ== From: Krzysztof Kozlowski Date: Sun, 14 Apr 2024 20:47:38 +0200 Subject: [PATCH 13/14] ASoC: SOF: mediatek: mt8186: Constify snd_sof_dsp_ops Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240414-n-const-ops-var-v1-13-8f53ee5d981c@kernel.org> References: <20240414-n-const-ops-var-v1-0-8f53ee5d981c@kernel.org> In-Reply-To: <20240414-n-const-ops-var-v1-0-8f53ee5d981c@kernel.org> To: Pierre-Louis Bossart , Liam Girdwood , Peter Ujfalusi , Bard Liao , Ranjani Sridharan , Daniel Baluta , Kai Vehmanen , Mark Brown , Jaroslav Kysela , Takashi Iwai , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Matthias Brugger , AngeloGioacchino Del Regno Cc: sound-open-firmware@alsa-project.org, linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, Krzysztof Kozlowski X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=805; i=krzk@kernel.org; h=from:subject:message-id; bh=PTqTHg6RfiqGrMd0uUIo4Ojcwe5ZdipOblCxCj/1tgs=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBmHCTPy0Vuz1BCpQH16OSjw800/AKgJdci1kr7g iuRvvsvesiJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZhwkzwAKCRDBN2bmhouD 16l5D/9XYqMivdns13ObQag4GyuRKauiWiecnojrhow88jGtYdXBY7+jBn365wZvR9WRWZCMvwK 51RrmDEO/WWeBCXADRmQPj2BhveNuH7fXlhKVhdL5Db/XhC6JqCD8nv5xvsUuuF6YQ70L/Tr24c hH2iKB0UidxHYxdkHmNzv/EXNA64W6+dsAIUsMbaM78sCDD7Lam9eUd59UkYzWvGx3h/KbI9W/H ZaPfqISgobcvuoetAEyzbLuDdLy+SYe2XvP0rLpg9byDRvPdHgNzFDKcMVcmBg73MlxfWGjGqjF xryOFNwxg2BBHHGEaiXfDFmUoU897EoeGsHDSQaSywILHigt32lhCbrQUp36CsRR04sbxNDp0gQ WdDNYHTTXFlPK7g+ainTKqvFZXwJc8TP2Krxn3ygqxHNQFNBFbCKOPLz/SyjpzaFQV+9PwC+nN1 8uYEyHSpiaOqaOchTXMGIEQIQfxYx8sLe2JCZ1f3ylfQltQQzNihuVU7vPHEZBck3g9HRwxG32v xkJsLHxGt39rwFmq6+Hjv6sbzStih9HZwiLRmLVzWsD8Q5W0NeeD4/6yd6wLfVj6cQK54UVhrjw X41Xya6xAI4CLx0szmdhh7SbwLwQJ2c9OdmK8D24keawTloMzF7VkfUYKUSpXahdJddTEaIvNd2 SnHjFx7gm/+DvmA== X-Developer-Key: i=krzk@kernel.org; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B 'struct snd_sof_dsp_ops' is not modified by core code, so it can be made const for increased code safety. Signed-off-by: Krzysztof Kozlowski Reviewed-by: AngeloGioacchino Del Regno --- sound/soc/sof/mediatek/mt8186/mt8186.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/sof/mediatek/mt8186/mt8186.c b/sound/soc/sof/mediatek/mt8186/mt8186.c index 0d2d7d697de0..c63e0d2f4b96 100644 --- a/sound/soc/sof/mediatek/mt8186/mt8186.c +++ b/sound/soc/sof/mediatek/mt8186/mt8186.c @@ -481,7 +481,7 @@ static struct snd_soc_dai_driver mt8186_dai[] = { }; /* mt8186 ops */ -static struct snd_sof_dsp_ops sof_mt8186_ops = { +static const struct snd_sof_dsp_ops sof_mt8186_ops = { /* probe and remove */ .probe = mt8186_dsp_probe, .remove = mt8186_dsp_remove, From patchwork Sun Apr 14 18:47:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13629227 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B4201137920; Sun, 14 Apr 2024 18:49:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713120573; cv=none; b=nRq6VSTe3LWiq1LXPegc3T8oov2J2WSze8eHCefwj8Wge4kQh+U5FXKC69BrcX+563XEaT5EN/WdV8zndwoM2EgXQQ5g+/zkTV96aglYy70zRUCV6NbchWkiu+np2dNO/ILnWjMV/U/x5TrEF9ZtxuVSx102YKd8KGb0SErEBLs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713120573; c=relaxed/simple; bh=uQ+S648l3NSz9IkZmbPzGnp5Cl0axGVfcA86WU5fpOg=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=fyPV0zPsXzV57YMX4Vy/Cx2JnGkMPC5eh8cQCiWb7Og80wdvWKRV2UC7ipUYY6vmkZPyt2vXgOP/UshNkmej0yoQz7lc28ffqIK+wcAIvMUHdXTI7XXD0Krz4riRouqCDskoF2Ashq0V7aKQx7o+/a1/Q4PtRVJhQfj2SqR5ZAM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=eiAtfsJi; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="eiAtfsJi" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 357F6C32781; Sun, 14 Apr 2024 18:49:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1713120573; bh=uQ+S648l3NSz9IkZmbPzGnp5Cl0axGVfcA86WU5fpOg=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=eiAtfsJiikEqdcr+79VZ0KLx7AOXG08ERkM3TDQN5wCxSAFVD8YpOGqVpW4tS9Rw3 Wn26J/SZaTauJoaHGH6+uaUG492rkuKKOm4xiMPC4JK84sLpEgv/othNzDupLaRR3o mhWLm8S7vkz5iAKftgIs1WK4SREUhefAzCDsjOgOMpYbh7PX8z6FIFtN00soXrXQlq HbnzTOj8SLt/62K8FSqU1c/+d56SE5jCwmSJ5nEIEVa56bD6Uc2bhjBa4z93hqnC1u Tnr+J12+YFvwpGUl5fM1nK5AraIHuJcVzHBrcpZqj6TEfLI4Z+rOtJ2MfyZ2JIqAYM gq1pPwN1HzuCA== From: Krzysztof Kozlowski Date: Sun, 14 Apr 2024 20:47:39 +0200 Subject: [PATCH 14/14] ASoC: SOF: mediatek: mt8195: Constify snd_sof_dsp_ops Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240414-n-const-ops-var-v1-14-8f53ee5d981c@kernel.org> References: <20240414-n-const-ops-var-v1-0-8f53ee5d981c@kernel.org> In-Reply-To: <20240414-n-const-ops-var-v1-0-8f53ee5d981c@kernel.org> To: Pierre-Louis Bossart , Liam Girdwood , Peter Ujfalusi , Bard Liao , Ranjani Sridharan , Daniel Baluta , Kai Vehmanen , Mark Brown , Jaroslav Kysela , Takashi Iwai , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Matthias Brugger , AngeloGioacchino Del Regno Cc: sound-open-firmware@alsa-project.org, linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, Krzysztof Kozlowski X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=805; i=krzk@kernel.org; h=from:subject:message-id; bh=uQ+S648l3NSz9IkZmbPzGnp5Cl0axGVfcA86WU5fpOg=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBmHCTQ0H8PMFuGVM51N5GfYEFfknVy7Wcjmiiwt 43bIx4ypMSJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZhwk0AAKCRDBN2bmhouD 1xqKD/9NDtfWOgNmQGNrhyx8gyrXKfwSIDBIaqa5HHvwGUzbkT2Y3ROKNtSGB+/7UYL7KhtXR4H gKNGsnKTAGyeDXtAGyQd1hLupkbTd6+p9UFkgV4cuGMTfBUZC5Y8ny5pMSmgWqMGUOb2vMnZwgm RCF1iSsFygSvRC+ikIES5ZWQTGSt5WIMWmIV2+yRiYOopUPsG4NePPkrV11fHrBcjeVtcbCvKHj +hpnW3WeyLnGLMQbwlITgtFa+OUOQ2dgTKUGQNSK8zVcUoaASoeOQUnupH5rkuCzCSePm8gtoyf /CCh4QW+swNq9fhLyRAcuafehxbsbLU8Va2Mr7PX1Im/MmKifR/eIqTY/HwK6ac43Sn3ezA3a+a Wi5g9D6oVQO+iVcvWnDr5NbMVGdrYG3hOvqQkJNeuMec90Jrr6xcrRMNtUdBGN1jVAjF7t9lJgy /7tRkDgQyPaSt6F77UfToAceeC0Dfx8s9VmIUjHZgavbgXiVnOeYvFL3gqhPxKMCCDdbG51YjYO pczurvBtz9+Nh5DUZOkKleoSMQvNs4DhpDRzS0NYJhmfYcTWboSdDHReANirzMp+a7D/cQE3C82 DBYswsZXuklU0MnOccqVU5n0CqOj6Sjv174g+w1qEE+5CCSA4lSALtZacDRT9Vkb1iMBNWXOxAG 71E1iAysInF4j4w== X-Developer-Key: i=krzk@kernel.org; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B 'struct snd_sof_dsp_ops' is not modified by core code, so it can be made const for increased code safety. Signed-off-by: Krzysztof Kozlowski Reviewed-by: AngeloGioacchino Del Regno --- sound/soc/sof/mediatek/mt8195/mt8195.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/sof/mediatek/mt8195/mt8195.c b/sound/soc/sof/mediatek/mt8195/mt8195.c index 8ee7ee246344..fc1c016104ae 100644 --- a/sound/soc/sof/mediatek/mt8195/mt8195.c +++ b/sound/soc/sof/mediatek/mt8195/mt8195.c @@ -505,7 +505,7 @@ static struct snd_soc_dai_driver mt8195_dai[] = { }; /* mt8195 ops */ -static struct snd_sof_dsp_ops sof_mt8195_ops = { +static const struct snd_sof_dsp_ops sof_mt8195_ops = { /* probe and remove */ .probe = mt8195_dsp_probe, .remove = mt8195_dsp_remove,