From patchwork Fri Apr 26 09:03:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13644373 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 20CB913D528; Fri, 26 Apr 2024 09:05:01 +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=1714122302; cv=none; b=mCeo9hwuIM1dykgn/RY28Qxkythzw5ZXu9Z3+nRSFdbM23VJnEIoafDSlCVRjr3wEs2N4Gz4rUDRnGZM8/g4biqp5HCB7NyJ3gRxN0rL6oK5nxCnRh6M2fw/hh5BD68xhF+B1YSICdqX+cRIkhXDQhZuzhfSauN/RvUsBAXKZJs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714122302; c=relaxed/simple; bh=Fv58eJJ9g0/7T+qs81YevZa2aGi0MuehR4NJTOflK2I=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=sxB8ogbTgeCKBpkgzQVC+yJui6C/QYYin7ixJxfBNI6fHsFXU67rdZvOy0T+k/Ql8ZzsJ/qs30TrlZuIkPY+1clou/sSU87tx6zSR2JmEPyT8A4YGsgGHIm6de/RDYXWraeIZcWhdkH5+Qiq0rhZMiGiKzncpkN3QxW0nrMeXNU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Ete9qowV; 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="Ete9qowV" Received: by smtp.kernel.org (Postfix) with ESMTPSA id B6406C113CD; Fri, 26 Apr 2024 09:04:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1714122301; bh=Fv58eJJ9g0/7T+qs81YevZa2aGi0MuehR4NJTOflK2I=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=Ete9qowVjLixlXuoXYCBwwgIs1Pydbar8cLML12g4KwYYDW8/erLjq1brHFfBH+Mq Hdm/Cvqsd/Z7RD44RtDFjbgtn4cgkB3mqBR160aXwVXGcQmARQvoQoWs62ViU6uK+7 EBgFZTMYdzkw/bS+HNlSL7TcIOAbfKjo0WEvx5SM6ZbmGSy+nfTwC60R37mjIPyWUC a5lz7q5Y9DTrYhpVChTVoL6FZ0nZ3Ep7mff3Invs53CrjFpLtFLdAqpxtgEWp22/Tj G5ywq6gomNAQ342vglnAh6AQuPkq9ibbuO0WaKMgVDYaySWGhR9Jxx/JI2DYexT4Yb UDOTHi02QYBag== From: Krzysztof Kozlowski Date: Fri, 26 Apr 2024 11:03:48 +0200 Subject: [PATCH v2 01/14] ASoC: SOF: debug: Constify local snd_sof_dsp_ops Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240426-n-const-ops-var-v2-1-e553fe67ae82@kernel.org> References: <20240426-n-const-ops-var-v2-0-e553fe67ae82@kernel.org> In-Reply-To: <20240426-n-const-ops-var-v2-0-e553fe67ae82@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=856; i=krzk@kernel.org; h=from:subject:message-id; bh=Fv58eJJ9g0/7T+qs81YevZa2aGi0MuehR4NJTOflK2I=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBmK24g8FMqyk5CcreafnICwJURXx3G/Vt1uYxPX DIZzjLVAGKJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZituIAAKCRDBN2bmhouD 11YxD/0SAUyEFYV4mPU67fioBUbLoun6ybnfuwvrL1B88/tA0168kO8waj4x7soSQfkNXdBG9Tk Rz1HZ73v8oIXaJOwtxrDslVyaxBLU5HopSjZkDE7J0f+pk/sNor6WxfB6yD3ouvvSCWxxh3bhzP SJ4pEN192s6aSYT4cBsHRm8TnLYHCrMKa01css81vWFKvMEuKwaDic92/Ju6tbJZXY0QkNlrQM8 Ol9oQzV7QDwSfcqNuwUx5F6ckgqyJSFMrmqQSODaoeIlwA+QPi+gYHm++/OnSBlWgQc9OuzoVOy xYPmVLu4Fze0JSZzF/T/2MlJfTZNrCzdk3K0yQjFBPfC3cppqrwWWsRiOzPhFawFvJg9nopMe9Y 4euxMToOe9ngBL28cGIKWjTlGyE9z9s2GEaIJ76kEe4wW9/+KNUYDjdz+tozLb5dzM8rF49E8p9 cH5vX9XCIe0TnAc0MUaknLm66tpqoObLiKVMWWM9uI8+Epx9UKI9lY5NPi/4xZzHbLZ7SFnHzn4 ZSn4fXwQj0KRqP0UHtB3bitfOV5kAXbrBD4nxiycT3lddegIk5lWD4Hkh4l2bD6m3LxEZVs9DGi DtEeec6BbFC4q8Md9j1x+8xSrnvIx4AyT/FlkZ+vzseJWLkR1oNvCoU+ddPrJJHmUmbH+UybwpW HnrTY6/kxdzSxbQ== 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. Tested-by: Pierre-Louis Bossart 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 Fri Apr 26 09:03:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13644374 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 045CB13D525; Fri, 26 Apr 2024 09:05:10 +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=1714122311; cv=none; b=CQl0aoJlRHSgm86OK/+ooSf1TqvMSuQTfCZjeIxFyVQ8hKoJ3wTvHcRvbPXwi/1jfcArvnppnTJ4l/YyauXYmT7WCsX7J28t8W6PAv14No6jY6n/hAvSHdqmgkY+5jUHlInIIfenmb/cqmMCGbzFtvuBfgyH6oyynlJbQoLugz8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714122311; c=relaxed/simple; bh=kMKFC78mUGsx7b4RHA9dgG2P9NgMyAE/GAkkgSE6250=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=KU67ygZ++Dji9qUdxj+8BYBezhg5D1gULCPLGPxOl95YKekk/WFgr7zd3XAPROuQzy25STyYf5Oe2y8BL1WFq4+nN/MtLxwMIFvBBzt/GDNmX2OGqA/ru+bfz2NJa6Xm1QeAoM8zHJLEo20HmFQ9TJ5nwrnzhRhDc4Edkzo2rIo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=oIPZ6uWA; 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="oIPZ6uWA" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 697AFC2BD11; Fri, 26 Apr 2024 09:05:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1714122310; bh=kMKFC78mUGsx7b4RHA9dgG2P9NgMyAE/GAkkgSE6250=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=oIPZ6uWA+7TAMJi5kEuM/QMn5Xj7GZcVcS4jfZUyrybC3B5RUkm0r41Y94kj2UlKe NCauoMyJ99LhvzuqUSRvbw3EjpSleAl9VtS2G1/4TrpQ96F2hopqotiX/Ekrc8jvmR bFJ9VmS275AJqTTCF6MhieA5S+J32U0Wm5MDDSq5UEP81eikF7gudnaK86bj3rt3+b kCupQ7GYzmDzFMQO8X4XqE+k0Fs+XDLwE1qiD1Qe6jXbfoMtdcqMHZtxj51+5BtBYm q7sV5zYA4RpFkxuFNCQBMvenhIoxEOF/ClIMeZn2PMMx7AICAmTKkEhl/dsvoKrkfu /ohdvwW3vwARg== From: Krzysztof Kozlowski Date: Fri, 26 Apr 2024 11:03:49 +0200 Subject: [PATCH v2 02/14] ASoC: SOF: ipc3: Constify local snd_sof_dsp_ops Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240426-n-const-ops-var-v2-2-e553fe67ae82@kernel.org> References: <20240426-n-const-ops-var-v2-0-e553fe67ae82@kernel.org> In-Reply-To: <20240426-n-const-ops-var-v2-0-e553fe67ae82@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=1682; i=krzk@kernel.org; h=from:subject:message-id; bh=kMKFC78mUGsx7b4RHA9dgG2P9NgMyAE/GAkkgSE6250=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBmK24gEkNhUhWWsVLmkCo5awt/BmsQBJfrhkCY9 PLPy73pbimJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZituIAAKCRDBN2bmhouD 17EzD/9EYcZQxibgKh8DZYlhMIakLJyrdMkfUJ1Xh20O3OImR+/jABppKN4idGJ9tC+Eg2KLf/5 gZHfQ6chMJMrkoHDuJgTvUfA0MSrNRYAml3SRrR9NZ/d/k2fJzUihUBSE6gzNuk1W/O/b1CVUIF 56tPqCL5GfMnSmAiML88KaUn8w25LrBR+0FhrhtaWkVp3IbJai/BrbGoqn/x2+oaUyEFUyFPW12 H4d8iLSwnY4BD5TF1bjz9m89O0DU4fnmd4ZXGPUUwZKqi7+8ndp0McjvFdkQWHtk1HlWFGn/NJK zwwq3sdDoz1PUmH2QDwd2og6WNyPlhgteWMwzuJSM/E7PZENLIJmPWiEsgS/76f9twTZ1FXikyf CG3wIS7oDgkqPqKtnoREkS26u2d4c9jr6lumZ/YlxxyP4HWt47Tw/3zNkDeja/NkZfbx99fLsNg l1pjvn337YhGH/qv60QcyMdeox5bJIvdL5tQXCnrVp3YT9tUddClpvy/Hv9K7MS0jfwx7QeDi5s NdamksfVQEgvNeCMYJGuNxfPQnwstIqthv9gl/sF119u9txU1oe+15HiurhvXLwlmuo8riAG+hp I11Av7Usd134ko2qIJuNgYGLt0kgV1zShCkTEmm4nT/jJVhLlRYGBZ8TEvTg21g3djM7cicmu2a 5X/3Z3y/SJRqFyA== 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. Tested-by: Pierre-Louis Bossart 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 Fri Apr 26 09:03:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13644375 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 273A113D525; Fri, 26 Apr 2024 09:05:18 +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=1714122319; cv=none; b=ifuEsHAlVA/Rr9Te3TxWxzejvtv7MguBa3K9LyrCC++iqAk3FkjH/OHY3pEKGpvHd1fM4BiZZ0/jZo/tzY8CtMd/DSiWpJG4Qv2UXOvvnhaGwxK0MhNnInYr6I2nZrTx/Pq3zcIIHOckhVszkngePCCvw3iBEN8Di5vP7bn16SE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714122319; c=relaxed/simple; bh=3FmRYO79LY+xNUmE2P8IE0NUNwTY/hvuU6kWmtqG8wY=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=OEBF6z+z4/sTDDzZnT2XxsFtH2TpS6ATC1gnl1wiv2MlylpDnr0xsi3cu1HzuvfphxoCd2c2JC+Pp9vgaCWkugYr14uyeTH3tn8zq5BsqEOeok5Xlq33CNxoeQaHW7n2VYn/3xXROOYaxBJ9tofr8WoIAqdjset6D3X9BPD0n9c= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=RSRx2iX7; 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="RSRx2iX7" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 231EBC113CD; Fri, 26 Apr 2024 09:05:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1714122318; bh=3FmRYO79LY+xNUmE2P8IE0NUNwTY/hvuU6kWmtqG8wY=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=RSRx2iX7UDZAao7e4t2ttR+Y4XGmcflLdnDnK7p92EgQ62pOyEUsZcfgv5InIs9Na Rh0+b2jo/DXnR9qpx9YYuNJ5uyOChACYPYfuQluTz76xZfRjqN0Qa8q5jJd/NRAdgp 9L5ysuuAOGqrZX5NkGN2xPFX4fwecyJF/r9a4K7xYC+1F9+1iLin9dbPCOaILSh7A2 RrGaVx05BU5bQMMvRu+VEa5qy3W8Qkc/k7n586t4eZW+FaYgfnZopcWgCKljsHMhth cN04QLDtzF0bfOe2Ajz1Stt+00OdtKibqO8thoBZC4fknbZBzDdoFgh1iIIBA1ZBGW R+IpaBto/JrEw== From: Krzysztof Kozlowski Date: Fri, 26 Apr 2024 11:03:50 +0200 Subject: [PATCH v2 03/14] ASoC: SOF: pcm: Constify local snd_sof_dsp_ops Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240426-n-const-ops-var-v2-3-e553fe67ae82@kernel.org> References: <20240426-n-const-ops-var-v2-0-e553fe67ae82@kernel.org> In-Reply-To: <20240426-n-const-ops-var-v2-0-e553fe67ae82@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=956; i=krzk@kernel.org; h=from:subject:message-id; bh=3FmRYO79LY+xNUmE2P8IE0NUNwTY/hvuU6kWmtqG8wY=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBmK24hwck8oGj89p/Piv/3ziUOfz42/slpYmY37 WRFPnobD+mJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZituIQAKCRDBN2bmhouD 19tmD/9ClP7BOTVKiZb3wV6kaqQNwRuSVgy0PFEG5BuZXR4fkipojXK2OV2gab7dvR4udfp72/n OIqMZIM6IuqENmtjGiB8vt6fbT6Alq2ZbTR/ynp/bqPf8E3q/CXl56AS08e3O/FH3uKCBvTNJuL RI1jBdv5Ogkjb0CcvItMRCndDJ2JH6VCMwU4fzjgLyZNn6Y/zWqAUQizzmXEcxUVbgK2JnhoyNU RztNRIUWK2nzcpSs7gDZVTIRbK6ZmqQiSD1lHfgUbudnp67W/IZg8f6LPoope/iKzLoq013m6Ot g4y/9aAmhrK4gmU0Xh0P1iO1nXMJoH+3K7Qb8K5bX6icIGDgOC1ZQDlb5oq4FZisM4IVbqeS43A +EwN4ylLCNhh6gLL4xuF7UrOILzvwY7yUxYO/fLuRvpY0dKagoLJcLZcrfVh0s+iIm42uMvKStg Y7K+Yfz2ZA8WjY+FZJe+rQivTxXTVYEOGYHACJdLVLy0voezBU5RPGXH8ZWokud8mayDvPgvg4X yyPo776FyhIe+A5auCJDqWnGozZcVoDuReYRjUMqTVcrLhLBUpfgofV4Kffsq2iTvzuv6/TmmOH ASO+wV+u8TOaGzytEdDo5cEKaY2GPtDcbKlnKDX52OkKMokZ0Dhh79PfoR28h0HN2O5Lp0xIt/P 2oCVADZAEnEo5sw== 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. Tested-by: Pierre-Louis Bossart 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 Fri Apr 26 09:03:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13644376 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 A8D2613C9A0; Fri, 26 Apr 2024 09:05:27 +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=1714122327; cv=none; b=P6/eZ04AnaVrmBuqaD7ODXZZybS+MnC37J97A0hINBD47lz7YvNqOiHZQfovOtFJJ6PtFMda6CMWr4GOfuY9WMYND2WwPXYmy308qZOkZffFGOw4Uq36w7XfomNQYwoeAbILQ1hl3griecS+cfnwGkMsRlQSoYCLWYXX5UmkijI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714122327; c=relaxed/simple; bh=VnIAfmPx25oKsEp0zbK0tnxbnzdBHAOYcdVhtoHT55M=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=ubbTkE5iBBWpcz4xbGWCTn1hhGZ6vz6NXVcjKfZJil1HF6FPyWYBnL6MvacK1DHjE5EhXUYuxSvyt+jj7576UevZJgkN8RMJlezNuWGYj+shZps7QJMBOZvs2B9leCJozS8PFL+Zvs0P75wv9oxAd+86lspGPXd0xX0zGsSn2GQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=lYpGcZwb; 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="lYpGcZwb" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3F82AC2BD11; Fri, 26 Apr 2024 09:05:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1714122327; bh=VnIAfmPx25oKsEp0zbK0tnxbnzdBHAOYcdVhtoHT55M=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=lYpGcZwbD++CwmC8RWqhElXVo952m5WjDHqKUqH3kLu2tpnsh/j90pgBBj3pd02pY eCyM7knZlW4cjURhR5UmE2fDAgQ1K8T09MqwUdk1+fR6lqehvBJK7OqE+h/c2lf2bS ISofovYCA2bDcFv0CPVCfNwgUWFSY/W53iH82l9eMxEeaw7QqAlyS9Y0Ri3WXYY8yN EBoWE0XMHycjXYaHVYyPv5Yi72aoojICxP1pRBRqRas5ld7+D5XCwwQgqhCPmxUFh1 3KSQEOLxlofSYbE38KDnEqvqu1Vvq+wX7anoJ5El0iReGSqy7FI6Z22H6+j1H/n4NA LTatyohdFI3uw== From: Krzysztof Kozlowski Date: Fri, 26 Apr 2024 11:03:51 +0200 Subject: [PATCH v2 04/14] ASoC: SOF: Constify stored pointer to snd_sof_dsp_ops Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240426-n-const-ops-var-v2-4-e553fe67ae82@kernel.org> References: <20240426-n-const-ops-var-v2-0-e553fe67ae82@kernel.org> In-Reply-To: <20240426-n-const-ops-var-v2-0-e553fe67ae82@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=937; i=krzk@kernel.org; h=from:subject:message-id; bh=VnIAfmPx25oKsEp0zbK0tnxbnzdBHAOYcdVhtoHT55M=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBmK24i5ldgk6ROfX3AbXjO+oI6liBQKOT8EK72p kq6RFuYidqJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZituIgAKCRDBN2bmhouD 14UsD/0XY1oHKwddmpwGMp3fZbl8ZR4Yf1LvsKEzZAEwVg8Dnef8Ow3zrhLy2YP3NjWoFTKLfEF 1eppLLdVNgIJphOhDh2zBCrF869W2O9Zd9OZQ3IIxZP91wgv6XKwNsaDCtYNavh9+/dLrDasQPP vIvah0BERFKIqXDqIo5g7pPNc4tszzsMA5TJhOKj7+yb5pCj2Jxcl0U+RuZJ8DTwKg5stb2WJOY zxTXX6Mj/NQagvsACTBILxPBPQNI2QUHvsk1fY7NCB0aMbpCiySZ6M1q/wkF8StCruiU1h3SbwQ DX5AGhQAsK7SIjzkXpkYOw6xqhM3RdC10DYUYk9Fg1+5xXrzVdechRI8GGpYcQ6zemKw6dmSqDX kmY9p5Zp7u+kj4lQGy9ZhDAlKeAQ2QDRcopZZzGVkFCix3fxteHQh1DCaklr/D8Npbtxv3nxbJh VhsNL0haC44Mdk4BAUwLioHcHEs5JOlC8A0meDqjsrYNrwep/N4Xmkxns91MRcVYxtFQzf0N7Nq vITemvqkZ9sJhS3nssaIVR+3j38/AurpPzl4fY5bKN+QN0yAvHDfOfkR2Q7ofNCFgEX9o6ULIIN lieNArQ4cwd2etxJFmftDi3/2rkkYSmUVGXcypwxEQpV8Mi6dtAFtCZ8clIRvZsyzPzJBqNX+E7 iA/exbAmcYlKYxg== 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. Tested-by: Pierre-Louis Bossart 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 Fri Apr 26 09:03:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13644377 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 24AD013D2B2; Fri, 26 Apr 2024 09:05:35 +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=1714122336; cv=none; b=jiSW9llttjNaqEZX71S+D/0zUcgXBP5lyF+G4V7s8uZLSf2PnVoF8DPbjP6Zvswx21CIf2Hx4nRiuIdO0Tnav0qAa9HP8zYl2OJqhEKT8eMYJI+xoMbEFCL+LJboZYdgzrONnbbpf5jrv4zLtNEgLMiQu+S7RkpzG7MobWtMRLI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714122336; c=relaxed/simple; bh=vC0dygQsKcoCwXU125Mo6e+qkHR3/M16HFNlEdMw+P4=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=gRvaHFYNlhfLm+wdPXR69uUPdHdPJ47d8CZsLf1emMNzvlMo7xMLLRSAqJJoZF/TzVUaebRlhg4n3ZyGs0bdOBd5vGjLvDDpzlrht8tgm8bCALW6e8+pnVDFJgAXWZOmuJak7p8vckHRABkH34Z1siNDCSbHVBHv1sYps9OlOEs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=XBD7tMPy; 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="XBD7tMPy" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 28C4AC32782; Fri, 26 Apr 2024 09:05:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1714122335; bh=vC0dygQsKcoCwXU125Mo6e+qkHR3/M16HFNlEdMw+P4=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=XBD7tMPyyNheLa+gN8swvqjZ2Jamzylsq3bPnkP8QWH4sEa2ZluU5OEYNIgTn7TX9 1wZghFudVMbjYC2M+1hQO3kAOFUWSbZmv5QdBLvWVamtJH8zxylLKwfBmf0uh6Igyu qJ8ceweXIcc+grjG/Asy7J1FfRaiECG+8MMTc9gTF1TG19hEW8uNMoPBOYx26WWJNY y9xYg9+KNsWknviiPYU8V08+QtZTraEJSJvNFUU+pYakh1aoyJLIQowhNgKE6cYBXf u4aygH1nTXekpDsnQhrSoR+8tJZhRd0xc8QqsDXIyr86rZj7iYTAromCL+P2QTk4DK bv73PmIjclptg== From: Krzysztof Kozlowski Date: Fri, 26 Apr 2024 11:03:52 +0200 Subject: [PATCH v2 05/14] ASoC: SOF: intel: pci-tng: Constify snd_sof_dsp_ops Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240426-n-const-ops-var-v2-5-e553fe67ae82@kernel.org> References: <20240426-n-const-ops-var-v2-0-e553fe67ae82@kernel.org> In-Reply-To: <20240426-n-const-ops-var-v2-0-e553fe67ae82@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=1290; i=krzk@kernel.org; h=from:subject:message-id; bh=vC0dygQsKcoCwXU125Mo6e+qkHR3/M16HFNlEdMw+P4=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBmK24jccjXN7HDS7Umt5KJRsyE/HRoZADSrvXMD GTqaTI+0zCJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZituIwAKCRDBN2bmhouD 1/C2D/9/426s0WEhntopd8uoye52oKJ7JLw+XRKKjdBKQ6Q+gAlvGbx0CNaB6D+G/aFFOnYhlXW IOuxOZpAjB/JotGGK7cSOmkm1x7OVuUBERjIIX3X71w+MC0p445sFNqQQPPFxwCwc8JjTnFqsej MUfu7oh0kvbLlQV9tNz29JmQtmGebta8rxPYZstqtC8uOjlRc4ShuDTrLfFyuowyaecRDVxx4+t KBRCYnkOukaWH0XcEkhn5wfJm2b46+c9N9cOjkF+iHYJh2iId1ylUhffh78Jj1Kc8DMMLKbrzcQ GVZXWObaba9GYu5T9Xju5bvOFzCMZj+zj1KNTHbz8fkaAVZkjdiUTdsZJFQOgJZatKmprwdPz1P Nq/BSi+UKcNMLxOfnbpHzZBk2S+CvCdDnHbugd6+UeM8kbjtC1iXK+0ZWtWJtshzLiP4dooOgtV M8QOi1E+tCQbOYWUqkt1M5Qo11o4fFVA4w40qPUoYgVd+2nsQMLWeuz4RPxkJG96P3qJRAWiXk0 BJY1suCg//gX/q32GBbe+HxSzDKhNmGWYGY5cqcxOHLKVe4Bhf18Kzlv/sr2X2IiYb6rLBZaU4I k45xHMPQVIgFwqZ4WKs+wf6gxs7PwHUGsJpjYjJNpfZ2bpbPrphAX5kmNC/hDQLIbFvIo6vHksA Gay0iMeShk99ryg== 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. Tested-by: Pierre-Louis Bossart 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 Fri Apr 26 09:03:53 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13644378 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 BD1FB13D299; Fri, 26 Apr 2024 09:05: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=1714122342; cv=none; b=jpbbIhTC+3765Ph4jv+EG+K2giQBE3aWOUSTAEDIuFDFq2yqOkkdCev1Ub9d8MdRejqNheGoidZZGk32QbF12Nbn/EUxJxHWcmyBPVfYicVQVFqec85+HKruaQ3esufRyuTpK8oTMoG5jpioVZPwXMSpoPynj05IupG2QXtx1MU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714122342; c=relaxed/simple; bh=uSl9lHVhMhzqO5BXxIg9ZVHN/ovpA4vPraemkZEX5Es=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=SK9z5VLZrZqRwQNNeoX2uv8RpdIEk1ho4zhVWJrJ01bSqSGNqmn0ZjNTPoJgXIFR6yD4yPTVQUsCNhx2RffoOwKPr3kK0B0pbxpmKIVlgHCpyDp7gZQGgXxrYASgXZ/uaZ9k4g5K6Zus+8xfgNpBF77D2YdShHmQKE5I8EW1HYU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=XJuPY7xn; 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="XJuPY7xn" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2480EC2BD10; Fri, 26 Apr 2024 09:05:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1714122342; bh=uSl9lHVhMhzqO5BXxIg9ZVHN/ovpA4vPraemkZEX5Es=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=XJuPY7xnJUG2dzuMuGAdf4kyeZY7M7fYQjmDTKiPN/ajF3y3nszsFvN+tkNNZ8iAC 0GoYRlbA8WaRguZ79eeYw/qOj1e2Pl2gaSaGVT2oX8GBHsj5veYRklqp3amBhwQMkt AJwGXp1PlCBqLWBcWdu697dfCaGRG7EZfUcnwibVpB12LOxrCuUWAyRAGLFurnxLZq fOO7s2vOFVb9qmM8P23pCIv6q7BNFDbdvf2xaZqP4/QsDZCxroqJ6o5iTorKYUtgn8 IAz8DW1EyjNTvdisltC+7e42xsMixFB4PSkhsUwNZGR74D4kOCJQWEJEdqsJMph0jT zaUpu9rMxE/ng== From: Krzysztof Kozlowski Date: Fri, 26 Apr 2024 11:03:53 +0200 Subject: [PATCH v2 06/14] ASoC: SOF: intel: hda: Constify snd_sof_dsp_ops Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240426-n-const-ops-var-v2-6-e553fe67ae82@kernel.org> References: <20240426-n-const-ops-var-v2-0-e553fe67ae82@kernel.org> In-Reply-To: <20240426-n-const-ops-var-v2-0-e553fe67ae82@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=1399; i=krzk@kernel.org; h=from:subject:message-id; bh=uSl9lHVhMhzqO5BXxIg9ZVHN/ovpA4vPraemkZEX5Es=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBmK24kIwXwjcILq4oTHU0GmodP7uXY1EGskkxrG kPPOLG9cu6JAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZituJAAKCRDBN2bmhouD 1/vID/94le4u7Mr/ZXMzNfG1RttG6ySshfgZ+i+gW5oeYZMWtcjv4vBVFDDh6e6C7bgwNPGxnJi en52qMwbnDb1d3xMNM0PAX/enkLznKz7jioV5V9QrmyOq0gZghU0lHvIPj7n38wFBnLH+T0YIbu PhSFiHHUSwmh1rK3+FRyxH2jNRrlK21TRKLDrsDQg2TmQHUHm92kZWZ4kKSscJW1vKRok4+8QBN oymMJyFTaLdgJ7QrMnaorTkJSd30SaTKw/Wb2g8Vh7+1bLxtpL2KT/ZsC8MkMBH1C0Ur0J72Hxy cqAkWq39UMY1DzcEKBkZEro6DtTlIGu/NTq4LPwVny+uIyic+1s8pXijWTDv+Gkt3IqduNJtgN2 sgO9DfXUNig+e2OgtmiBR9Rkc1zZKJzuxrbKpHW446h2Ju6TqoqQpdqEfs5D0Mn+CU74qdbXyQQ yO9zWhU89QHztLVbD8I3BvzqHccHdNNxztyWFBScd2xJCMsDtOyIdWj2ZJ7OYgHXiLjcsYyQejs x9CBWz4fk3R7cCWYV0Fjz+IFhXXmbSSSTjBqVIEEu/0Cjy5UZhWfTabJvG50EyrwUoynQqVyuU9 it2S3jqr84dVJ/of1XXbvrzdfPDxmWeYojacs3pRoidiPS9D+EPFAycuRPmWKmrbqj/DNf2zW8X vxnu7veStIRiIJg== 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. Tested-by: Pierre-Louis Bossart 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 Fri Apr 26 09:03:54 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13644379 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 DA00513D299; Fri, 26 Apr 2024 09:05: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=1714122350; cv=none; b=Xk2mOfXyXdzLFwSSePJNQCI0354I0eQy+Zm5bfrq2k+YmePOr7VUAczIGyC38vGDE7CkthrV1zc0Rc+mEO72DSrlaSKOONJOMBB4nfWIzBo443P+EzHruvAmj2QHJyvoQXHYrZRJBbU7+JJ67mjoRLE0veE7VJJd54ppCDQBv/c= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714122350; c=relaxed/simple; bh=OmWsR1whBin0FkWyWjikvJi4ntg0jTMwYm6UxGalLwQ=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=CJAj3qvz4pok2qPRLchF6NHi7rzGF+kqQqjQI8SEKnmM5RRSz9PdIjsLuHY+lc+Uhy29DOV60oHQ/YqedP6Id6iLroLI1NJ1h0JGAuiPlAhj9bJ+XO6gXxSwRYmbVRhhiurCfgrY5cVTkjJCn5BVRNecKx3CtfXaY5+HscyZssk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Hdu7msck; 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="Hdu7msck" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 470ABC113CD; Fri, 26 Apr 2024 09:05:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1714122349; bh=OmWsR1whBin0FkWyWjikvJi4ntg0jTMwYm6UxGalLwQ=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=Hdu7msckPY9+UmLMRoJM9T7ZsGeKXiX/bjBsUMJhD2iffwU5uae8550h9gvdi9xOZ jUY6iGKUP5Mj6XBCRv453Uv1+cR783janwVB3LmT5kIzNx4wxpmhlW1ToEOExWFv6J 3UvUV+f/cQsAfWAteU/QWhjiLiav9L2xnnGNYvQJWAqmbNyZI0Owtj0Esa7OPEl6Lv dNNNxhxOyuIO/YaZZQ5foCMJ+F6S9Z1+6NfOCB+3i5YjK2fq3MJCyW+oOjYADx5Pkm KW2t4/YD5OWQ7n/Rg7K/VhKrpiKBYMKL36+a6XWqRYT7WkcMY+3gDHeAcdqUjKTkzb 3wSibzYE9U30Q== From: Krzysztof Kozlowski Date: Fri, 26 Apr 2024 11:03:54 +0200 Subject: [PATCH v2 07/14] ASoC: SOF: amd: acp: Constify snd_sof_dsp_ops Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240426-n-const-ops-var-v2-7-e553fe67ae82@kernel.org> References: <20240426-n-const-ops-var-v2-0-e553fe67ae82@kernel.org> In-Reply-To: <20240426-n-const-ops-var-v2-0-e553fe67ae82@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=1504; i=krzk@kernel.org; h=from:subject:message-id; bh=OmWsR1whBin0FkWyWjikvJi4ntg0jTMwYm6UxGalLwQ=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBmK24lZVO6ZDd9Ma+CskZK59Rr5+n1NdIFKL+9W 9OWn+/QE/6JAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZituJQAKCRDBN2bmhouD 13pLD/9RMyi2vNH+DIJ48G2LLs8RefNjWl15z8IwxEgJEnU1DjsRWBCUM6g4j4cB8PBIvJiAGcS VCo+wy7RI9ljNeYY3gBGlkCKA3iAdHiYoq3EXj/1OY6U1N8Qc2yqKASwflh5SMEndWwDkfh64BN 4GHSgLPQHgqdC6QmBb2dVui3HWpxP/Ew/2Qr4NgUOHU98MPkBah3ID1P9SGGAQi0hckG9aabhFK Kj4EnjZoARWzfVrlAQD2VsJHc1JAE/e0eWEdm6LB3YGAHED768fwI4BmYh80+yDKzaVhxkTry39 NA56Uxi0tEgzbhgaKzDyS4j/xRDf7lht/xFxo6Yrux7lHFNCNP/2BDShKXQchFtPRZ0ELL21ile 5imnZbX2SJo0ui4xbhL/wG7NnanT6yebPvxDEMiVeezTTb1+/OBww+J/K8AIovLfJv4iTIiNfCs qnjzA/rUrgDRBPffwpsBWVJb8Wg1ZtSaZhb6BmF6Dfm63G0Z6zJ5OGlQsFdfUfIFGKtfSuPn4zW EQsQ0OQpSMoeRifpHhWxYzq6BcFfFG27s9FF0KKOwdMo22/W9If5Mgw9LXkjqZ5F6wjv8ZS/kuD yBGXZkQE14OyTXGXTg6h5HBpXSjUrVv+1GqncTBdM9ybGLsq9VA2eWacR0ChKGsUrrn8Efy5gz9 51HxKKCm188Pp6Q== 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. Tested-by: Pierre-Louis Bossart 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 Fri Apr 26 09:03:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13644403 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 70F4313E02A; Fri, 26 Apr 2024 09:05:56 +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=1714122356; cv=none; b=CbmKIyvzso4lnDztitrBig1KL0qR6xSpONWKhqHlFQti8feOpC6JPYSQlG9WO+7p/MfBizy/zG2mKRSbB6S/b5q6kCrnsNgM0NobQOAHQ1YbsDEXfTKHX7L+Nfk9n70x/3hOsxmxIfhTMIgop0Bn0zhc/Xm5MrvCuyy6zdbcJiA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714122356; c=relaxed/simple; bh=dwWOV4SZweJ8ytLb+w8zBZXa3dPFIs1yZjd4j/v8Io4=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=N137tw0RpHp/+4s/7JKzc5S29uxMbVRKYQrB3aqgueFVFHGyLyOWp2aD1rElGnkcKPSBpRoxKNhwWs5mQxF5gTRY2cB7pKGUG07MuU1zo4OdE669PrO+E9jtlupfWIGylORFxmJDG1Ko1lC44FFHHunjhBy+qGr0xodlrwXqDTQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Ja5OV4SZ; 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="Ja5OV4SZ" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 247A2C113CD; Fri, 26 Apr 2024 09:05:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1714122355; bh=dwWOV4SZweJ8ytLb+w8zBZXa3dPFIs1yZjd4j/v8Io4=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=Ja5OV4SZvYXWq0hVVyR2HGgLXllJRbCAzbNUhiI7aRKRIQ5mmnxniMI0MbzEk+a/1 SzaSti8MrMWG7tvrvdKqlUNP04pMsOapue8eKQD48aqVnsvidim4VIFMUrJTZg7V7I oAbkDXMpl35GgzcmIBMXvzD8iiF90yDCih9wEozr8Cy7C4oqE5WuvadIAt78oP6NI0 q6ksE68h7w4JPuWkP1PIp5FoD7cQheiglgOrt6uQ9KXEBc7jdhTfLN6J8lqEak3t70 +5O/RYBgxj0y3zLYPXWduAzwXKpMxo3Qz903t4EKijg/ydbsuVwGYxWPlkEdzoTsdh Ygzru04ZDYoHg== From: Krzysztof Kozlowski Date: Fri, 26 Apr 2024 11:03:55 +0200 Subject: [PATCH v2 08/14] ASoC: SOF: imx8: Constify snd_sof_dsp_ops Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240426-n-const-ops-var-v2-8-e553fe67ae82@kernel.org> References: <20240426-n-const-ops-var-v2-0-e553fe67ae82@kernel.org> In-Reply-To: <20240426-n-const-ops-var-v2-0-e553fe67ae82@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=1084; i=krzk@kernel.org; h=from:subject:message-id; bh=dwWOV4SZweJ8ytLb+w8zBZXa3dPFIs1yZjd4j/v8Io4=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBmK24mHSbrjv60BeG3lTvTBn2FMZ6o7H6vVAw6/ YLLpWRLHgiJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZituJgAKCRDBN2bmhouD 11qsD/9pumSWYNhS8XZXAHrJFMGx/Fm4mJI2ptbjfWaYBmnMu/gTxjYVkbt374o8VNmEq9Z/xZv N9gC01eQD+WDWkAV8c5/84gHaEk57UWhazF2UV5LlpIYSnL/9YO+jfmgw7YkRolCWqArPRIDXkF Q7hE4OKj5KJNx8vvJ9JOY+mc9cqRd6i+1qE/Am2h9EUL30v+WCz6/Sd/I/p8HwepPH6fB99Tfiz X7o+isE6+SFBDczOjgDRn7lmlFzZXPBssCri2pHxeamUXWHD0zb30o8t9tatSp4rBcnEkRfxnn4 YjpWjqNLi+lpTw3+zGz5kFIUIv9Mn2l7eGNvRk9umW02LH+yavfgDkBFu1MEcY2FlBtXcP4LIBT IqNco2HBZLF9yA73rP6V92S6O2qLjoQ3Bc4gVRVPNE+eL1j1Ww+6cR8KWz6lMstE7rIZskHCQB8 u/LAguK7dZlAbEYxggGHCO1jFoeKnClyOZ3rwpsZpGVjSCiARJ8d/J4/c4n0yJQ/sSL69tbtvzq qgWtlNZP9ETI//QXueq/o/vePJOqstM8SYnn+UwKzYO7rEOgzhKy18sHQxDAyovvhDMx+/vshH5 pKplkGAt7RkeLv3ET9jBkwmkirNSGWjnq5eTYlEmEeP22eTP0UuIV9RiuO/+3QSUbeKOwkSAgNA h1H32jNGeafVSAw== 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. Tested-by: Pierre-Louis Bossart 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 Fri Apr 26 09:03:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13644404 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 98BC113E3E4; Fri, 26 Apr 2024 09:06:02 +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=1714122362; cv=none; b=ZEOikvTMkAGx0xdWyGLOS40NrqGj+/Y5lkLRAQFziD9EOxaMXLF6y9qlZ3W2u1c1ZN5JYu4gm/NYTRVTUanCMtEUjk2fnrTrk6F2AttHdNapvjeQ89Uge+XGJpXon6YIO9YAQQui5F5GSgB6moVKQRnXFEjehSWiXQfrsEvY2YI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714122362; c=relaxed/simple; bh=XhUx011C+wZqMOdhwTy6Qg8ip1G5xaYrcjjSY155w/o=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=bt/3gqoHZg+JNgyTxdatIBoqZtIVJIWne8lAWG3yUJRxToD5KVYFUB++Ed0UnK5VmrCOWDzzgZSnYiJTv1hC4ZKhp0sggZQQsBBUvnENAdDF6BcvOeNed+V8pgGJS/6Ocfjxe/Bfu72SkmeDPrf8t6if6GchguW9fAEoHVYgf2k= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=aMujMDwB; 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="aMujMDwB" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7CD20C113CE; Fri, 26 Apr 2024 09:05:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1714122362; bh=XhUx011C+wZqMOdhwTy6Qg8ip1G5xaYrcjjSY155w/o=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=aMujMDwBsr5AJ6ROnowe+A7L8z1T5tXxxq73BO5xHU+9XjtC1AIMVuvizzgq/l0+3 soDbU4bOCwi6HQB/rbtDf/PC9CBr37R3k5SSiZj29vDhxKMwZHWFgDk4epCqHH2Oqv u2dAspQQRvdPI4Eq8hFMbHBbme9GYJzRRhITxjEToz1GNzeeL25wUQXJFC91dFeH+g zp+wB3r4NIqIcCE94xKtyay8mCQ0yeukQGMVCGw4Q1cGHss9Dp3HsSKxFLAd6rfuki /fDHqa32jmC8W5P/533Y1F0SBjLJJ9P/4UVZQusNbiM8rMzBb39f8OFLFp5Fu2U8T+ IWLXO5wOvBW1Q== From: Krzysztof Kozlowski Date: Fri, 26 Apr 2024 11:03:56 +0200 Subject: [PATCH v2 09/14] ASoC: SOF: imx8m: Constify snd_sof_dsp_ops Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240426-n-const-ops-var-v2-9-e553fe67ae82@kernel.org> References: <20240426-n-const-ops-var-v2-0-e553fe67ae82@kernel.org> In-Reply-To: <20240426-n-const-ops-var-v2-0-e553fe67ae82@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=829; i=krzk@kernel.org; h=from:subject:message-id; bh=XhUx011C+wZqMOdhwTy6Qg8ip1G5xaYrcjjSY155w/o=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBmK24neTCw5n/IlL06iKPMsn5vHH38MnGB5Cn74 zEmJH5zcXOJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZituJwAKCRDBN2bmhouD 15c5D/wKo7t1SBtqeeNDs4U0tuyIRMY0bKI5Luen2McymDX4vxNWoCowKQGuOBSxxe7M4fCxjU7 rhdpj5W0LIHQwODHS9k056NOqXUId8lwYR20jN0s0AG4ATKra/0GSb4FXhyKtJxj4b1mt6Npoku +Lj3/4ETd804pyZRNHNIOFCWLduVaKsm+sJaoHI0lVS9MUolpQiQu8GJntiElFa66zHPGz0V1Y0 wCzmXKa0/MrL9u8BzTTrhKZDDPkJ/Ph2D7LbRmP5IUErodE+dEV5j9ADsK/5KpWvoo58vIWmvwp qd+Nm2CwdLHTjEgwrmLVeGq+IUylQYvk4J4Xi2X11Dm/GnVaipBEm5GO8JHC2OnnFpzs60MTJoV LbLwHBHQpC6Z/FYyp2+v/20U+82im7uTMg2DT4sAzSfZ34TbkYZ07bXvi1GyyyNMWM2IFr1QP9/ HYro7W8/4XI++iSG3TeUAUBDbUgWC+rRN4uftsXh5lqcZ/ECaflHiiV6jLZ9nNuipcg8yT/Cil2 UQ+ObK45aafKJNWz5LqnlVbirIKdBvFYR5TGaI7u7so0IoVZEVSERfZiPxR4eGb3M54vCLcys8g Tb5OoaJhi0TrC3ZlZfg4SZ022AEioqjq0M5w8pkBVVcDA94E5peVa5qLQN0mrgxFdZYVlHBFcOX m/6Ze4nzrQlKo2w== 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. Tested-by: Pierre-Louis Bossart 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 Fri Apr 26 09:03:57 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13644405 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 CE41F13D602; Fri, 26 Apr 2024 09:06:09 +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=1714122370; cv=none; b=NGxmpBDax0FsgFAnJRb3215jO3iLIWJTASR8sWHSAq4vwWZUPMcGyFQEKV59KLjaR4I2+z8l8BzvWEZRSidqLuQA8vyhTKOWqfpE+HwsLCq7oIVzk3Eh3S/HiLgTLDnO+62naAcrbpQvKfaoz294VdttE2AT5Z9Enf7jclW6mNk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714122370; c=relaxed/simple; bh=U7rM8eY2XCeqSnVqnkIcGkj39dk+3X6+eaiO397jKG0=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=XwHN2osiqDVQzlUYtHfh3VLUXQS5JP2NV4ACt8ZKJzUa2uFVWRsHU2gU/+k441+y0Dz9GtqFuZhk3+0KfUQAQVFGXjdVzTxTzMXk9YocSf/Q0B+0cOUQwxxxEeF6cy1meVxuqKISPRLeqVXypHu1MVYoIpoD7kg5Yg27Zd34vkY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=EHlRaIQH; 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="EHlRaIQH" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0C34EC113CD; Fri, 26 Apr 2024 09:06:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1714122369; bh=U7rM8eY2XCeqSnVqnkIcGkj39dk+3X6+eaiO397jKG0=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=EHlRaIQHRZhxTInYYhLyQWXpqNgH1uCG5af4QWoEe8HPIv6gFk1wMCWrp0NQS+4hS u5lBzB3dvgtEV/63/NPA7ElNZnGI7NO/vCDTBBRjQw8uZf2SB0USLGO+SGDPKXDGdu Oxi4nitpAhrR/87jm13+X+DyJu3PYMn28kTXE2oKuG0MPT5ob3fniPVPh1igevk7dY /bSTQhn93lZUtG7xtgyxjt92zkbL2pi2Q6l519/FCr+8eSuELxmN3VN9IIGc20tL9l zFAfLVxWUXAT2g8gay7wjz9FL1tjSQjTz0Pp7xxBTryUJFJIGdBbI7hQNWLSh+TI3j qIF8uv20kqhgA== From: Krzysztof Kozlowski Date: Fri, 26 Apr 2024 11:03:57 +0200 Subject: [PATCH v2 10/14] ASoC: SOF: imx8ulp: Constify snd_sof_dsp_ops Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240426-n-const-ops-var-v2-10-e553fe67ae82@kernel.org> References: <20240426-n-const-ops-var-v2-0-e553fe67ae82@kernel.org> In-Reply-To: <20240426-n-const-ops-var-v2-0-e553fe67ae82@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=831; i=krzk@kernel.org; h=from:subject:message-id; bh=U7rM8eY2XCeqSnVqnkIcGkj39dk+3X6+eaiO397jKG0=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBmK24oIJZMxIOpyh3SskZv42qnFSQ4zPHQj51OD hjxWQK/V9eJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZituKAAKCRDBN2bmhouD 16t9EACOG2WZz1DIlgW0FSMln1bXk1N6nXfR61Jw8YlE7K3nuvGz+gnmo3qchGZ+w2KMVajg8WG XYGeOSHhsWJVMpBJjGOF2jnVrAFg3rn+i0fm+QPcmAobrJ18tRFYDLezgV5B/UzGgjqN4KKMJ+D auPeqGXppSZDWM7iOCQCKU49i2+oZl8eSYQbS+cKUpEWEwhhv+Gj2wjtjoGuWXd6oo6gabg/zL5 IXOinT8WZYluCFuCwnDsA9rLcFwjBEZARaQWQZPt8Pkfog+6EQb4pBL4n1xxcRpLd74KicEfT81 82lhfDRR2KrgxvoidGkhzDXXgWEwoqm37MmlN1CH2GXBWIhabGynE7V+Jc5TjeFTy5DBfQs7kwM R/bUlqSpohKJ9jEL4PlCIu7yA9Z6b85F0GcxURrlPhgEeDB5d3XnJuSa1gOWrdB0VdHIlHVXXwu YWzlXtS/bkT+RGzNejIfIFg9Jla2qhtd5yo9PaQaVJdA9L+l+jVc0bKhqSFEcSI6+rURwGNkFYb sk9VZOhWL0S9YntBb8bXD20TbBRxE2m9ktTVH0ShSPpQyyxUI0iyksSvR/sI5ApeJCmTkwy1mch OXka7spjPIcNHgFRIOsgB6Tro19CTHSdKt9W1YKzeg3DM8ER5hSCPs4Lxulkq585eDoEZfuxAZT GzjHtQ3YKizo4Ig== 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. Tested-by: Pierre-Louis Bossart 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 Fri Apr 26 09:03:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13644406 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 8AB6813E41D; Fri, 26 Apr 2024 09:06:16 +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=1714122376; cv=none; b=cKmClh/+Uk5fF2E9YlCSzQak6WaaYd/S6VAfGj19u5Yg1nOUvyBZquGGwYslHUlHdnn/lLMTCCM78MUsk0pf4S3Idzr31YwKu72tp9NclAueldX0GHLzWSF2/xneBb34Vh78hsI7f91GxB0Jl346rRHX+lAmSZrfh7lcKo4XXYU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714122376; c=relaxed/simple; bh=eJDuVWi+jYCBaLC3ORH57MWQfQKGUmZnVJ/O4TqSGNA=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=MaT9QWRsU4q2NbzelwKOqBmkU0AG9CrmLXMw7JIDyzc52mpT+KPCFHpdU1lVzdehhh90aGUJjb4ix7WmjzXZuLK4xiozaCZGPRyx1po/RTzuchdmaPAyxcz/c9xts5XH7dbzu9sa0e3P3uxNZHAMxlqMrlIDxu7u0Co4k8oTDNY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Z8CuFujt; 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="Z8CuFujt" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 026FDC113CE; Fri, 26 Apr 2024 09:06:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1714122376; bh=eJDuVWi+jYCBaLC3ORH57MWQfQKGUmZnVJ/O4TqSGNA=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=Z8CuFujtfOSPE3PZwFJJJ0wGgk/jW/SeyyhWXkZL5uIG+UqDKBTIN1LgQMmbvtzhW AU45KNvTx3PhKBk2CPUs+qx/Wn3ftMNf5K2Ng6HIgI7UT8dVutBYL0Wows5bkpR8JO sJxGP9nXkUruP5FCvjF1KYvzNN9L5VFaSoIurw8AqYZUlAlkLqkrqFE4OFdlIHBHNS 3CL7RY5G8huMxIgHIk/ZsCuWEyCHB8jZXv04wNJybGi8ed6+6R4ctapyFL1PrnY8CE YXgY+u/Ke8JUAIUC7VG/1beiu9Ve1udYG09eiuhprYY1Pm+rbJV5cGwMg+Q6cGkdU3 InsIhnlgFuZrg== From: Krzysztof Kozlowski Date: Fri, 26 Apr 2024 11:03:58 +0200 Subject: [PATCH v2 11/14] ASoC: SOF: intel: bdw: Constify snd_sof_dsp_ops Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240426-n-const-ops-var-v2-11-e553fe67ae82@kernel.org> References: <20240426-n-const-ops-var-v2-0-e553fe67ae82@kernel.org> In-Reply-To: <20240426-n-const-ops-var-v2-0-e553fe67ae82@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=771; i=krzk@kernel.org; h=from:subject:message-id; bh=eJDuVWi+jYCBaLC3ORH57MWQfQKGUmZnVJ/O4TqSGNA=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBmK24o9lkdl0D+KPxdSHnWLzWtJkJA6J7OqHrZX IiU4DplLEiJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZituKAAKCRDBN2bmhouD 16etD/9M9dSqAhJ0GkZ0uhTTUqcf5H/6EGraubd4ECuT/gVSj0r7R/Ft96l7+a1zxvQq7FZ9BN2 2glALHBkYT5fH054mSanWWlGdixZOna/K2z5lCx58Ue+1rQD6c4m3xYgpCe0liS25NkcjqXwREL i2Kjc2ZiPz+qNFcaVW2h4Ahr/qS9A+1oYW9hghXhtZ8tsMdtZtaI3oByrTXnbz+s3CC5UA4HG/u dz/X5kVe0SSURufYHWoVULxYK3IJUL/AAqc84+0DN/TZZwkkoAdCVf8vQ13EQBaBz0jM+B04Tbt JAMuOGog1TztG4Gp06HgfLC2aB5kWieq9joJ3nBaMBikabLtkwk/xHH5GwTwrkTqJLJT2b9QMVR gqsGxx9+q/veY6LxeNdIqzdvk8ocpWsIpXWSehvOeMdH5z4Vq/bdLSxay4ah8cpaZSwWCyFKkFF 3r398OngrAxgGEeEHEcyNqLGKROXdmlC4lu/y+emFEeir9P6iKzd8zKiB2CjNmAkJrovQjuT/sC 8leguLCUQjehZ4G62cCYUPrGvHhGduVYp5TkEe1nwpX9LD+QLbzQz+4VNhjJYbibuedvq2Hr2X0 Mem+jmArK7uyvmQPFariCvmraet9tCpyv6cSSEtfsntbnkwypEpvru9sv2HOgKBbJjrKKlSxhE8 IZnyFt1IlRL3Lgw== 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. Tested-by: Pierre-Louis Bossart 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 Fri Apr 26 09:03:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13644407 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 E42F713E41D; Fri, 26 Apr 2024 09:06:22 +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=1714122383; cv=none; b=YCzGymlptbayJi/2R0/kaE9+N5jAb0htnzIbH7piSlj0hGL5ryvSEq/MpaYFPye2+3M4vXnZbirGAaEwsHYs6tVwk0y8Mh7qKchKsULksXrDWsyIkh9btnnXfK0IM04BuLn2BoUt94jYICPkcU0MgumwHTZOSZQwv0iqdTIXN80= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714122383; c=relaxed/simple; bh=isNUL/vRKVlQ1eZTCoLyvgGCM7+AWqSNXzyNZ1JAgVQ=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=HgBx7ABaWx6NLrkDQtC40pvcUIlTWDd8Fn+Tp6AZtW9f5ll94ptmeF3jHBW/hIDPtKUY/nYAXPAzLjAuTnRk04Mr2Dc8j63ibi4jrXO5SmcSJ1gEz2k/R9HfmtiJFCvPBD93U+Akugk/DHj7xgQSWpoxetsdQ5va7IZfjjryclI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=KUvDf75B; 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="KUvDf75B" Received: by smtp.kernel.org (Postfix) with ESMTPSA id DE265C32782; Fri, 26 Apr 2024 09:06:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1714122382; bh=isNUL/vRKVlQ1eZTCoLyvgGCM7+AWqSNXzyNZ1JAgVQ=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=KUvDf75BZd3tzuPpW5Tnxnbr44RIL2v/DmbrRLu3PdZ8Dxh6zJk82m0r8J07rcV1w XMckxQdjRKz9sJD/+4xEfnU3qNTlYgRzSckVD8RADQlRU1NuLKzsMvP945fkqmpDDI WKb1Wxo18VLKdY/FJpKxDS8oPA8xD19tiewfpodTVY7yIFlQ4VOfMrfaeuKZ/LuZsU oRpvp2ijuWAXAErToNXR+dw5c2Q8nDReEAYQzYw/zPO0EnYw3iQXThMSOVH7OPCfCT xjFwo8GfkPAGLbSGRIS8PU0HAQOslH8CZiOKLYwSNypHdu0pUyZvZ/xe50XXgBnFT0 XtWyGQllwQryQ== From: Krzysztof Kozlowski Date: Fri, 26 Apr 2024 11:03:59 +0200 Subject: [PATCH v2 12/14] ASoC: SOF: intel: byt: Constify snd_sof_dsp_ops Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240426-n-const-ops-var-v2-12-e553fe67ae82@kernel.org> References: <20240426-n-const-ops-var-v2-0-e553fe67ae82@kernel.org> In-Reply-To: <20240426-n-const-ops-var-v2-0-e553fe67ae82@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=1100; i=krzk@kernel.org; h=from:subject:message-id; bh=isNUL/vRKVlQ1eZTCoLyvgGCM7+AWqSNXzyNZ1JAgVQ=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBmK24p3G6kz61lcHobtIaDgPNnSnNLElP6yNqv4 d5mde+9U/iJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZituKQAKCRDBN2bmhouD 1xilD/9WzCd04U01VkyAG2Gv0122YqqRyfAcH+BtznzcxDG149CZ+DBfGS6C5ura8681PUqlSXq 8WsrnaqcLskSYo/T52AAffi6x0T/2TFeVNMDz0FDYx2urhKEijhtVwJ8zwYwevs1/vsAUr3iwiu GTWXKSfU9FyLIR5SJtNAp2AiIgj+fJK8auNJPwfy/4Kc4ReLwDQqTQO0TUhTUIX875xl+sGGoIN tLq/xMrwdR1JzW7UN/LHl+P5SR2Snvvj9PuVNgNSTx9UG3povBp4fXEQfoWXaRhuCG7c5n5Cqso GA0dX3MKXIRXiPe+KPyxPVYcz6ramwBw15pF7q2vIsECMxTm2zi34I6VIh4PEf0px8vIUlcJqn+ p7mPCR/+vrNZ0tXmzs3q2mveWAggxdgRK2khR4Asw+GGU8GJHvluDgdZLoHYm957PQsZIQu1/4a sSLrrMWW5yTytspZIKLdQsqV/A8I8dO9y+t5u+N/xwq89PDoxCzYeAzNt4t/szZDcFkFNQSFRAs Z20/8CDn4m+HCxTgMplFXdrdoytzDih3WVjIeV7ptAFvAZ/Oe6c/E0op3eFNFhEE+0rGouOcXbh G2AtqjqudqvPwwKBrdVesyTsNlEbEnBGazJUwhdatF1AGNt+XOsq3vq7UC2WREwKIRqvKeGcNBc j9TIfpJRzBRs1eQ== 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. Tested-by: Pierre-Louis Bossart 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 Fri Apr 26 09:04:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13644408 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 7159A13DBAD; Fri, 26 Apr 2024 09:06:29 +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=1714122389; cv=none; b=KH9oa4KqjSXmNwfftpiLvuR7UalzMXOVnNFc/KcZs+Nro67yOfHXCWZ04imSpveiF2KrzcLC2wJv/nnhSWCnEjSt+i3vzX96WYx6hRjOGzk6DMTN8bjcWq/WDyh3Covy9an2xSOKTJMSEbfu1AJktFfpVtsvJcpteex6M3Kobm0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714122389; c=relaxed/simple; bh=CxPAgNjTAhKSrnJ9nXn8uxxa5Gyc46BCpw5S/shz4vw=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=pH3GbKgOJhqDvaOEBFVFc8tjpv6ncs863EQo2OQNwdbJxKhkQ22iygnrwjk/RhVoHDo5TZqpeOTuxRbavOpmlYIBvXcX11TDcAlnLhLLL530Tr6PElcGqtTSWdn0eljuQfULpSuKKNkLdxd4mnvGtH79HoLDZbsa74ouMddWPOo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=mGG9w0Ei; 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="mGG9w0Ei" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 68D6DC2BD11; Fri, 26 Apr 2024 09:06:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1714122389; bh=CxPAgNjTAhKSrnJ9nXn8uxxa5Gyc46BCpw5S/shz4vw=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=mGG9w0EiFE359M4Z0kyegLPJAuOetfwlvp9QRl5QeoRqVdYpZtPj0vI8av/F9Alcx vIbZ/OIlL0O48oW10NYCdK7FQwLHW2ttIsD9A76ippIY4cTI228dJpHnrFJFSR82dh ajrbjJFT7UEh9YfSjpIY8H8CHX7+n19qSm8m7vqnXfSLM4Ja8vATtyGXf3l1c3YAwz UcMW2ocWMcp8W1ZaRd7TnQLgdGtewx/25xd+rIyVhFBGaYZydgg5/mqzUNSO6JQ4cq sDdm3SVjmlwRUkCdg4HWzL5ZYJlrgipbJqE7FPetpZQmuvGC7oq4HyUmXKBnIzpM9G pIuwptjfd+0Sw== From: Krzysztof Kozlowski Date: Fri, 26 Apr 2024 11:04:00 +0200 Subject: [PATCH v2 13/14] ASoC: SOF: mediatek: mt8186: Constify snd_sof_dsp_ops Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240426-n-const-ops-var-v2-13-e553fe67ae82@kernel.org> References: <20240426-n-const-ops-var-v2-0-e553fe67ae82@kernel.org> In-Reply-To: <20240426-n-const-ops-var-v2-0-e553fe67ae82@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=960; i=krzk@kernel.org; h=from:subject:message-id; bh=CxPAgNjTAhKSrnJ9nXn8uxxa5Gyc46BCpw5S/shz4vw=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBmK24qWF6cO+604OtziJ/NJKVjNH2vRdMlOvKW2 ZVeAFYdmmOJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZituKgAKCRDBN2bmhouD 19rmD/wJu4RJJ1iOkGW6XNvX7fpPFzE4tZjBrpuoS3aDYr+2SZnWCK8uN7kvowcs3ZzHaa07zym wIXdJ7M08Y+Za281aWLjxHXI6wPqXkaHGSj6kn5rW8ni5iRo/tHYZjoso8PINUSg3ShVlrbCp7M mswEjchbBIYjGArF8MBdepFCzThLrd6LrQGhysK8P7F/VlrkcQMip820lmk8TuxBVMEg1CalacB PqnIHGc2WFlhcSW9okNqYX3ZKby0a6o6iBNukbx4KoeXbQJiNyZ0UG2bdT2l/Z7Dwai+a8YJnT9 zp6NGMVAa7ak5V6RcD+OUc8RjoVn+/Dd+gW7HDucLBAmFiALB1G+q+hDp5WOSpVgQPPnTo53D6g ze6s697K+wgmY7eeEp3jxrByXLzJelThlzthE9aParvGZXOcKtGyi4j+a96wRWBMuYBEzQCDQvp NCZBXC+VxYZ+v+jNuIByVwSjH3BZV57alL6v0k6SksyarACcCnWLBN7jNcULL4L+JzZ5OFpfeUC yzn75lDUrGRVU0l/YsQC/CsXz8mrzEfy1uzc5SQKU2hBWHtGp/uJbF2cW/x4vh2OyUvE2VB6icz aLvdXQvbaawFW2zCL4hBre7yFlBs9r1C3TmjQ0G/cLcum2nuKj3qWy1pt5tTLiVG8YSNheWyq9q XLK9ow2hSolnP8w== 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. Reviewed-by: AngeloGioacchino Del Regno Tested-by: Pierre-Louis Bossart Signed-off-by: Krzysztof Kozlowski --- 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 Fri Apr 26 09:04:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13644409 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 456E213D500; Fri, 26 Apr 2024 09:06:35 +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=1714122396; cv=none; b=jbO8yB/HvxU4r2wkbDTNvnids6QEAdESL3aIWRfbV7Fx/REiUdW2pSe0XK5tG85mKJQ8MM+NTvKA8GeUFrgy4N9E4Aw82JW22k/Y5z5CQyhTvOcW0rqjE+U5EPWvzAnnk/c5OnoJ0YwDrRHJhIKIOX56hfaEGMqq+idyCbXdh5k= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714122396; c=relaxed/simple; bh=1j45APt84Z2XIlLb4CgSXht8+Dv+bV1Rc+4llmd3nOU=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=PkQj1GYzqs2unCJX6y7Kjks/IcMHxbIyzKkoe/12STFQAvD8HoQOzk0h3UTDkED5j/Ug6lEhhhTHVJO483wOSZxP6FX2ERiexYGFDESZOYWQDKAEADb6T5amrFdMEQvH0B0pw1GzeaeIHe6FwsZfKQQwIcNWpKWNfSLLXedTmlc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=YQehXKrr; 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="YQehXKrr" Received: by smtp.kernel.org (Postfix) with ESMTPSA id F039AC2BD10; Fri, 26 Apr 2024 09:06:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1714122395; bh=1j45APt84Z2XIlLb4CgSXht8+Dv+bV1Rc+4llmd3nOU=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=YQehXKrr/O/mDKcnEZ/VzzQIguHqfHe3LKofGVlscwcbsgubsTX5zxKFuh6luz/uZ x5QOEM64z9voC8y7xCFEfsScljgkOzCOORs5FaB2kBMLjXa328uZOUQ4Cc0vf/ftt7 pCQRpP0M4CoeX20h+PraWWEdYcWtwHB9uLP+cRvTwa1LcT2sZm28NmT2tCRdSbpk+o Kt2ixUBwlffHVhUkMnuvdCaPu+4qcjJ4xbPnPzOqVSvNJcB+u6/KRm0gXnT43X6Mfs ET1okh6qQUwzrUjqbwwmQeMKpR5+FXRSp5va0PlCO42WRDjS7e1eoTIODOXevTJI0s uyl0UUt2rOfYw== From: Krzysztof Kozlowski Date: Fri, 26 Apr 2024 11:04:01 +0200 Subject: [PATCH v2 14/14] ASoC: SOF: mediatek: mt8195: Constify snd_sof_dsp_ops Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240426-n-const-ops-var-v2-14-e553fe67ae82@kernel.org> References: <20240426-n-const-ops-var-v2-0-e553fe67ae82@kernel.org> In-Reply-To: <20240426-n-const-ops-var-v2-0-e553fe67ae82@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=960; i=krzk@kernel.org; h=from:subject:message-id; bh=1j45APt84Z2XIlLb4CgSXht8+Dv+bV1Rc+4llmd3nOU=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBmK24ri5hbvvP8DkjdiR3gDZ/o/lD3rZTZSVmyL 9OhKlqW3dWJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZituKwAKCRDBN2bmhouD 1wyvD/979AcclNlfz3AHCAc7yWzJwuKG99G5B/V3GZmbbF/Q10mefin+IcW+1AAGJx2Ay8WQH06 /gJnJMTc3D4r/w/4atnDj/NHGDbxk3muVAtK2hnvsR0839UYh5KzKhXGo1/6mOyClf6pbRaFPb1 8jViXGzLcqMaBMKNWSCn7JwanyBjPd6O/O1J1Y5+cQvx5G94upsOAULNXWUOewj0xXSuTWXx4th gSgRLwfnoz+P1gVvurneJUtyWMOFYLINjNVclWPllOnNff328w3UN9Oi5rlxpJttkKV3EvOevXA D6M2gp7LsDUCyBHBVDe8ENUm9reCFKuFACkUnU6Gb3vF4AdUbVglglpD9+UHNr/MQMGNgc4n2g3 ARGqfKiz9ibJC5AzsUnsErKtnJvNl9riPrMHpTxo9kyk5HDPSIg10LMOmzGp6ONl+8KBfGIuqgF 6byJO3lHB14IYBAL77WuIUDDjUT9gIW5NzklFSiTcJys/0UWJ/zg1CnxJlTbq/1mzugQw+bOTeZ rpDZWvYtaNvQVTNIvr5WcZUUR2Pv4bPIf4D15CgtHKvTtbhBoFQqdkyqdvk/GIKXdjLqM2ShDRh OINLugwKjkJTmgFR6c+03NS9CXETbG+wymA6nbTIrHLhl9JrwVOoAxysfBELBVJLlzdCuokBjqv +kpjVSBdxdC1Z4Q== 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. Reviewed-by: AngeloGioacchino Del Regno Tested-by: Pierre-Louis Bossart Signed-off-by: Krzysztof Kozlowski --- 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,