All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next] ASoC: tas2770: Constify static struct snd_soc_dai_ops
@ 2021-04-08  6:26 ` Ye Bin
  0 siblings, 0 replies; 4+ messages in thread
From: Ye Bin @ 2021-04-08  6:26 UTC (permalink / raw)
  To: yebin10, Liam Girdwood, Mark Brown, Jaroslav Kysela,
	Takashi Iwai, Dan Murphy, Kuninori Morimoto, Peter Ujfalusi,
	Pierre-Louis Bossart, Alexander A. Klimov
  Cc: alsa-devel, linux-kernel, kernel-janitors, Hulk Robot

The snd_soc_dai_ops structures is only stored in the ops field of a
snd_soc_dai_driver structure, so make the snd_soc_dai_ops structure
const to allow the compiler to put it in read-only memory.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Ye Bin <yebin10@huawei.com>
---
 sound/soc/codecs/tas2770.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/codecs/tas2770.c b/sound/soc/codecs/tas2770.c
index 781bf9cc4faa..172e79cbe0da 100644
--- a/sound/soc/codecs/tas2770.c
+++ b/sound/soc/codecs/tas2770.c
@@ -464,7 +464,7 @@ static int tas2770_set_dai_tdm_slot(struct snd_soc_dai *dai,
 	return 0;
 }
 
-static struct snd_soc_dai_ops tas2770_dai_ops = {
+static const struct snd_soc_dai_ops tas2770_dai_ops = {
 	.mute_stream = tas2770_mute,
 	.hw_params  = tas2770_hw_params,
 	.set_fmt    = tas2770_set_fmt,


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

* [PATCH -next] ASoC: tas2770: Constify static struct snd_soc_dai_ops
@ 2021-04-08  6:26 ` Ye Bin
  0 siblings, 0 replies; 4+ messages in thread
From: Ye Bin @ 2021-04-08  6:26 UTC (permalink / raw)
  To: yebin10, Liam Girdwood, Mark Brown, Jaroslav Kysela,
	Takashi Iwai, Dan Murphy, Kuninori Morimoto, Peter Ujfalusi,
	Pierre-Louis Bossart, Alexander A. Klimov
  Cc: Hulk Robot, alsa-devel, kernel-janitors, linux-kernel

The snd_soc_dai_ops structures is only stored in the ops field of a
snd_soc_dai_driver structure, so make the snd_soc_dai_ops structure
const to allow the compiler to put it in read-only memory.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Ye Bin <yebin10@huawei.com>
---
 sound/soc/codecs/tas2770.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/codecs/tas2770.c b/sound/soc/codecs/tas2770.c
index 781bf9cc4faa..172e79cbe0da 100644
--- a/sound/soc/codecs/tas2770.c
+++ b/sound/soc/codecs/tas2770.c
@@ -464,7 +464,7 @@ static int tas2770_set_dai_tdm_slot(struct snd_soc_dai *dai,
 	return 0;
 }
 
-static struct snd_soc_dai_ops tas2770_dai_ops = {
+static const struct snd_soc_dai_ops tas2770_dai_ops = {
 	.mute_stream = tas2770_mute,
 	.hw_params  = tas2770_hw_params,
 	.set_fmt    = tas2770_set_fmt,


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

* Re: [PATCH -next] ASoC: tas2770: Constify static struct snd_soc_dai_ops
  2021-04-08  6:26 ` Ye Bin
@ 2021-04-08 16:54   ` Mark Brown
  -1 siblings, 0 replies; 4+ messages in thread
From: Mark Brown @ 2021-04-08 16:54 UTC (permalink / raw)
  To: Dan Murphy, Pierre-Louis Bossart, Ye Bin, Peter Ujfalusi,
	Liam Girdwood, Alexander A. Klimov, Jaroslav Kysela,
	Kuninori Morimoto, Takashi Iwai
  Cc: Mark Brown, linux-kernel, alsa-devel, Hulk Robot, kernel-janitors

On Thu, 8 Apr 2021 14:26:46 +0800, Ye Bin wrote:
> The snd_soc_dai_ops structures is only stored in the ops field of a
> snd_soc_dai_driver structure, so make the snd_soc_dai_ops structure
> const to allow the compiler to put it in read-only memory.

Applied to

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

Thanks!

[1/1] ASoC: tas2770: Constify static struct snd_soc_dai_ops
      commit: f2ec1ebb257155fb534cad390575d696dfd567fb

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] 4+ messages in thread

* Re: [PATCH -next] ASoC: tas2770: Constify static struct snd_soc_dai_ops
@ 2021-04-08 16:54   ` Mark Brown
  0 siblings, 0 replies; 4+ messages in thread
From: Mark Brown @ 2021-04-08 16:54 UTC (permalink / raw)
  To: Dan Murphy, Pierre-Louis Bossart, Ye Bin, Peter Ujfalusi,
	Liam Girdwood, Alexander A. Klimov, Jaroslav Kysela,
	Kuninori Morimoto, Takashi Iwai
  Cc: Hulk Robot, alsa-devel, Mark Brown, kernel-janitors, linux-kernel

On Thu, 8 Apr 2021 14:26:46 +0800, Ye Bin wrote:
> The snd_soc_dai_ops structures is only stored in the ops field of a
> snd_soc_dai_driver structure, so make the snd_soc_dai_ops structure
> const to allow the compiler to put it in read-only memory.

Applied to

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

Thanks!

[1/1] ASoC: tas2770: Constify static struct snd_soc_dai_ops
      commit: f2ec1ebb257155fb534cad390575d696dfd567fb

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] 4+ messages in thread

end of thread, other threads:[~2021-04-08 16:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-08  6:26 [PATCH -next] ASoC: tas2770: Constify static struct snd_soc_dai_ops Ye Bin
2021-04-08  6:26 ` Ye Bin
2021-04-08 16:54 ` Mark Brown
2021-04-08 16:54   ` Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.