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: 13644381 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 A49ADC04FFE for ; Fri, 26 Apr 2024 09:05:10 +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=w6+qDSE14v107edLDpvXgc0/yYnP6FWMTs4snMNQdhY=; b=Bn0QdNT+A1YYIVJ62odvpFpULg B3WWSN8ODosLfTNn3W4Evu+6BQKiGylUl7A9iaoJQAj/JvY6LtKzfSt9KRTLbPck+4VGz/fEADEW2 WNJovrrQFwpHbpPcGhh8L4/W9Ga8lqcNRm7GXr7M0KGpZPLGRMYvjjrcKI0hPO5YNV6/noZyTOVJ6 ZmwYte159mwccquVf2yQYC8Mo85nTbhAESUn+2RmzrDraI/gOUsdpdG9X3iTqN5VdRcx6LIRVqHpM brkpZNsawer4jjpjts3VGmJh3Lnu/m97uDnMlYN7TV7eMVOig5JfmKpCSUhPCIakkW/d0+C58HXx5 Dtdbn2Gw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s0HW2-0000000BoUN-0j6u; Fri, 26 Apr 2024 09:05:10 +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 1s0HVw-0000000BoPR-0vrx; Fri, 26 Apr 2024 09:05:06 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id 6C2D3CE1BE2; Fri, 26 Apr 2024 09:05:02 +0000 (UTC) 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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240426_020504_805972_759C49D0 X-CRM114-Status: GOOD ( 10.85 ) 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. 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: 13644382 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 CD0EBC4345F for ; Fri, 26 Apr 2024 09:05:25 +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=jqOnOVcQ1VQv2uN0g2XWIg4pk7Bl59XG/VYIpaiU/Yo=; b=1FmWJcafRdq+G3ZWxI41L/pqFt XSVpSXVW5Y0sb3TvCbCvbgwXlBkmgYwOu9I6lERBQpR8Wy5wPPbRAf1TzPAO7b0NQbtabt9/AWVPW kovgt77vGYA43FStAYKLckSZ3chxGf+FM+Dbi8uW2AgsmIAfSmR6/oWctaEWIVhWP/o5jWgSQMWed Fzo2T/RXmpoqXXYafoYne70/gOA3DDg9Z5UYzGuaex6cuCRxzZ6ZtdOwE10ZpzuguhteSHliGV2A/ a3uDjb5coDgJauzVt7GLJ/+CaPUZ0lFFL2Asir0/kX+N3ssoDbzqmY9oTu1rTAJWU+jkMKe62nlxa X/2E8Hzw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s0HWH-0000000Boeg-1R59; Fri, 26 Apr 2024 09:05:25 +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 1s0HW3-0000000BoVS-2VBV; Fri, 26 Apr 2024 09:05:13 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 01AED6200B; Fri, 26 Apr 2024 09:05:11 +0000 (UTC) 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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240426_020511_877842_6C826B87 X-CRM114-Status: GOOD ( 10.48 ) 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. 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: 13644383 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 188EDC4345F for ; Fri, 26 Apr 2024 09:05:38 +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=mBQL+PIIAc3lvQwDm4oZiBE1MBMYDUy1K+mFDFX+Bbw=; b=nk1JrQYRskilpvxrHRFYLgdMuW HBmUQOX3IQvpIvksm/JwNpQOE5HN1NwDHtHLwc2NY65Ax0BieLCUvYRHMpZqtGgLZyEgTuQmpktP/ J/l8tFcOlSkjcuGRxBNDhkN5G8a16Clnqi2Q4F9Ai/CwB4D67KBl2QnmtMxhm5LOi0MEqQTu0rkRa jvJT7mbjn+Voz2EisuEquq61TTcSq6c+axu10uk4aHT5RzWVJT7rI5gXLFpXuhsfz7mpaBkFxgQeo GVUdgiDs2xPO6azKZsU8t5X4RDunFuV3O/xz3WsBdJ7hGp6lxXPM1awD7nPKz01UjzN+S1sJkiUeY 0PkqkzLw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s0HWT-0000000Boka-1e3F; Fri, 26 Apr 2024 09:05:37 +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 1s0HWD-0000000Bob9-3RIZ; Fri, 26 Apr 2024 09:05:23 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id 9B42CCE1BF3; Fri, 26 Apr 2024 09:05:19 +0000 (UTC) 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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240426_020522_291757_0A991C28 X-CRM114-Status: GOOD ( 11.06 ) 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. 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: 13644384 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 20D35C19F4E for ; Fri, 26 Apr 2024 09:05:50 +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=xgIspX/XOWkS6naQW9aOiLZYq8xkVkVkct+K7hYT15Y=; b=qWAFIbr9jLOPXOGA9mfIQqqzhz 6C6nVoI/3flAXyRKBU1vBwnqgzY69M7yWHgmTvjxx9lQhfc7g32pmXpdwyDgR1MZEhrxf4M5nRYrC 3Lz2OpRbe73k4cmN6KEDYz/eRfq/oGNh9qN7BDykwi1owdN/NlnFURccB8PCSeSLntuXHjNqqcfpW TgNrLdOxcTZrEOUx6eEdQr9viiBSuqTBRqtyf5b1P5gBRBNZ3ZCzuoeSoZTfHo9FbGV+uHrvmwJPt 1HPjjYDdXHKMXicrWMdIC5isgo7OFcYDoBv+QajSSUGK8wIcBtEJoRAXPbFYAlAXY6aAl+k1hhoQl gg1P5RLg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s0HWf-0000000BosC-2RXJ; Fri, 26 Apr 2024 09:05:49 +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 1s0HWK-0000000BogA-0dZo; Fri, 26 Apr 2024 09:05:29 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 97E9D61FF6; Fri, 26 Apr 2024 09:05:27 +0000 (UTC) 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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240426_020528_335688_06EFA093 X-CRM114-Status: GOOD ( 12.77 ) 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. 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: 13644385 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 BDEFCC4345F for ; Fri, 26 Apr 2024 09:05: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=jwSH9duyCw3I6txLh40zyi5K1tzIoI14S+RcsVbAReI=; b=ThQcmE0TEMbf7RdBTEkIZ1S1rx gMntVinYgbL3YoXIt2Xt1AagVQNIFXvzfzkD4J4Xk/rwTk/XBpA1BVsi/N/c6ScxipMhIzGAcI07F HNK2/9tRzx19eb7Xa+5AGXescC/vyzZe6gNTFLMHYSU35RnEzyEeAm9ZldgH4zQP6O362P4QMoiCS E9tqtsme0EkZInb/47v631ZyvtUS5wR77kadJbqpcGECN2PeoRXqK6cAxS0BS/nhmTiEhRLqGbYMK M1SHq2v9ORWRutNVHQF8JBCxdCWBTQFtG8F/16KJn2COT8fdeV2dFEk4NZdt26hkx3saONdSMzLj4 YKMOhXqw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s0HWm-0000000Boxo-1Pym; Fri, 26 Apr 2024 09:05:56 +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 1s0HWU-0000000BokX-2F1B; Fri, 26 Apr 2024 09:05:40 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id 689B5CE19D3; Fri, 26 Apr 2024 09:05:36 +0000 (UTC) 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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240426_020539_118617_85E18ADA X-CRM114-Status: GOOD ( 12.49 ) 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. 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: 13644410 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 299E6C4345F for ; Fri, 26 Apr 2024 09:06:07 +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=y8+wwGEzivAG5cCa6MPrmm9hM1tZ8MyShr6Qgsl/mdw=; b=e6v9A8KhGuObyRJnHf1pfcmNk3 PbI0WjYg9unkx/dssGfoPvviVDhaRVnIup+zIMcaBcE4SKseSgDKSFiUTn2/TIKITm7am+qNCT5JC s+qGZyr/2tjxQV1JsDmMkJVMAvDkOKv5RuC2YvBa7HBmwwiCksuU9IiVv7w09K8sg3CrUIWMWOUvB flkbWsMWrg+3xi+WRiNnbanOOCXZeGXPSuiqh65RIsDGTHmf+ZIelX3U9hb5EMd01qnB1Zz1pM0Y4 EVlRQx6Lp2+h3QK9IDkwhNfTPFZTmyMs9dkOgK7hS8mhvWdA6eYLmLVoZafvfoTfqfbCpk7Gs4DbQ KqE8FCSg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s0HWw-0000000Bp3s-2duP; Fri, 26 Apr 2024 09:06:06 +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 1s0HWZ-0000000BopF-2YK2; Fri, 26 Apr 2024 09:05:44 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id F388561FF5; Fri, 26 Apr 2024 09:05:42 +0000 (UTC) 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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240426_020543_848967_E92038A2 X-CRM114-Status: GOOD ( 12.17 ) 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. 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: 13644411 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 51EE5C4345F for ; Fri, 26 Apr 2024 09:06:23 +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=nqJp2FKztvextHEoyJ26Y458/nl9T1Sgpe6quNevA6w=; b=cGRvP1Znwdsvic+1SlNzrGplTw gA8kHPYwA1KE1qA72rLUHxxd1RDLC1PNA5+ASSvFhvapADCOVHqxi/Q8fwi7bnyk0uXlVavIu26Gn Y887VqX2kurZgxIZfmvPv6TwSinaxh5FUs0/UtSzMDWK/EFJ7UFjY6Zoa6j4HwftnhO0rxGttOeTm HsSysAshNUwquDwd+m+itF/x5+N3NWAMURVBAAGaRz/SKh2aNWM7PTwT1jMmOSYD7jZo4IFlFm3Ya O895S/LkQ52tV6HMy7+UxdGhABBmxTzL2iJFcGwXSatlcm1PJ6OlaGK8E8fl0zz/ilDcU1yk27Njf eQtAuk8Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s0HXC-0000000BpCY-3uNY; Fri, 26 Apr 2024 09:06:22 +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 1s0HWg-0000000Bosp-1p1o; Fri, 26 Apr 2024 09:05:52 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id D3B2E61FF5; Fri, 26 Apr 2024 09:05:49 +0000 (UTC) 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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240426_020550_640324_27E4520C 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. 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: 13644412 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 4E89BC4345F for ; Fri, 26 Apr 2024 09:06:35 +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=Xq9xFFOqzOX6ytYAaGztyP+4Q6UPxDYZagVPFV+7qXc=; b=Lsymq8WOb+iDPC/ekq+3UMitZ7 15+BElFqV30vD7c26RSidEou1f8SC1Qn8hg/0Mu+vKacF3L1+om4zlOVDOUHxuEqn+YbA7T3sD4Mt 8tdpSQZSWfWEWHPvs6b3qieMEiSU9E+1qZy/PIJO9NFAdY/PiERW4ZZt4uZ+RgA2RIHT+dYx/82wj e11xO/AFkwm+UFAGExSmVpx+NSTh8gv4eEWGFbgrYATcK+SAyq8wfG/jjmETtAgYLqGIZrOM3n7GH /gS4ZKGYuIuyc3jEQIwEaItT5rxen9SqlE7x2IS2+mmMNI7sKiaIrS545IIZxR1RH1EHNy7R3remG v1juA1ew==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s0HXO-0000000BpIZ-2yYj; Fri, 26 Apr 2024 09:06:34 +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 1s0HWo-0000000Boyi-3jD8; Fri, 26 Apr 2024 09:06:00 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id C3BDFCE1BD9; Fri, 26 Apr 2024 09:05:56 +0000 (UTC) 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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240426_020559_485735_B25DEB35 X-CRM114-Status: GOOD ( 12.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. 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: 13644414 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 3BE44C4345F for ; Fri, 26 Apr 2024 09:06: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=gFW8ygxuGO5aXnLUfBJDB6pTp6oB21vYlf4axVLDv3Y=; b=QhGiq5mGA6eaEWFz99n2QmQ8q6 gQdGH74+PIa6JjnC2d9TIAsimsid7TaSFOMMVOCEAv6ojMVXOfC6N/gaLbQzlMHiXSgslVoIiB0gs 5USWTEdRSIfSJ3Lc7qDhHCKjrKFIYjrMyy9atB77Lhaq+CDHr6qKiKavE3m/YY1MKVIfvRZ5vGzbs QaJqHjIjjfcIkwRsCeZORYZD+NEw2NKSvOkttyApV2B1n4W2/4mUPpjb7ApQVEZw/f8VV+CWScwJo dA1ZURAtOFDWqn0dgy0vJCTFOSVZeRzLM054nys6r+Erk03whIZ4RDLRguBVD0oqs5FL9RdF3l6bF /aN1yXkQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s0HXj-0000000BpVa-2uYQ; Fri, 26 Apr 2024 09:06:55 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1s0HX6-0000000Bp8z-1SSa; Fri, 26 Apr 2024 09:06:16 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Cc:To:In-Reply-To:References: Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Sender:Reply-To:Content-ID:Content-Description; bh=gFW8ygxuGO5aXnLUfBJDB6pTp6oB21vYlf4axVLDv3Y=; b=flOvYmdm8w5HDgsUpJDuV2qNjV ZQIIJRGyp8xMbAfj54Oy8pRRCOz0VR6lwFrtTdo9hNHjtDkaB1HGprAk+rbI1/2Px1vyxAlzUePB9 WIuTC0LDp4DHTBkWQWoKMklt51ES8C7v9m7ROdigEi8MOCHBEZhHhPl/NjNekw4AhjyySiA1KAzU2 s/ceYkjiXfa6FysuEl6Hu4X0PIJIqAAKZuSgnAGpydZdWQrT0gPK8/ByMmVLh1arGNa83qi2QuvnG SetxWzu510SvuRLuy8q3nZ7U3hr6WyJnE/OJMDxWaNzxq1busme/bOulA43CEPA2/cy2ceNdhQEf8 U3hfjKIA==; Received: from sin.source.kernel.org ([145.40.73.55]) by desiato.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1s0HX0-0000000FGNK-2pzT; Fri, 26 Apr 2024 09:06:14 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id 55626CE1BE5; Fri, 26 Apr 2024 09:06:03 +0000 (UTC) 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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240426_100611_848064_47B9FFB0 X-CRM114-Status: GOOD ( 11.75 ) 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. 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: 13644413 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 3EC4EC4345F for ; Fri, 26 Apr 2024 09:06:46 +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=tLFqHcyah1gQ3iiVNX4FYQDBhT55qJx2TpzECwEgFbI=; b=rzpDSsyNRKHHbzbRtvKNdZ6TOK TWxXSen4CKZbyjBCRhVf5UupCGLpySxJqhOAiyjDOrT+qcKTcI5qyZASVCkz11reLPz02npu67MAV t1t6lmB/8CzfvMGwnJp8EF3P29tx6JQ12kJQqt4vsYYdiNBMSYeFrWPIIlBSINtJTmkCzYLW3lwu3 MqJv497guhslNv/OFdUdmhJ35G3BFPtYanAZSVhDB/2UuBqxI+CLpueMN9zn1QeqQuupZqLWBKUj4 k6haQoDSD8vMloMgK19H4AbvPhzJEpcEwKFwuuuoUcB4QX/nqJZcAzYYi46S6/nIq2mVOyslit5K0 3HaM2bMw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s0HXZ-0000000BpNq-2kz0; Fri, 26 Apr 2024 09:06:45 +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 1s0HX0-0000000Bp65-1Mx6; Fri, 26 Apr 2024 09:06:11 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id AF0B662010; Fri, 26 Apr 2024 09:06:09 +0000 (UTC) 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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240426_020610_548177_6DCA6B05 X-CRM114-Status: GOOD ( 11.69 ) 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. 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: 13644415 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 6EADFC4345F for ; Fri, 26 Apr 2024 09:07:10 +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=hIzWefLiX2ZwdGF1WwhrNHAAaLHWq256cV5LDwIlRGI=; b=sZxJXawNQWVZTmvjS0Mg9yNoIK df3C3TC33Bgp15gx3lEXa/3UXxGCc+R+bypY3BTmroYhxln3p/O9o/bwMARzsI+YKMsWPCsPCrFY+ qU+7CQJ+s8zjRcUDjWLXuQ21ICeN1P1a06IJv2eoPpLYwp3wFHczdHSvz3wtM2Ry50fokHJBTwaWp NQLVtcpV1EhssmksO7vwLebP/Hzf4Q/2C1SbE6ZUDOdO5CaQlaN165FKwKCXUd0Ct39dvhRuXV42Y CRhgvfjUM3aaq0mbdUhwJpKhhea41PuNdsrmqfD/i0xXOzGdrYhSdaEfJ5bork4/ph+fEJEOrKTrk 4sjgbMBQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s0HXy-0000000Bpeh-0WSw; Fri, 26 Apr 2024 09:07:10 +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 1s0HX9-0000000Bp9x-3ZVb; Fri, 26 Apr 2024 09:06:22 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id 453D1CE1BF7; Fri, 26 Apr 2024 09:06:17 +0000 (UTC) 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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240426_020620_373822_D4D6137C X-CRM114-Status: GOOD ( 11.56 ) 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. 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: 13644416 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 F3BCDC4345F for ; Fri, 26 Apr 2024 09:07:23 +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=8kMNvFAmt4eBoiTx2UA73GjEHtcM2vNP5WhvC1Bs/+w=; b=rNyLYE6MFTdYbgWeWShGj/zXKd 3d9V6xhnqLgFHh3SHT24dTBqDGoGRB9CEqwlnkhuJ+DhhhWzL7SMPqB7RHKb0J7bW2/mBUCFjVeDm lJjeTA3AFtnh5W//EtX37DpDQ075Ikg8Xz4XGcUfCYHf3UvzNpj2LboCPmnEcxaPXaqCAAk3ZFOcm 8k7d6EtbptBxxXngblU8P9O7eu7vjYTCBfRiCltCESuNFYJnkB5PR+XCS+5e9FrekThtj6bWntcNh b3EejYLbvrquIrJ5xzgnpwzBbDBPxxl9qi2lhPhAvNJV+UelnIVgyAKua5vtiUa67NN+rdae/qT4G rvkCkR7Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s0HYB-0000000Bpp4-2DhU; Fri, 26 Apr 2024 09:07: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 1s0HXF-0000000BpDD-1vtj; Fri, 26 Apr 2024 09:06:27 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id 9C566CE1BA9; Fri, 26 Apr 2024 09:06:23 +0000 (UTC) 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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240426_020625_982463_58D29742 X-CRM114-Status: GOOD ( 11.94 ) 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. 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: 13644417 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 3A1CAC4345F for ; Fri, 26 Apr 2024 09:07: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=kXVgaOquyUNKxyG8BCH4P2Fek4LPf9BbUfk72cErACI=; b=d9aSvuk3NiaSF9KNEQxSsmQ+7f kfXTuZg9axjzIICMB/h1Xd5DQMafWWi7sWbOJ737jfvRmfLkLvkaDolDatD1WKc1BxHzxQhJg4GeW D3Sr44sgnIeqB9NTCSXGxSwBMIV80XjozejdqOKuF81neToXUJCHAcb9VHKyfQmAfB3aolyOEmPg+ K28K6SgP1O8OWo8XFZWM2L5dqYPXY3l9Sq4Wg0RRl3xnYdPZC8kLwaFDe11SNZPI8OG7OKTAGtyIe UxySVVeAU+mdVMqDoOrF9NiP+oU+Xn7wIzfz9b+O8HeojVw1yKd8c6askZxJq3E7z8RYlf0Asj54o bTn7DFpg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s0HYL-0000000BpvZ-33U2; Fri, 26 Apr 2024 09:07:33 +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 1s0HXM-0000000BpFy-0FKC; Fri, 26 Apr 2024 09:06:33 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id 2CC44CE1BFB; Fri, 26 Apr 2024 09:06:30 +0000 (UTC) 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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240426_020632_511740_230D3E74 X-CRM114-Status: GOOD ( 11.82 ) 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. 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: 13644418 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 569E1C4345F for ; Fri, 26 Apr 2024 09:07: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=zJfvt2wqhYIL9b/Yrexqg9WHNS0MNGaW7+8TbDBw6A4=; b=4o+7u/HiWkq0CkZQkyRtiGT/Ol gwAlUImqkI9H09sHcg5he11gazW7sKsP1bLrDz8hc9VX5EyBrEeN4tm+QzVkDgnUdYZL9rSv340Mx ONH0p8KPD8HYBwrBVMcmTIQdAlGIP3nVstMMPpgJrE5Lad/461yEOBq22IjFwXB2map5ZpsPKU2wK DQ0dEm4zXK85BewsaC5haoK7LV/Ku4KghVb0t7KiQlIt+NamVEYbJe0XyTHRFQRx4Ih9YptVKieQB f+mwQbhOc+blrLtFRBYW4WFKCK0a5d04sJSyvQzwiRPcIpP7r4IHqD0PaE8+9weMLc97EpHOcf0l0 asw9d76Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s0HYV-0000000Bq3f-2Xbt; Fri, 26 Apr 2024 09:07: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 1s0HXQ-0000000BpJL-2POe; Fri, 26 Apr 2024 09:06:37 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id E808F6200B; Fri, 26 Apr 2024 09:06:35 +0000 (UTC) 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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240426_020636_729181_41005454 X-CRM114-Status: GOOD ( 11.92 ) 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. 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,