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: 13629199 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 0DFB3C4345F for ; Sun, 14 Apr 2024 18:48:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=W2NfhZ4zBgImPiaFf4L+cBnMafTIYJHPGTxTQr4ZtrA=; b=WgPrW6XMhEe1G8ItT2spGsdQfC g3mIK2rCCXbmuYqBnfY1O4kkgiod2heGQmclfQLMWp4zGu4JG/YBWLGHFRRVKH672b6aHx9MQQUaM E7HEg+bZiMwJpK/bye3dXC3wYfmOIcJh22TZH13B1ENQt8BEmxZVssa662/3PH6HYrd6dN/dXEp4I +7AnN7owFmS7OU4rjYAYbAMgWdRcprF7D0FaJPY6OlRrRy6n1L61yhBQwHc+4WgCd/RNFlrBXd7t/ aRq8n9ZHmf9XeStP6m5Pe8/XClm/d/noDnszJtKUfG0z+us2gQMoA708XHAwcphDG+/TNwhdlYZNp lvhbsaaA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rw4tr-000000067zP-2TDk; Sun, 14 Apr 2024 18:48:23 +0000 Received: from sin.source.kernel.org ([145.40.73.55]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rw4tY-000000067gj-46nr; Sun, 14 Apr 2024 18:48:09 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id 6B0DBCE09CE; Sun, 14 Apr 2024 18:48:00 +0000 (UTC) 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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240414_114805_761137_DD7F178B X-CRM114-Status: GOOD ( 10.21 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org 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: 13629200 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 C5DCCC4345F for ; Sun, 14 Apr 2024 18:48:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=rvHz0kxPgjV4uYrpxPGWt5Cmr41dkk+KbbozEhObFFQ=; b=NCIKM9PaRKFyxVjXSLlCSn3Soy 82+Yu1zumE0n3qiPFsPSD74mn2xYDav854mYEO2b3Lii34NeTL3oYWMSN5JvutqfpzpgFvwVvtJ8M pVjgR23M6P2LsHAD1DLNjDiY5upi0wi0yRROHVdgjuEEOsT0po0BmfDJuHrbQGC6FG3PU6DWt+6jR VIAQ+r8p8Ec3eJ0GyntvlBrCkVmCKtaakVE9oRxB1yMG6/aiuR5PbTiTAarNdB9NLxkcZJzFBkaeJ T1V9S+aPkXQGzY1rvyvF9yGJGzw2XI/tek22ND11lN7h4tv7L4lGnV7GeaA1s5bw11+syVFEqs2cE 7SX7SEqA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rw4u0-0000000684T-0lgm; Sun, 14 Apr 2024 18:48:32 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rw4tb-000000067oa-3AWE; Sun, 14 Apr 2024 18:48:13 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 099B060BA6; Sun, 14 Apr 2024 18:48:07 +0000 (UTC) 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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240414_114808_159290_3CC63A63 X-CRM114-Status: UNSURE ( 9.84 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org 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: 13629201 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 09956C4345F for ; Sun, 14 Apr 2024 18:48:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=hpxzCpTVHzOUUyydX04PKEVYFO1qqvlYWk+TsgS5PLI=; b=ekU0DZ2snwb+oTsRIDeD7hdgGr bWkorgBdf5BhwxolYu152XCgxFYLMSwUCT2W3ClPpgkZTTFyB7+ybQ9/ZnJc6z4JnzPsgY5WfDdgO Lu/JIH8SqqJDI2GREp/jx+Jl01zQMj1Frlc/jzbbiFBCnkpjEiTPDIbpePUZYaquuDh3IYNb7kw3T E8d2YNUZybcIY4zuI20hWg6wpAO+IbK7McszRCDQtCk3Fm74vtGI4c/XC+kt2ABkseoQmV2cYoEHb P3VCTGY1G7LMLeKj0Dgru2PsEnhA/lQIysuVQgb672TMm15odwJytOZZ0I7aD7QpkFzQf8pOv2UWl E4QN/ViA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rw4uB-000000068BC-1rGp; Sun, 14 Apr 2024 18:48:43 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rw4ti-000000067ty-2hwp; Sun, 14 Apr 2024 18:48:17 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 0320D60B94; Sun, 14 Apr 2024 18:48:14 +0000 (UTC) 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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240414_114815_112364_9D92CA3D X-CRM114-Status: GOOD ( 10.42 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org 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: 13629202 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 8F782C4345F for ; Sun, 14 Apr 2024 18:48:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Q4gMnb7npsTmK07ih6lOHpmSt2KDN+hCy7eULnCz+SM=; b=k7C520BGOJRZQb9TtMN8Haaxih mDBxbSkhNPvFN+UTzVInWrPXifzv7Z9MvXCnUb3eagEx/wO0mB0p/i5o1CZib1bgxyxnvqh/HgrQ5 5RjMu7ZQmONE4Yrp+W4SlFwdux0asr77sGtaP1EO6bP8fBzO9RenwjHMn40XeXri80+RN4obfth+N HZDy20CYoAILM7IvuIbA5RwAezfPWIt5xJi1EnqT6EisZRUW4d1cdPQjsZoXvBZEI2pCLGF+Mr6cz aUgmlixuba4HQWNXFY4x0F7+Q9u9L9uubwFmvpjgxj2eKTxCcSZPVQn8FuKm9ZV7i+JXxL28gz02I NdiJx9HQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rw4uL-000000068HT-2YDo; Sun, 14 Apr 2024 18:48:54 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rw4tp-000000067xt-1DVe; Sun, 14 Apr 2024 18:48:22 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id BCB5560B91; Sun, 14 Apr 2024 18:48:20 +0000 (UTC) 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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240414_114821_489872_7445E287 X-CRM114-Status: GOOD ( 12.13 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org 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: 13629203 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 E42F0C4345F for ; Sun, 14 Apr 2024 18:49:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=XFE31UIMDaG6JvwrkhTecWOoMebzfa7/gvpxMHW2H8Y=; b=rfk/Eo7Y/E5bIQcdccAoA9FKji asIMygzhyRG4+DIUz8dNKbtbJC+oDgYa1PU+IepWita58uBbGQFgzB3f5pmm/ugiCObIrssAJwObH qCKrROf5dhcbhg8CY4/4b30rQUwebmPbdwox4bcxrAxyUHPQ8LYhoDS4zkqFL5qq/DdJH9OyuBBpu vMhr8MNLNpClquCro2niE8ZHTTo2ZIvTnnFDglWThbyyzMeQrtSRCdWJ6Zxf50iKIuON1BjuUPEiJ Ym21e0mth5P+wqklxogLEcTzkx1bj7tuTK3ZOOjUYEGIjMbLgS28QWXcNzQVxz4GHSxiOx1Dxt2zP MNRjd+PA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rw4uS-000000068Ln-0aIe; Sun, 14 Apr 2024 18:49:00 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rw4tw-0000000681p-3mxv; Sun, 14 Apr 2024 18:48:30 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 5AF8C60B91; Sun, 14 Apr 2024 18:48:28 +0000 (UTC) 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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240414_114829_065231_D9D1EC92 X-CRM114-Status: GOOD ( 12.03 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org '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: 13629204 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 76329C4345F for ; Sun, 14 Apr 2024 18:49:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=GZiWSmjI1JlLrEIipCtL7Pk/V+lmlTYlK0HbAD35HKI=; b=JX/Zjgs3aycxwQrSZZgzgniiAe 9VOVtgTGHe0Gb4VIiJ+1Y3lv9xFkgu538CPj7XXh5HxZynRanVE5VhkmgUAG2ULPovzvdExGeZvjv G3ZhNtbmb+IlJ92zENV/RmSglbbusjDwPxRYg8VBHCKctYZyqXBrmzHkNOOATw5/F0yOUu6f/RnZJ Q5m8t+V6f1+hMdXhi8t1hStR96SVKoI4JwW7e9aiVqpxXSroKkW5WLrcnin95+m+1Z+riI/pURtIn JykGwLQiU7Okmmc2fnUnzJpNZ54hOpRD/nKIPt17bQQLfLHFgu15O8UlVq1nm7EswDc3ejXyURzyG neVbed5A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rw4ud-000000068Um-26lZ; Sun, 14 Apr 2024 18:49:11 +0000 Received: from sin.source.kernel.org ([145.40.73.55]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rw4u5-0000000687Y-1oV1; Sun, 14 Apr 2024 18:48:39 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id 7AEFDCE01C8; Sun, 14 Apr 2024 18:48:35 +0000 (UTC) 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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240414_114838_001611_37B33D21 X-CRM114-Status: GOOD ( 11.61 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org '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: 13629205 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 C517EC4345F for ; Sun, 14 Apr 2024 18:49:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=P3dvtLW51URBbZWQDxNB17M0FfT+KM2ziuYqVfP/epo=; b=mQGanxnBBh1OY+evN/VfYUCowq 0yhva/AL1RBnsaY2qWRcv/TFmMGov9J4shIoZdecsgAXy18N/KuLdrSSdIIKStggyAxBK2lCRVX0s gV/lICKU6QJyJask+E300qzj6XGA8bWWFdN3KhUsEf8CChtj/g29wf435VUstrGfc9N9w+PuMRRu3 udz6d/zN41JqBHSgn0LCuaIRGs1AsvF2fmpVZ8ixDMxQWnj2Je+j5CnjqG9k85cbzNb0oxkzcq+Os mO2D9kkAotWlv8Ml9mZshZSwau8QfhoZoOsOrnk0fgnIIs7yi9ilkTxSYXnoOfxv4VaA+CyythSCd ginPU1tg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rw4ul-000000068aL-0zDa; Sun, 14 Apr 2024 18:49:19 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rw4uB-000000068B9-2R5T; Sun, 14 Apr 2024 18:48:45 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id E7E3560B90; Sun, 14 Apr 2024 18:48:42 +0000 (UTC) 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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240414_114843_896226_7F6AD21D X-CRM114-Status: GOOD ( 11.21 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org '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: 13629206 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 C0887C001CC for ; Sun, 14 Apr 2024 18:49:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=6B+VdJoJqm9pW06J62GS2yHMr7XNQrsXHGgn02xRQ0Y=; b=OgrLwkKfqRAYFrPpgN8hzdizB6 V1jAqp9+ZSagBho3lU1mIpHOVutK8W62V3TMYW7ZvLkKsoWPxMy0xGrB7MnN/QA/DrWLS73tPU+Vw 9WzuIjM3I3v/avywPuPvCyWdf/BugX1AEUTxvbw/V8y8omt5VBbd0RqLubB68FNoyCbIPPFC0+Jt0 ZB/MH/2aNAY8YTNSc1R/zKp3vxNhtC7F42XpzWwka+f1H/KVO4HRbwhOUc7qJI5yGVra/yQWCRrq6 aaEFvI0UC2uD8jj6+sxY2uzyaR0CE/7ibITjHM7Iq2q73jYbGDgrcJXPKymwGgludVY3F9pb1jazQ wwXNiz7Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rw4ut-000000068gp-3IFT; Sun, 14 Apr 2024 18:49:28 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rw4uI-000000068F7-1pUP; Sun, 14 Apr 2024 18:48:51 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id EAB1260B2C; Sun, 14 Apr 2024 18:48:49 +0000 (UTC) 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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240414_114850_670141_6BA22D60 X-CRM114-Status: GOOD ( 11.44 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org '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: 13629207 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 3BFE0C4345F for ; Sun, 14 Apr 2024 18:49:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=PgcnHe1w2hYLC1hQS9sjHFpi4MtTtTupLK8cpmZTYEQ=; b=lGViyImgR8lNuSAbitNgof8v8I wkwsCc9J9CXy/GlpOUc4BXphfSNtgtxii4419HJfOXWKXltAZDD5vDVv9ZpHMQ1XpK+9hGVyiN4Wh X6TXOI2YJIFqIzmsxobo2Yj8XaDO68xKA0JDh0zWoSrJ+iSH3hL5kEaQ1UnB+J7J4dmDr10NRelVq rotsO7cGbs8pdWQnVc/uCJz/4ft8Em2V45alEP/7w3vqn5B9OJbTFBlohzXzVgOEjTYjQBOeGu5aL uGEVp/e8S1u8iwXBtj8SR8bF8LYTIpn8EEFXBaOrsKBvXswqZYAlO7Esd47djwa8A5URhFzrlAigx mGnqqYlw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rw4v4-000000068oB-37pn; Sun, 14 Apr 2024 18:49:38 +0000 Received: from sin.source.kernel.org ([145.40.73.55]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rw4uS-000000068LI-3HV7; Sun, 14 Apr 2024 18:49:04 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id A7803CE09CF; Sun, 14 Apr 2024 18:48:58 +0000 (UTC) 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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240414_114901_407948_64419FCB X-CRM114-Status: GOOD ( 11.72 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org '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: 13629208 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 5065DC4345F for ; Sun, 14 Apr 2024 18:49:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=qpi5Xmvj4ksY/LJGHDMK8rj5d/MpTwz//ARw/EeBCSk=; b=VJiPQtiCWN0oOs27ANBcDP3CcV 02VO8kFwAwBTccds4BWfYVVN1LVA4EQYGnCjVDEClRTz1fmKO7YB0udVSrWwQYsjf93vty5NSbovw B5UODWyqaoDpfS0oXx+Uc/ltHtugs/oAuUMf3XPKqwiMYHA6ic6Cc6rQ0CpifVkfFnF+zupM94b8U 3mWWMkfS9O4kiuHOfHbVt6PzwxEo20HndE8RX5OxupuXi0WlV1osribH+u3hPQi2E4FBCCXHdMfbK 7B/72iK9GhoBFcJ130+eOgwcLxmiQXHlG5+DW5KuW+M+P1BFiqkCx2bHZ7rnpEbP0NfaNBpHl4hsq AjRroNJg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rw4vJ-000000068xk-3XeL; Sun, 14 Apr 2024 18:49:54 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rw4uY-000000068Qq-2sKG; Sun, 14 Apr 2024 18:49:09 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id E880B60B8A; Sun, 14 Apr 2024 18:49:05 +0000 (UTC) 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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240414_114907_137572_02EF1CD0 X-CRM114-Status: GOOD ( 11.13 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org '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: 13629209 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 242B1C04FF8 for ; Sun, 14 Apr 2024 18:50:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=rhFUYQnd2UoHJ97keORYIcY4VVwoEJX2EE/tGJ7HBSk=; b=Dyeqg/3w51W1dmsW/kmo+/0Ibj xHGlaqwU0jTpX+9KoDOf7vfvjT30kYLWzSxgIMS7Iu7rjxJdsuFdn7s7z8hIu1dveSyX9LG/9iAPl 58XnhyCBG/vzYWbFQHPZxlNUPsZxX+iQzawGNwLCS6+ob5WPf7j5MTldcf7hMYHgC86Uo/4Q0TiCj xTMlbURT5+XrT7nD6owtWHvt61vsYdEl5eYjzrKHd+0BuYkIabFkt/JqGj4i3OQSf785MJTxO2ywZ bJ+vXNEFUpQmpVOVJmhPiFSr8BEBcAjBEI9r+B7E7EKnt20H7IUvDhpFOpOAuiOg6N1CU7NvkBn24 WHxXSBLA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rw4vS-0000000694k-1EwK; Sun, 14 Apr 2024 18:50:02 +0000 Received: from sin.source.kernel.org ([145.40.73.55]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rw4ui-000000068Wp-0Bgx; Sun, 14 Apr 2024 18:49:19 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id 21F9DCE069F; Sun, 14 Apr 2024 18:49:14 +0000 (UTC) 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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240414_114916_593306_A7A5871F X-CRM114-Status: GOOD ( 11.00 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org '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: 13629210 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 AAC4BC4345F for ; Sun, 14 Apr 2024 18:50:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=npq1jl/AVKseRY0C2bNNrXDsO9CF0NyEW/U8M7Dna8k=; b=y1Ua5XLq7wft/Fnwo4LTRKrXZ3 J94zCbSgQXZvinpJ41Ruwi+w4kpqzug4pIYWU1t4TNI8HLGaS37vd3TBlSWsUYkF//5lNxW8iqy/2 QFYUEklN3k+SkullAuWDWQjkEdozD5bLfJ3tjaSeLoNnPaQjNKvJN1dKVeCJ3v14a273ZvejDsMK7 17Z01FAiUhSfKH6iuN2T2pap1wZ1AUCeDGerN28Y9AYyQedEvaTW7V6hn0Y9uHg47ZrV4YeNsbC4u PEiXb9vSLk8YW4caeERWtXSfeKyfL1a3gm/7UQhvw7QvYDWigCKuK8hRFxwTDpsmG4ORFXzs5NN2M yyN0wyeg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rw4vd-000000069CY-0TqZ; Sun, 14 Apr 2024 18:50:13 +0000 Received: from sin.source.kernel.org ([2604:1380:40e1:4800::1]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rw4uo-000000068cA-355X; Sun, 14 Apr 2024 18:49:25 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id C4A82CE069F; Sun, 14 Apr 2024 18:49:20 +0000 (UTC) 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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240414_114923_629541_7DAC5286 X-CRM114-Status: GOOD ( 11.38 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org '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: 13629211 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 1D26DC4345F for ; Sun, 14 Apr 2024 18:50:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=atJ+3VL1kp8sgJA7cn1shwK3+nJGtzCsJ+9PcaLx04I=; b=B++UripN8uFLpUxop4VEvCzS6+ LJRF5I88/IQcFi5vDcbiIGStMCkZ0Ob3qO2vfqDnAAFTXufuAc7DsysAfrPDmc9JT3O61Lrzbwloo TyxOB0PPfCCXuWzXDN7QT2EjPvqfw3ioaghaAexL2Bqd8xzQEjyA/qi2/Dm/FnFNvvYgISAadxi1i t0hielZpdXTsT/qg9nReDucAOCPw4WyFeGm/Kah4BIttm61cCk+7p0/j9rOpgvW567Ji/UaJoFqbz mTGhghBJ5RL0whESg8/AV6Z+8KAzjy2Il8laRqDdwMbXZG9VfHlxshUhrRGnZdUMlfvCL5XDh8nni ysvf7aOg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rw4vj-000000069GJ-2Ars; Sun, 14 Apr 2024 18:50:19 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rw4ut-000000068gM-2u3o; Sun, 14 Apr 2024 18:49:30 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 1643560B8E; Sun, 14 Apr 2024 18:49:27 +0000 (UTC) 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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240414_114928_396309_8F76D377 X-CRM114-Status: GOOD ( 11.57 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org '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: 13629212 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 057BEC4345F for ; Sun, 14 Apr 2024 18:50:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=OWfoVKuVEE3te6ZMf+kyUypcqs2E2grmu5N6ZdDsr0g=; b=lhZVVeUcni9OiXnNMhVLiBrauI fSb4Ya/em2/bepF9aDKOyLsIO5u1hj1fytNi9GrcIOcEHSp22qKnQifGfUxNAuQ0tgtqoeqs9Vcq6 a+68HFZMXbKU2C91r4uzSOCfk5jdfReiulf71ZEudlTVMszzDUFm3fIC4CFe4m3ZRpixTQDxw0TRF /RM35RQpBxhPNnJtOHlU3grJBNnv6vUcjV78+Xd2atrBfDjxlrjgTjHpJIgI2oBKEIrkkUy9nL+wf BcIJuhyROpmboFgWdT+t6A88MzNkh4r+RsTPr3GHBNi4fRuX0snYcyVy/fzBJpwQfEC0p0M5BMyN8 vDjz+GaQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rw4vv-000000069Ng-1FgX; Sun, 14 Apr 2024 18:50:31 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rw4v0-000000068kj-0KN0; Sun, 14 Apr 2024 18:49:36 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 8626660B8E; Sun, 14 Apr 2024 18:49:33 +0000 (UTC) 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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240414_114934_412428_A67DF602 X-CRM114-Status: GOOD ( 11.26 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org '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,