linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzk@kernel.org>
To: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>,
	 Liam Girdwood <lgirdwood@gmail.com>,
	 Peter Ujfalusi <peter.ujfalusi@linux.intel.com>,
	 Bard Liao <yung-chuan.liao@linux.intel.com>,
	 Ranjani Sridharan <ranjani.sridharan@linux.intel.com>,
	 Daniel Baluta <daniel.baluta@nxp.com>,
	 Kai Vehmanen <kai.vehmanen@linux.intel.com>,
	 Mark Brown <broonie@kernel.org>,
	Jaroslav Kysela <perex@perex.cz>,  Takashi Iwai <tiwai@suse.com>,
	Shawn Guo <shawnguo@kernel.org>,
	 Sascha Hauer <s.hauer@pengutronix.de>,
	 Pengutronix Kernel Team <kernel@pengutronix.de>,
	 Fabio Estevam <festevam@gmail.com>,
	 Matthias Brugger <matthias.bgg@gmail.com>,
	 AngeloGioacchino Del Regno
	<angelogioacchino.delregno@collabora.com>
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 <krzk@kernel.org>
Subject: [PATCH v2 07/14] ASoC: SOF: amd: acp: Constify snd_sof_dsp_ops
Date: Fri, 26 Apr 2024 11:03:54 +0200	[thread overview]
Message-ID: <20240426-n-const-ops-var-v2-7-e553fe67ae82@kernel.org> (raw)
In-Reply-To: <20240426-n-const-ops-var-v2-0-e553fe67ae82@kernel.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 <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
 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);

-- 
2.43.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  parent reply	other threads:[~2024-04-26 10:16 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-26  9:03 [PATCH v2 00/14] ASoC: Constify local snd_sof_dsp_ops Krzysztof Kozlowski
2024-04-26  9:03 ` [PATCH v2 01/14] ASoC: SOF: debug: " Krzysztof Kozlowski
2024-04-26  9:03 ` [PATCH v2 02/14] ASoC: SOF: ipc3: " Krzysztof Kozlowski
2024-04-26  9:03 ` [PATCH v2 03/14] ASoC: SOF: pcm: " Krzysztof Kozlowski
2024-04-26  9:03 ` [PATCH v2 04/14] ASoC: SOF: Constify stored pointer to snd_sof_dsp_ops Krzysztof Kozlowski
2024-04-26  9:03 ` [PATCH v2 05/14] ASoC: SOF: intel: pci-tng: Constify snd_sof_dsp_ops Krzysztof Kozlowski
2024-04-26  9:03 ` [PATCH v2 06/14] ASoC: SOF: intel: hda: " Krzysztof Kozlowski
2024-04-26  9:03 ` Krzysztof Kozlowski [this message]
2024-04-26  9:03 ` [PATCH v2 08/14] ASoC: SOF: imx8: " Krzysztof Kozlowski
2024-04-26  9:03 ` [PATCH v2 09/14] ASoC: SOF: imx8m: " Krzysztof Kozlowski
2024-04-26  9:03 ` [PATCH v2 10/14] ASoC: SOF: imx8ulp: " Krzysztof Kozlowski
2024-04-26  9:03 ` [PATCH v2 11/14] ASoC: SOF: intel: bdw: " Krzysztof Kozlowski
2024-04-26  9:03 ` [PATCH v2 12/14] ASoC: SOF: intel: byt: " Krzysztof Kozlowski
2024-04-26  9:04 ` [PATCH v2 13/14] ASoC: SOF: mediatek: mt8186: " Krzysztof Kozlowski
2024-04-26  9:04 ` [PATCH v2 14/14] ASoC: SOF: mediatek: mt8195: " Krzysztof Kozlowski
2024-05-01 13:43 ` [PATCH v2 00/14] ASoC: Constify local snd_sof_dsp_ops Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240426-n-const-ops-var-v2-7-e553fe67ae82@kernel.org \
    --to=krzk@kernel.org \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=broonie@kernel.org \
    --cc=daniel.baluta@nxp.com \
    --cc=festevam@gmail.com \
    --cc=imx@lists.linux.dev \
    --cc=kai.vehmanen@linux.intel.com \
    --cc=kernel@pengutronix.de \
    --cc=lgirdwood@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=matthias.bgg@gmail.com \
    --cc=perex@perex.cz \
    --cc=peter.ujfalusi@linux.intel.com \
    --cc=pierre-louis.bossart@linux.intel.com \
    --cc=ranjani.sridharan@linux.intel.com \
    --cc=s.hauer@pengutronix.de \
    --cc=shawnguo@kernel.org \
    --cc=sound-open-firmware@alsa-project.org \
    --cc=tiwai@suse.com \
    --cc=yung-chuan.liao@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).