linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ASoC: intel: boards: bytcht*: Constify static snd_soc_ops
@ 2021-11-27  9:19 Rikard Falkeborn
  2021-11-29 16:24 ` Pierre-Louis Bossart
  2021-12-01 18:32 ` Mark Brown
  0 siblings, 2 replies; 3+ messages in thread
From: Rikard Falkeborn @ 2021-11-27  9:19 UTC (permalink / raw)
  To: Mark Brown, Jaroslav Kysela, Takashi Iwai
  Cc: Cezary Rojewski, Pierre-Louis Bossart, Liam Girdwood,
	Peter Ujfalusi, Ranjani Sridharan, Kai Vehmanen, alsa-devel,
	linux-kernel, Rikard Falkeborn

These are only assigned to the ops fields in the snd_soc_dai_link struct
which is a pointer to const struct snd_soc_ops. Make them const to allow
the compiler to put them in read-only memory.

Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com>
---
 sound/soc/intel/boards/bytcht_cx2072x.c | 2 +-
 sound/soc/intel/boards/bytcht_nocodec.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/soc/intel/boards/bytcht_cx2072x.c b/sound/soc/intel/boards/bytcht_cx2072x.c
index 0a736308052a..ffd497a5b5a5 100644
--- a/sound/soc/intel/boards/bytcht_cx2072x.c
+++ b/sound/soc/intel/boards/bytcht_cx2072x.c
@@ -147,7 +147,7 @@ static int byt_cht_cx2072x_aif1_startup(struct snd_pcm_substream *substream)
 					    SNDRV_PCM_HW_PARAM_RATE, 48000);
 }
 
-static struct snd_soc_ops byt_cht_cx2072x_aif1_ops = {
+static const struct snd_soc_ops byt_cht_cx2072x_aif1_ops = {
 	.startup = byt_cht_cx2072x_aif1_startup,
 };
 
diff --git a/sound/soc/intel/boards/bytcht_nocodec.c b/sound/soc/intel/boards/bytcht_nocodec.c
index 67b3c4e97864..115c2bcaabd4 100644
--- a/sound/soc/intel/boards/bytcht_nocodec.c
+++ b/sound/soc/intel/boards/bytcht_nocodec.c
@@ -93,7 +93,7 @@ static int aif1_startup(struct snd_pcm_substream *substream)
 			&constraints_48000);
 }
 
-static struct snd_soc_ops aif1_ops = {
+static const struct snd_soc_ops aif1_ops = {
 	.startup = aif1_startup,
 };
 
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] ASoC: intel: boards: bytcht*: Constify static snd_soc_ops
  2021-11-27  9:19 [PATCH] ASoC: intel: boards: bytcht*: Constify static snd_soc_ops Rikard Falkeborn
@ 2021-11-29 16:24 ` Pierre-Louis Bossart
  2021-12-01 18:32 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Pierre-Louis Bossart @ 2021-11-29 16:24 UTC (permalink / raw)
  To: Rikard Falkeborn, Mark Brown, Jaroslav Kysela, Takashi Iwai
  Cc: Cezary Rojewski, Liam Girdwood, Peter Ujfalusi,
	Ranjani Sridharan, Kai Vehmanen, alsa-devel, linux-kernel



On 11/27/21 3:19 AM, Rikard Falkeborn wrote:
> These are only assigned to the ops fields in the snd_soc_dai_link struct
> which is a pointer to const struct snd_soc_ops. Make them const to allow
> the compiler to put them in read-only memory.
> 
> Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com>

Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] ASoC: intel: boards: bytcht*: Constify static snd_soc_ops
  2021-11-27  9:19 [PATCH] ASoC: intel: boards: bytcht*: Constify static snd_soc_ops Rikard Falkeborn
  2021-11-29 16:24 ` Pierre-Louis Bossart
@ 2021-12-01 18:32 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2021-12-01 18:32 UTC (permalink / raw)
  To: Takashi Iwai, Rikard Falkeborn, Jaroslav Kysela
  Cc: linux-kernel, Cezary Rojewski, Ranjani Sridharan, alsa-devel,
	Kai Vehmanen, Peter Ujfalusi, Pierre-Louis Bossart,
	Liam Girdwood

On Sat, 27 Nov 2021 10:19:54 +0100, Rikard Falkeborn wrote:
> These are only assigned to the ops fields in the snd_soc_dai_link struct
> which is a pointer to const struct snd_soc_ops. Make them const to allow
> the compiler to put them in read-only memory.
> 
> 

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/1] ASoC: intel: boards: bytcht*: Constify static snd_soc_ops
      commit: 10b155fd413d31c89057986d0fc3d4ceef8e0e9f

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-12-01 18:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-27  9:19 [PATCH] ASoC: intel: boards: bytcht*: Constify static snd_soc_ops Rikard Falkeborn
2021-11-29 16:24 ` Pierre-Louis Bossart
2021-12-01 18:32 ` Mark Brown

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).