All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/7] ASoC: Constify hw_constraints
@ 2017-06-08 21:37 Takashi Iwai
  2017-06-08 21:37 ` [PATCH 1/7] ASoC: cs35l34: " Takashi Iwai
                   ` (6 more replies)
  0 siblings, 7 replies; 20+ messages in thread
From: Takashi Iwai @ 2017-06-08 21:37 UTC (permalink / raw)
  To: Mark Brown
  Cc: alsa-devel, Vinod Koul, Brian Austin, Krzysztof Kozlowski,
	Liam Girdwood, Paul Handrigan, Matthias Brugger

Hi,

this is a series of trivial patches to add const prefix appropriately
to the possible hw_constraint static objects like the previous
patchset for other ALSA drivers.  It's just for hardening.


thanks,

Takashi

===

Takashi Iwai (7):
  ASoC: cs35l34: Constify hw_constraints
  ASoC: cs53l30: Constify hw_constraints
  ASoC: intel: bxt: Constify hw_constraints
  ASoC: intel: byt: Constify hw_constraints
  ASoC: intel: skl: Constify hw_constraints
  ASoC: mediatek: Constify hw_constraints
  ASoC: samsung: Constify hw_constraints

 sound/soc/codecs/cs35l34.c                      |  4 ++--
 sound/soc/codecs/cs53l30.c                      |  2 +-
 sound/soc/intel/boards/bxt_da7219_max98357a.c   | 12 ++++++------
 sound/soc/intel/boards/bxt_rt298.c              | 12 ++++++------
 sound/soc/intel/boards/bytcht_nocodec.c         |  4 ++--
 sound/soc/intel/boards/bytcr_rt5651.c           |  4 ++--
 sound/soc/intel/boards/skl_nau88l25_max98357a.c | 16 ++++++++--------
 sound/soc/intel/boards/skl_nau88l25_ssm4567.c   | 16 ++++++++--------
 sound/soc/intel/boards/skl_rt286.c              | 12 ++++++------
 sound/soc/mediatek/mt2701/mt2701-cs42448.c      |  2 +-
 sound/soc/samsung/s3c24xx_uda134x.c             |  2 +-
 11 files changed, 43 insertions(+), 43 deletions(-)

-- 
2.13.0

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

* [PATCH 1/7] ASoC: cs35l34: Constify hw_constraints
  2017-06-08 21:37 [PATCH 0/7] ASoC: Constify hw_constraints Takashi Iwai
@ 2017-06-08 21:37 ` Takashi Iwai
  2017-06-13 21:08   ` Applied "ASoC: cs35l34: Constify hw_constraints" to the asoc tree Mark Brown
  2017-06-08 21:37 ` [PATCH 2/7] ASoC: cs53l30: Constify hw_constraints Takashi Iwai
                   ` (5 subsequent siblings)
  6 siblings, 1 reply; 20+ messages in thread
From: Takashi Iwai @ 2017-06-08 21:37 UTC (permalink / raw)
  To: Mark Brown
  Cc: alsa-devel, Vinod Koul, Brian Austin, Krzysztof Kozlowski,
	Liam Girdwood, Paul Handrigan, Matthias Brugger

snd_pcm_hw_constraint_list(), *_ratnums() and *_ratdens() receive the
const pointers.  Constify the corresponding static objects for better
hardening.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
 sound/soc/codecs/cs35l34.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/soc/codecs/cs35l34.c b/sound/soc/codecs/cs35l34.c
index 7c5d1510cf2c..0a747c66cc6c 100644
--- a/sound/soc/codecs/cs35l34.c
+++ b/sound/soc/codecs/cs35l34.c
@@ -567,12 +567,12 @@ static int cs35l34_pcm_hw_params(struct snd_pcm_substream *substream,
 	return ret;
 }
 
-static unsigned int cs35l34_src_rates[] = {
+static const unsigned int cs35l34_src_rates[] = {
 	8000, 11025, 12000, 16000, 22050, 24000, 32000, 44100, 48000
 };
 
 
-static struct snd_pcm_hw_constraint_list cs35l34_constraints = {
+static const struct snd_pcm_hw_constraint_list cs35l34_constraints = {
 	.count  = ARRAY_SIZE(cs35l34_src_rates),
 	.list   = cs35l34_src_rates,
 };
-- 
2.13.0

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

* [PATCH 2/7] ASoC: cs53l30: Constify hw_constraints
  2017-06-08 21:37 [PATCH 0/7] ASoC: Constify hw_constraints Takashi Iwai
  2017-06-08 21:37 ` [PATCH 1/7] ASoC: cs35l34: " Takashi Iwai
@ 2017-06-08 21:37 ` Takashi Iwai
  2017-06-13 21:08   ` Applied "ASoC: cs53l30: Constify hw_constraints" to the asoc tree Mark Brown
  2017-06-08 21:37 ` [PATCH 3/7] ASoC: intel: bxt: Constify hw_constraints Takashi Iwai
                   ` (4 subsequent siblings)
  6 siblings, 1 reply; 20+ messages in thread
From: Takashi Iwai @ 2017-06-08 21:37 UTC (permalink / raw)
  To: Mark Brown
  Cc: alsa-devel, Vinod Koul, Brian Austin, Krzysztof Kozlowski,
	Liam Girdwood, Paul Handrigan, Matthias Brugger

snd_pcm_hw_constraint_list(), *_ratnums() and *_ratdens() receive the
const pointers.  Constify the corresponding static objects for better
hardening.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
 sound/soc/codecs/cs53l30.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/codecs/cs53l30.c b/sound/soc/codecs/cs53l30.c
index 1e0d5973b758..06933a5d0a75 100644
--- a/sound/soc/codecs/cs53l30.c
+++ b/sound/soc/codecs/cs53l30.c
@@ -747,7 +747,7 @@ static unsigned int const cs53l30_src_rates[] = {
 	8000, 11025, 12000, 16000, 22050, 24000, 32000, 44100, 48000
 };
 
-static struct snd_pcm_hw_constraint_list src_constraints = {
+static const struct snd_pcm_hw_constraint_list src_constraints = {
 	.count = ARRAY_SIZE(cs53l30_src_rates),
 	.list = cs53l30_src_rates,
 };
-- 
2.13.0

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

* [PATCH 3/7] ASoC: intel: bxt: Constify hw_constraints
  2017-06-08 21:37 [PATCH 0/7] ASoC: Constify hw_constraints Takashi Iwai
  2017-06-08 21:37 ` [PATCH 1/7] ASoC: cs35l34: " Takashi Iwai
  2017-06-08 21:37 ` [PATCH 2/7] ASoC: cs53l30: Constify hw_constraints Takashi Iwai
@ 2017-06-08 21:37 ` Takashi Iwai
  2017-06-13 20:26   ` Mark Brown
  2017-06-08 21:37 ` [PATCH 4/7] ASoC: intel: byt: " Takashi Iwai
                   ` (3 subsequent siblings)
  6 siblings, 1 reply; 20+ messages in thread
From: Takashi Iwai @ 2017-06-08 21:37 UTC (permalink / raw)
  To: Mark Brown
  Cc: alsa-devel, Vinod Koul, Brian Austin, Krzysztof Kozlowski,
	Liam Girdwood, Paul Handrigan, Matthias Brugger

snd_pcm_hw_constraint_list(), *_ratnums() and *_ratdens() receive the
const pointers.  Constify the corresponding static objects for better
hardening.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
 sound/soc/intel/boards/bxt_da7219_max98357a.c | 12 ++++++------
 sound/soc/intel/boards/bxt_rt298.c            | 12 ++++++------
 2 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/sound/soc/intel/boards/bxt_da7219_max98357a.c b/sound/soc/intel/boards/bxt_da7219_max98357a.c
index 3a8c4d954a91..1429eb391da8 100644
--- a/sound/soc/intel/boards/bxt_da7219_max98357a.c
+++ b/sound/soc/intel/boards/bxt_da7219_max98357a.c
@@ -238,31 +238,31 @@ static int broxton_da7219_fe_init(struct snd_soc_pcm_runtime *rtd)
 	return 0;
 }
 
-static unsigned int rates[] = {
+static const unsigned int rates[] = {
 	48000,
 };
 
-static struct snd_pcm_hw_constraint_list constraints_rates = {
+static const struct snd_pcm_hw_constraint_list constraints_rates = {
 	.count = ARRAY_SIZE(rates),
 	.list  = rates,
 	.mask = 0,
 };
 
-static unsigned int channels[] = {
+static const unsigned int channels[] = {
 	DUAL_CHANNEL,
 };
 
-static struct snd_pcm_hw_constraint_list constraints_channels = {
+static const struct snd_pcm_hw_constraint_list constraints_channels = {
 	.count = ARRAY_SIZE(channels),
 	.list = channels,
 	.mask = 0,
 };
 
-static unsigned int channels_quad[] = {
+static const unsigned int channels_quad[] = {
 	QUAD_CHANNEL,
 };
 
-static struct snd_pcm_hw_constraint_list constraints_channels_quad = {
+static const struct snd_pcm_hw_constraint_list constraints_channels_quad = {
 	.count = ARRAY_SIZE(channels_quad),
 	.list = channels_quad,
 	.mask = 0,
diff --git a/sound/soc/intel/boards/bxt_rt298.c b/sound/soc/intel/boards/bxt_rt298.c
index 1a68d043c803..1008076e084f 100644
--- a/sound/soc/intel/boards/bxt_rt298.c
+++ b/sound/soc/intel/boards/bxt_rt298.c
@@ -207,11 +207,11 @@ static const struct snd_soc_ops broxton_rt298_ops = {
 	.hw_params = broxton_rt298_hw_params,
 };
 
-static unsigned int rates[] = {
+static const unsigned int rates[] = {
 	48000,
 };
 
-static struct snd_pcm_hw_constraint_list constraints_rates = {
+static const struct snd_pcm_hw_constraint_list constraints_rates = {
 	.count = ARRAY_SIZE(rates),
 	.list  = rates,
 	.mask = 0,
@@ -230,11 +230,11 @@ static int broxton_dmic_fixup(struct snd_soc_pcm_runtime *rtd,
 	return 0;
 }
 
-static unsigned int channels_dmic[] = {
+static const unsigned int channels_dmic[] = {
 	2, 4,
 };
 
-static struct snd_pcm_hw_constraint_list constraints_dmic_channels = {
+static const struct snd_pcm_hw_constraint_list constraints_dmic_channels = {
 	.count = ARRAY_SIZE(channels_dmic),
 	.list = channels_dmic,
 	.mask = 0,
@@ -256,11 +256,11 @@ static const struct snd_soc_ops broxton_dmic_ops = {
 	.startup = broxton_dmic_startup,
 };
 
-static unsigned int channels[] = {
+static const unsigned int channels[] = {
 	2,
 };
 
-static struct snd_pcm_hw_constraint_list constraints_channels = {
+static const struct snd_pcm_hw_constraint_list constraints_channels = {
 	.count = ARRAY_SIZE(channels),
 	.list = channels,
 	.mask = 0,
-- 
2.13.0

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

* [PATCH 4/7] ASoC: intel: byt: Constify hw_constraints
  2017-06-08 21:37 [PATCH 0/7] ASoC: Constify hw_constraints Takashi Iwai
                   ` (2 preceding siblings ...)
  2017-06-08 21:37 ` [PATCH 3/7] ASoC: intel: bxt: Constify hw_constraints Takashi Iwai
@ 2017-06-08 21:37 ` Takashi Iwai
  2017-06-09  3:36   ` Vinod Koul
  2017-06-13 21:08   ` Applied "ASoC: intel: byt: Constify hw_constraints" to the asoc tree Mark Brown
  2017-06-08 21:37 ` [PATCH 5/7] ASoC: intel: skl: Constify hw_constraints Takashi Iwai
                   ` (2 subsequent siblings)
  6 siblings, 2 replies; 20+ messages in thread
From: Takashi Iwai @ 2017-06-08 21:37 UTC (permalink / raw)
  To: Mark Brown
  Cc: alsa-devel, Vinod Koul, Brian Austin, Krzysztof Kozlowski,
	Liam Girdwood, Paul Handrigan, Matthias Brugger

snd_pcm_hw_constraint_list(), *_ratnums() and *_ratdens() receive the
const pointers.  Constify the corresponding static objects for better
hardening.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
 sound/soc/intel/boards/bytcht_nocodec.c | 4 ++--
 sound/soc/intel/boards/bytcr_rt5651.c   | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/sound/soc/intel/boards/bytcht_nocodec.c b/sound/soc/intel/boards/bytcht_nocodec.c
index 89853eeaaf9d..1dd9441806fa 100644
--- a/sound/soc/intel/boards/bytcht_nocodec.c
+++ b/sound/soc/intel/boards/bytcht_nocodec.c
@@ -85,11 +85,11 @@ static int codec_fixup(struct snd_soc_pcm_runtime *rtd,
 	return 0;
 }
 
-static unsigned int rates_48000[] = {
+static const unsigned int rates_48000[] = {
 	48000,
 };
 
-static struct snd_pcm_hw_constraint_list constraints_48000 = {
+static const struct snd_pcm_hw_constraint_list constraints_48000 = {
 	.count = ARRAY_SIZE(rates_48000),
 	.list  = rates_48000,
 };
diff --git a/sound/soc/intel/boards/bytcr_rt5651.c b/sound/soc/intel/boards/bytcr_rt5651.c
index 8164bec63bf1..4a3516b38c2c 100644
--- a/sound/soc/intel/boards/bytcr_rt5651.c
+++ b/sound/soc/intel/boards/bytcr_rt5651.c
@@ -203,11 +203,11 @@ static int byt_rt5651_codec_fixup(struct snd_soc_pcm_runtime *rtd,
 	return 0;
 }
 
-static unsigned int rates_48000[] = {
+static const unsigned int rates_48000[] = {
 	48000,
 };
 
-static struct snd_pcm_hw_constraint_list constraints_48000 = {
+static const struct snd_pcm_hw_constraint_list constraints_48000 = {
 	.count = ARRAY_SIZE(rates_48000),
 	.list  = rates_48000,
 };
-- 
2.13.0

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

* [PATCH 5/7] ASoC: intel: skl: Constify hw_constraints
  2017-06-08 21:37 [PATCH 0/7] ASoC: Constify hw_constraints Takashi Iwai
                   ` (3 preceding siblings ...)
  2017-06-08 21:37 ` [PATCH 4/7] ASoC: intel: byt: " Takashi Iwai
@ 2017-06-08 21:37 ` Takashi Iwai
  2017-06-09  3:36   ` Vinod Koul
  2017-06-13 21:08   ` Applied "ASoC: intel: skl: Constify hw_constraints" to the asoc tree Mark Brown
  2017-06-08 21:37 ` [PATCH 6/7] ASoC: mediatek: Constify hw_constraints Takashi Iwai
  2017-06-08 21:37 ` [PATCH 7/7] ASoC: samsung: Constify hw_constraints Takashi Iwai
  6 siblings, 2 replies; 20+ messages in thread
From: Takashi Iwai @ 2017-06-08 21:37 UTC (permalink / raw)
  To: Mark Brown
  Cc: alsa-devel, Vinod Koul, Brian Austin, Krzysztof Kozlowski,
	Liam Girdwood, Paul Handrigan, Matthias Brugger

snd_pcm_hw_constraint_list(), *_ratnums() and *_ratdens() receive the
const pointers.  Constify the corresponding static objects for better
hardening.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
 sound/soc/intel/boards/skl_nau88l25_max98357a.c | 16 ++++++++--------
 sound/soc/intel/boards/skl_nau88l25_ssm4567.c   | 16 ++++++++--------
 sound/soc/intel/boards/skl_rt286.c              | 12 ++++++------
 3 files changed, 22 insertions(+), 22 deletions(-)

diff --git a/sound/soc/intel/boards/skl_nau88l25_max98357a.c b/sound/soc/intel/boards/skl_nau88l25_max98357a.c
index 3b12bc1fa518..5ed0aa27b467 100644
--- a/sound/soc/intel/boards/skl_nau88l25_max98357a.c
+++ b/sound/soc/intel/boards/skl_nau88l25_max98357a.c
@@ -266,21 +266,21 @@ static int skylake_nau8825_fe_init(struct snd_soc_pcm_runtime *rtd)
 	return 0;
 }
 
-static unsigned int rates[] = {
+static const unsigned int rates[] = {
 	48000,
 };
 
-static struct snd_pcm_hw_constraint_list constraints_rates = {
+static const struct snd_pcm_hw_constraint_list constraints_rates = {
 	.count = ARRAY_SIZE(rates),
 	.list  = rates,
 	.mask = 0,
 };
 
-static unsigned int channels[] = {
+static const unsigned int channels[] = {
 	2,
 };
 
-static struct snd_pcm_hw_constraint_list constraints_channels = {
+static const struct snd_pcm_hw_constraint_list constraints_channels = {
 	.count = ARRAY_SIZE(channels),
 	.list = channels,
 	.mask = 0,
@@ -348,11 +348,11 @@ static int skylake_dmic_fixup(struct snd_soc_pcm_runtime *rtd,
 	return 0;
 }
 
-static unsigned int channels_dmic[] = {
+static const unsigned int channels_dmic[] = {
 	2, 4,
 };
 
-static struct snd_pcm_hw_constraint_list constraints_dmic_channels = {
+static const struct snd_pcm_hw_constraint_list constraints_dmic_channels = {
 	.count = ARRAY_SIZE(channels_dmic),
 	.list = channels_dmic,
 	.mask = 0,
@@ -384,11 +384,11 @@ static const struct snd_soc_ops skylake_dmic_ops = {
 	.startup = skylake_dmic_startup,
 };
 
-static unsigned int rates_16000[] = {
+static const unsigned int rates_16000[] = {
 	16000,
 };
 
-static struct snd_pcm_hw_constraint_list constraints_16000 = {
+static const struct snd_pcm_hw_constraint_list constraints_16000 = {
 	.count = ARRAY_SIZE(rates_16000),
 	.list  = rates_16000,
 };
diff --git a/sound/soc/intel/boards/skl_nau88l25_ssm4567.c b/sound/soc/intel/boards/skl_nau88l25_ssm4567.c
index eb7751b0599b..01b8b140bb08 100644
--- a/sound/soc/intel/boards/skl_nau88l25_ssm4567.c
+++ b/sound/soc/intel/boards/skl_nau88l25_ssm4567.c
@@ -297,21 +297,21 @@ static int skylake_nau8825_fe_init(struct snd_soc_pcm_runtime *rtd)
 	return 0;
 }
 
-static unsigned int rates[] = {
+static const unsigned int rates[] = {
 	48000,
 };
 
-static struct snd_pcm_hw_constraint_list constraints_rates = {
+static const struct snd_pcm_hw_constraint_list constraints_rates = {
 	.count = ARRAY_SIZE(rates),
 	.list  = rates,
 	.mask = 0,
 };
 
-static unsigned int channels[] = {
+static const unsigned int channels[] = {
 	2,
 };
 
-static struct snd_pcm_hw_constraint_list constraints_channels = {
+static const struct snd_pcm_hw_constraint_list constraints_channels = {
 	.count = ARRAY_SIZE(channels),
 	.list = channels,
 	.mask = 0,
@@ -397,11 +397,11 @@ static const struct snd_soc_ops skylake_nau8825_ops = {
 	.hw_params = skylake_nau8825_hw_params,
 };
 
-static unsigned int channels_dmic[] = {
+static const unsigned int channels_dmic[] = {
 	2, 4,
 };
 
-static struct snd_pcm_hw_constraint_list constraints_dmic_channels = {
+static const struct snd_pcm_hw_constraint_list constraints_dmic_channels = {
 	.count = ARRAY_SIZE(channels_dmic),
 	.list = channels_dmic,
 	.mask = 0,
@@ -433,11 +433,11 @@ static const struct snd_soc_ops skylake_dmic_ops = {
 	.startup = skylake_dmic_startup,
 };
 
-static unsigned int rates_16000[] = {
+static const unsigned int rates_16000[] = {
 	16000,
 };
 
-static struct snd_pcm_hw_constraint_list constraints_16000 = {
+static const struct snd_pcm_hw_constraint_list constraints_16000 = {
 	.count = ARRAY_SIZE(rates_16000),
 	.list  = rates_16000,
 };
diff --git a/sound/soc/intel/boards/skl_rt286.c b/sound/soc/intel/boards/skl_rt286.c
index f5ab7b8d51d1..e08c71625fd0 100644
--- a/sound/soc/intel/boards/skl_rt286.c
+++ b/sound/soc/intel/boards/skl_rt286.c
@@ -165,21 +165,21 @@ static int skylake_hdmi_init(struct snd_soc_pcm_runtime *rtd)
 	return 0;
 }
 
-static unsigned int rates[] = {
+static const unsigned int rates[] = {
 	48000,
 };
 
-static struct snd_pcm_hw_constraint_list constraints_rates = {
+static const struct snd_pcm_hw_constraint_list constraints_rates = {
 	.count = ARRAY_SIZE(rates),
 	.list  = rates,
 	.mask = 0,
 };
 
-static unsigned int channels[] = {
+static const unsigned int channels[] = {
 	2,
 };
 
-static struct snd_pcm_hw_constraint_list constraints_channels = {
+static const struct snd_pcm_hw_constraint_list constraints_channels = {
 	.count = ARRAY_SIZE(channels),
 	.list = channels,
 	.mask = 0,
@@ -264,11 +264,11 @@ static int skylake_dmic_fixup(struct snd_soc_pcm_runtime *rtd,
 	return 0;
 }
 
-static unsigned int channels_dmic[] = {
+static const unsigned int channels_dmic[] = {
 	2, 4,
 };
 
-static struct snd_pcm_hw_constraint_list constraints_dmic_channels = {
+static const struct snd_pcm_hw_constraint_list constraints_dmic_channels = {
 	.count = ARRAY_SIZE(channels_dmic),
 	.list = channels_dmic,
 	.mask = 0,
-- 
2.13.0

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

* [PATCH 6/7] ASoC: mediatek: Constify hw_constraints
  2017-06-08 21:37 [PATCH 0/7] ASoC: Constify hw_constraints Takashi Iwai
                   ` (4 preceding siblings ...)
  2017-06-08 21:37 ` [PATCH 5/7] ASoC: intel: skl: Constify hw_constraints Takashi Iwai
@ 2017-06-08 21:37 ` Takashi Iwai
  2017-06-09  7:39   ` Matthias Brugger
  2017-06-13 21:08   ` Applied "ASoC: mediatek: Constify hw_constraints" to the asoc tree Mark Brown
  2017-06-08 21:37 ` [PATCH 7/7] ASoC: samsung: Constify hw_constraints Takashi Iwai
  6 siblings, 2 replies; 20+ messages in thread
From: Takashi Iwai @ 2017-06-08 21:37 UTC (permalink / raw)
  To: Mark Brown
  Cc: alsa-devel, Vinod Koul, Brian Austin, Krzysztof Kozlowski,
	Liam Girdwood, Paul Handrigan, Matthias Brugger

snd_pcm_hw_constraint_list(), *_ratnums() and *_ratdens() receive the
const pointers.  Constify the corresponding static objects for better
hardening.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
 sound/soc/mediatek/mt2701/mt2701-cs42448.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/mediatek/mt2701/mt2701-cs42448.c b/sound/soc/mediatek/mt2701/mt2701-cs42448.c
index aa5b31b121e3..70f61d53fe05 100644
--- a/sound/soc/mediatek/mt2701/mt2701-cs42448.c
+++ b/sound/soc/mediatek/mt2701/mt2701-cs42448.c
@@ -107,7 +107,7 @@ static const struct snd_kcontrol_new mt2701_cs42448_controls[] = {
 
 static const unsigned int mt2701_cs42448_sampling_rates[] = {48000};
 
-static struct snd_pcm_hw_constraint_list mt2701_cs42448_constraints_rates = {
+static const struct snd_pcm_hw_constraint_list mt2701_cs42448_constraints_rates = {
 		.count = ARRAY_SIZE(mt2701_cs42448_sampling_rates),
 		.list = mt2701_cs42448_sampling_rates,
 		.mask = 0,
-- 
2.13.0

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

* [PATCH 7/7] ASoC: samsung: Constify hw_constraints
  2017-06-08 21:37 [PATCH 0/7] ASoC: Constify hw_constraints Takashi Iwai
                   ` (5 preceding siblings ...)
  2017-06-08 21:37 ` [PATCH 6/7] ASoC: mediatek: Constify hw_constraints Takashi Iwai
@ 2017-06-08 21:37 ` Takashi Iwai
  2017-06-09  7:09   ` Krzysztof Kozlowski
  2017-06-13 21:08   ` Applied "ASoC: samsung: Constify hw_constraints" to the asoc tree Mark Brown
  6 siblings, 2 replies; 20+ messages in thread
From: Takashi Iwai @ 2017-06-08 21:37 UTC (permalink / raw)
  To: Mark Brown
  Cc: alsa-devel, Vinod Koul, Brian Austin, Krzysztof Kozlowski,
	Liam Girdwood, Paul Handrigan, Matthias Brugger

snd_pcm_hw_constraint_list(), *_ratnums() and *_ratdens() receive the
const pointers.  Constify the corresponding static objects for better
hardening.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
 sound/soc/samsung/s3c24xx_uda134x.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/samsung/s3c24xx_uda134x.c b/sound/soc/samsung/s3c24xx_uda134x.c
index 81a78940967c..55538e333cc8 100644
--- a/sound/soc/samsung/s3c24xx_uda134x.c
+++ b/sound/soc/samsung/s3c24xx_uda134x.c
@@ -44,7 +44,7 @@ struct s3c24xx_uda134x {
 
 static unsigned int rates[33 * 2];
 #ifdef ENFORCE_RATES
-static struct snd_pcm_hw_constraint_list hw_constraints_rates = {
+static const struct snd_pcm_hw_constraint_list hw_constraints_rates = {
 	.count	= ARRAY_SIZE(rates),
 	.list	= rates,
 	.mask	= 0,
-- 
2.13.0

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

* Re: [PATCH 4/7] ASoC: intel: byt: Constify hw_constraints
  2017-06-08 21:37 ` [PATCH 4/7] ASoC: intel: byt: " Takashi Iwai
@ 2017-06-09  3:36   ` Vinod Koul
  2017-06-13 21:08   ` Applied "ASoC: intel: byt: Constify hw_constraints" to the asoc tree Mark Brown
  1 sibling, 0 replies; 20+ messages in thread
From: Vinod Koul @ 2017-06-09  3:36 UTC (permalink / raw)
  To: Takashi Iwai
  Cc: alsa-devel, Brian Austin, Krzysztof Kozlowski, Liam Girdwood,
	Mark Brown, Paul Handrigan, Matthias Brugger

On Thu, Jun 08, 2017 at 11:37:22PM +0200, Takashi Iwai wrote:
> snd_pcm_hw_constraint_list(), *_ratnums() and *_ratdens() receive the
> const pointers.  Constify the corresponding static objects for better
> hardening.
> 

Acked-By: Vinod Koul <vinod.koul@intel.com>

-- 
~Vinod

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

* Re: [PATCH 5/7] ASoC: intel: skl: Constify hw_constraints
  2017-06-08 21:37 ` [PATCH 5/7] ASoC: intel: skl: Constify hw_constraints Takashi Iwai
@ 2017-06-09  3:36   ` Vinod Koul
  2017-06-13 21:08   ` Applied "ASoC: intel: skl: Constify hw_constraints" to the asoc tree Mark Brown
  1 sibling, 0 replies; 20+ messages in thread
From: Vinod Koul @ 2017-06-09  3:36 UTC (permalink / raw)
  To: Takashi Iwai
  Cc: alsa-devel, Brian Austin, Krzysztof Kozlowski, Liam Girdwood,
	Mark Brown, Paul Handrigan, Matthias Brugger

On Thu, Jun 08, 2017 at 11:37:23PM +0200, Takashi Iwai wrote:
> snd_pcm_hw_constraint_list(), *_ratnums() and *_ratdens() receive the
> const pointers.  Constify the corresponding static objects for better
> hardening.

Acked-By: Vinod Koul <vinod.koul@intel.com>

-- 
~Vinod

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

* Re: [PATCH 7/7] ASoC: samsung: Constify hw_constraints
  2017-06-08 21:37 ` [PATCH 7/7] ASoC: samsung: Constify hw_constraints Takashi Iwai
@ 2017-06-09  7:09   ` Krzysztof Kozlowski
  2017-06-13 21:08   ` Applied "ASoC: samsung: Constify hw_constraints" to the asoc tree Mark Brown
  1 sibling, 0 replies; 20+ messages in thread
From: Krzysztof Kozlowski @ 2017-06-09  7:09 UTC (permalink / raw)
  To: Takashi Iwai
  Cc: alsa-devel, Vinod Koul, Brian Austin, Paul Handrigan,
	Liam Girdwood, Mark Brown, Matthias Brugger

On Thu, Jun 08, 2017 at 11:37:25PM +0200, Takashi Iwai wrote:
> snd_pcm_hw_constraint_list(), *_ratnums() and *_ratdens() receive the
> const pointers.  Constify the corresponding static objects for better
> hardening.
> 
> Signed-off-by: Takashi Iwai <tiwai@suse.de>
> ---
>  sound/soc/samsung/s3c24xx_uda134x.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>

Best regards,
Krzysztof

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

* Re: [PATCH 6/7] ASoC: mediatek: Constify hw_constraints
  2017-06-08 21:37 ` [PATCH 6/7] ASoC: mediatek: Constify hw_constraints Takashi Iwai
@ 2017-06-09  7:39   ` Matthias Brugger
  2017-06-13 21:08   ` Applied "ASoC: mediatek: Constify hw_constraints" to the asoc tree Mark Brown
  1 sibling, 0 replies; 20+ messages in thread
From: Matthias Brugger @ 2017-06-09  7:39 UTC (permalink / raw)
  To: Takashi Iwai, Mark Brown
  Cc: alsa-devel, Vinod Koul, Brian Austin, Krzysztof Kozlowski,
	Liam Girdwood, Paul Handrigan



On 08/06/17 23:37, Takashi Iwai wrote:
> snd_pcm_hw_constraint_list(), *_ratnums() and *_ratdens() receive the
> const pointers.  Constify the corresponding static objects for better
> hardening.
> 
> Signed-off-by: Takashi Iwai <tiwai@suse.de>
> ---
>   sound/soc/mediatek/mt2701/mt2701-cs42448.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/sound/soc/mediatek/mt2701/mt2701-cs42448.c b/sound/soc/mediatek/mt2701/mt2701-cs42448.c
> index aa5b31b121e3..70f61d53fe05 100644
> --- a/sound/soc/mediatek/mt2701/mt2701-cs42448.c
> +++ b/sound/soc/mediatek/mt2701/mt2701-cs42448.c
> @@ -107,7 +107,7 @@ static const struct snd_kcontrol_new mt2701_cs42448_controls[] = {
>   
>   static const unsigned int mt2701_cs42448_sampling_rates[] = {48000};
>   
> -static struct snd_pcm_hw_constraint_list mt2701_cs42448_constraints_rates = {
> +static const struct snd_pcm_hw_constraint_list mt2701_cs42448_constraints_rates = {
>   		.count = ARRAY_SIZE(mt2701_cs42448_sampling_rates),
>   		.list = mt2701_cs42448_sampling_rates,
>   		.mask = 0,
> 

Acked-By: Matthias Brugger <matthias.bgg@gmail.com>

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

* Re: [PATCH 3/7] ASoC: intel: bxt: Constify hw_constraints
  2017-06-08 21:37 ` [PATCH 3/7] ASoC: intel: bxt: Constify hw_constraints Takashi Iwai
@ 2017-06-13 20:26   ` Mark Brown
  2017-06-13 20:29     ` Takashi Iwai
  0 siblings, 1 reply; 20+ messages in thread
From: Mark Brown @ 2017-06-13 20:26 UTC (permalink / raw)
  To: Takashi Iwai
  Cc: alsa-devel, Vinod Koul, Brian Austin, Krzysztof Kozlowski,
	Liam Girdwood, Paul Handrigan, Matthias Brugger


[-- Attachment #1.1: Type: text/plain, Size: 286 bytes --]

On Thu, Jun 08, 2017 at 11:37:21PM +0200, Takashi Iwai wrote:
> snd_pcm_hw_constraint_list(), *_ratnums() and *_ratdens() receive the
> const pointers.  Constify the corresponding static objects for better
> hardening.

This doesn't apply against current code, please check and resend.

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



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

* Re: [PATCH 3/7] ASoC: intel: bxt: Constify hw_constraints
  2017-06-13 20:26   ` Mark Brown
@ 2017-06-13 20:29     ` Takashi Iwai
  0 siblings, 0 replies; 20+ messages in thread
From: Takashi Iwai @ 2017-06-13 20:29 UTC (permalink / raw)
  To: Mark Brown
  Cc: alsa-devel, Vinod Koul, Brian Austin, Krzysztof Kozlowski,
	Liam Girdwood, Paul Handrigan, Matthias Brugger

On Tue, 13 Jun 2017 22:26:52 +0200,
Mark Brown wrote:
> 
> On Thu, Jun 08, 2017 at 11:37:21PM +0200, Takashi Iwai wrote:
> > snd_pcm_hw_constraint_list(), *_ratnums() and *_ratdens() receive the
> > const pointers.  Constify the corresponding static objects for better
> > hardening.
> 
> This doesn't apply against current code, please check and resend.

Or, you can send a pull request more often, instead of only once per
development cycle? :)

Don't worry, mine is a trivial one, will resend.


thanks,

Takashi

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

* Applied "ASoC: samsung: Constify hw_constraints" to the asoc tree
  2017-06-08 21:37 ` [PATCH 7/7] ASoC: samsung: Constify hw_constraints Takashi Iwai
  2017-06-09  7:09   ` Krzysztof Kozlowski
@ 2017-06-13 21:08   ` Mark Brown
  1 sibling, 0 replies; 20+ messages in thread
From: Mark Brown @ 2017-06-13 21:08 UTC (permalink / raw)
  To: Takashi Iwai
  Cc: alsa-devel, Vinod Koul, Brian Austin, Krzysztof Kozlowski,
	Liam Girdwood, Mark Brown, Paul Handrigan, Matthias Brugger

The patch

   ASoC: samsung: Constify hw_constraints

has been applied to the asoc tree at

   git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git 

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

>From 0994c030443b50089b8ac74bc863d71238739f2e Mon Sep 17 00:00:00 2001
From: Takashi Iwai <tiwai@suse.de>
Date: Thu, 8 Jun 2017 23:37:25 +0200
Subject: [PATCH] ASoC: samsung: Constify hw_constraints

snd_pcm_hw_constraint_list(), *_ratnums() and *_ratdens() receive the
const pointers.  Constify the corresponding static objects for better
hardening.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/samsung/s3c24xx_uda134x.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/samsung/s3c24xx_uda134x.c b/sound/soc/samsung/s3c24xx_uda134x.c
index 81a78940967c..55538e333cc8 100644
--- a/sound/soc/samsung/s3c24xx_uda134x.c
+++ b/sound/soc/samsung/s3c24xx_uda134x.c
@@ -44,7 +44,7 @@ struct s3c24xx_uda134x {
 
 static unsigned int rates[33 * 2];
 #ifdef ENFORCE_RATES
-static struct snd_pcm_hw_constraint_list hw_constraints_rates = {
+static const struct snd_pcm_hw_constraint_list hw_constraints_rates = {
 	.count	= ARRAY_SIZE(rates),
 	.list	= rates,
 	.mask	= 0,
-- 
2.11.0

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

* Applied "ASoC: mediatek: Constify hw_constraints" to the asoc tree
  2017-06-08 21:37 ` [PATCH 6/7] ASoC: mediatek: Constify hw_constraints Takashi Iwai
  2017-06-09  7:39   ` Matthias Brugger
@ 2017-06-13 21:08   ` Mark Brown
  1 sibling, 0 replies; 20+ messages in thread
From: Mark Brown @ 2017-06-13 21:08 UTC (permalink / raw)
  To: Takashi Iwai
  Cc: alsa-devel, Vinod Koul, Brian Austin, Krzysztof Kozlowski,
	Liam Girdwood, Mark Brown, Paul Handrigan, Matthias Brugger

The patch

   ASoC: mediatek: Constify hw_constraints

has been applied to the asoc tree at

   git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git 

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

>From b02ee56087adae4819ce4d91c08d57403f71fd34 Mon Sep 17 00:00:00 2001
From: Takashi Iwai <tiwai@suse.de>
Date: Thu, 8 Jun 2017 23:37:24 +0200
Subject: [PATCH] ASoC: mediatek: Constify hw_constraints

snd_pcm_hw_constraint_list(), *_ratnums() and *_ratdens() receive the
const pointers.  Constify the corresponding static objects for better
hardening.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Acked-By: Matthias Brugger <matthias.bgg@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/mediatek/mt2701/mt2701-cs42448.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/mediatek/mt2701/mt2701-cs42448.c b/sound/soc/mediatek/mt2701/mt2701-cs42448.c
index aa5b31b121e3..70f61d53fe05 100644
--- a/sound/soc/mediatek/mt2701/mt2701-cs42448.c
+++ b/sound/soc/mediatek/mt2701/mt2701-cs42448.c
@@ -107,7 +107,7 @@ static const struct snd_kcontrol_new mt2701_cs42448_controls[] = {
 
 static const unsigned int mt2701_cs42448_sampling_rates[] = {48000};
 
-static struct snd_pcm_hw_constraint_list mt2701_cs42448_constraints_rates = {
+static const struct snd_pcm_hw_constraint_list mt2701_cs42448_constraints_rates = {
 		.count = ARRAY_SIZE(mt2701_cs42448_sampling_rates),
 		.list = mt2701_cs42448_sampling_rates,
 		.mask = 0,
-- 
2.11.0

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

* Applied "ASoC: cs53l30: Constify hw_constraints" to the asoc tree
  2017-06-08 21:37 ` [PATCH 2/7] ASoC: cs53l30: Constify hw_constraints Takashi Iwai
@ 2017-06-13 21:08   ` Mark Brown
  0 siblings, 0 replies; 20+ messages in thread
From: Mark Brown @ 2017-06-13 21:08 UTC (permalink / raw)
  To: Takashi Iwai
  Cc: alsa-devel, Vinod Koul, Brian Austin, Krzysztof Kozlowski,
	Liam Girdwood, Mark Brown, Paul Handrigan, Matthias Brugger

The patch

   ASoC: cs53l30: Constify hw_constraints

has been applied to the asoc tree at

   git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git 

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

>From 92f468d2c587e3cea32032df064d06c96637f295 Mon Sep 17 00:00:00 2001
From: Takashi Iwai <tiwai@suse.de>
Date: Thu, 8 Jun 2017 23:37:20 +0200
Subject: [PATCH] ASoC: cs53l30: Constify hw_constraints

snd_pcm_hw_constraint_list(), *_ratnums() and *_ratdens() receive the
const pointers.  Constify the corresponding static objects for better
hardening.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/codecs/cs53l30.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/codecs/cs53l30.c b/sound/soc/codecs/cs53l30.c
index 1e0d5973b758..06933a5d0a75 100644
--- a/sound/soc/codecs/cs53l30.c
+++ b/sound/soc/codecs/cs53l30.c
@@ -747,7 +747,7 @@ static unsigned int const cs53l30_src_rates[] = {
 	8000, 11025, 12000, 16000, 22050, 24000, 32000, 44100, 48000
 };
 
-static struct snd_pcm_hw_constraint_list src_constraints = {
+static const struct snd_pcm_hw_constraint_list src_constraints = {
 	.count = ARRAY_SIZE(cs53l30_src_rates),
 	.list = cs53l30_src_rates,
 };
-- 
2.11.0

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

* Applied "ASoC: cs35l34: Constify hw_constraints" to the asoc tree
  2017-06-08 21:37 ` [PATCH 1/7] ASoC: cs35l34: " Takashi Iwai
@ 2017-06-13 21:08   ` Mark Brown
  0 siblings, 0 replies; 20+ messages in thread
From: Mark Brown @ 2017-06-13 21:08 UTC (permalink / raw)
  To: Takashi Iwai
  Cc: alsa-devel, Vinod Koul, Brian Austin, Krzysztof Kozlowski,
	Liam Girdwood, Mark Brown, Paul Handrigan, Matthias Brugger

The patch

   ASoC: cs35l34: Constify hw_constraints

has been applied to the asoc tree at

   git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git 

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

>From e8fa1a4929849b71936f30e88c0b17c3a641509d Mon Sep 17 00:00:00 2001
From: Takashi Iwai <tiwai@suse.de>
Date: Thu, 8 Jun 2017 23:37:19 +0200
Subject: [PATCH] ASoC: cs35l34: Constify hw_constraints

snd_pcm_hw_constraint_list(), *_ratnums() and *_ratdens() receive the
const pointers.  Constify the corresponding static objects for better
hardening.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/codecs/cs35l34.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/soc/codecs/cs35l34.c b/sound/soc/codecs/cs35l34.c
index 7c5d1510cf2c..0a747c66cc6c 100644
--- a/sound/soc/codecs/cs35l34.c
+++ b/sound/soc/codecs/cs35l34.c
@@ -567,12 +567,12 @@ static int cs35l34_pcm_hw_params(struct snd_pcm_substream *substream,
 	return ret;
 }
 
-static unsigned int cs35l34_src_rates[] = {
+static const unsigned int cs35l34_src_rates[] = {
 	8000, 11025, 12000, 16000, 22050, 24000, 32000, 44100, 48000
 };
 
 
-static struct snd_pcm_hw_constraint_list cs35l34_constraints = {
+static const struct snd_pcm_hw_constraint_list cs35l34_constraints = {
 	.count  = ARRAY_SIZE(cs35l34_src_rates),
 	.list   = cs35l34_src_rates,
 };
-- 
2.11.0

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

* Applied "ASoC: intel: skl: Constify hw_constraints" to the asoc tree
  2017-06-08 21:37 ` [PATCH 5/7] ASoC: intel: skl: Constify hw_constraints Takashi Iwai
  2017-06-09  3:36   ` Vinod Koul
@ 2017-06-13 21:08   ` Mark Brown
  1 sibling, 0 replies; 20+ messages in thread
From: Mark Brown @ 2017-06-13 21:08 UTC (permalink / raw)
  To: Takashi Iwai
  Cc: alsa-devel, Vinod Koul, Brian Austin, Krzysztof Kozlowski,
	Liam Girdwood, Mark Brown, Paul Handrigan, Matthias Brugger

The patch

   ASoC: intel: skl: Constify hw_constraints

has been applied to the asoc tree at

   git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git 

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

>From 617647ae2880cf291293048f8cfd54f8111acb1c Mon Sep 17 00:00:00 2001
From: Takashi Iwai <tiwai@suse.de>
Date: Thu, 8 Jun 2017 23:37:23 +0200
Subject: [PATCH] ASoC: intel: skl: Constify hw_constraints

snd_pcm_hw_constraint_list(), *_ratnums() and *_ratdens() receive the
const pointers.  Constify the corresponding static objects for better
hardening.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Acked-By: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/intel/boards/skl_nau88l25_max98357a.c | 16 ++++++++--------
 sound/soc/intel/boards/skl_nau88l25_ssm4567.c   | 16 ++++++++--------
 sound/soc/intel/boards/skl_rt286.c              | 12 ++++++------
 3 files changed, 22 insertions(+), 22 deletions(-)

diff --git a/sound/soc/intel/boards/skl_nau88l25_max98357a.c b/sound/soc/intel/boards/skl_nau88l25_max98357a.c
index 3b12bc1fa518..5ed0aa27b467 100644
--- a/sound/soc/intel/boards/skl_nau88l25_max98357a.c
+++ b/sound/soc/intel/boards/skl_nau88l25_max98357a.c
@@ -266,21 +266,21 @@ static int skylake_nau8825_fe_init(struct snd_soc_pcm_runtime *rtd)
 	return 0;
 }
 
-static unsigned int rates[] = {
+static const unsigned int rates[] = {
 	48000,
 };
 
-static struct snd_pcm_hw_constraint_list constraints_rates = {
+static const struct snd_pcm_hw_constraint_list constraints_rates = {
 	.count = ARRAY_SIZE(rates),
 	.list  = rates,
 	.mask = 0,
 };
 
-static unsigned int channels[] = {
+static const unsigned int channels[] = {
 	2,
 };
 
-static struct snd_pcm_hw_constraint_list constraints_channels = {
+static const struct snd_pcm_hw_constraint_list constraints_channels = {
 	.count = ARRAY_SIZE(channels),
 	.list = channels,
 	.mask = 0,
@@ -348,11 +348,11 @@ static int skylake_dmic_fixup(struct snd_soc_pcm_runtime *rtd,
 	return 0;
 }
 
-static unsigned int channels_dmic[] = {
+static const unsigned int channels_dmic[] = {
 	2, 4,
 };
 
-static struct snd_pcm_hw_constraint_list constraints_dmic_channels = {
+static const struct snd_pcm_hw_constraint_list constraints_dmic_channels = {
 	.count = ARRAY_SIZE(channels_dmic),
 	.list = channels_dmic,
 	.mask = 0,
@@ -384,11 +384,11 @@ static const struct snd_soc_ops skylake_dmic_ops = {
 	.startup = skylake_dmic_startup,
 };
 
-static unsigned int rates_16000[] = {
+static const unsigned int rates_16000[] = {
 	16000,
 };
 
-static struct snd_pcm_hw_constraint_list constraints_16000 = {
+static const struct snd_pcm_hw_constraint_list constraints_16000 = {
 	.count = ARRAY_SIZE(rates_16000),
 	.list  = rates_16000,
 };
diff --git a/sound/soc/intel/boards/skl_nau88l25_ssm4567.c b/sound/soc/intel/boards/skl_nau88l25_ssm4567.c
index eb7751b0599b..01b8b140bb08 100644
--- a/sound/soc/intel/boards/skl_nau88l25_ssm4567.c
+++ b/sound/soc/intel/boards/skl_nau88l25_ssm4567.c
@@ -297,21 +297,21 @@ static int skylake_nau8825_fe_init(struct snd_soc_pcm_runtime *rtd)
 	return 0;
 }
 
-static unsigned int rates[] = {
+static const unsigned int rates[] = {
 	48000,
 };
 
-static struct snd_pcm_hw_constraint_list constraints_rates = {
+static const struct snd_pcm_hw_constraint_list constraints_rates = {
 	.count = ARRAY_SIZE(rates),
 	.list  = rates,
 	.mask = 0,
 };
 
-static unsigned int channels[] = {
+static const unsigned int channels[] = {
 	2,
 };
 
-static struct snd_pcm_hw_constraint_list constraints_channels = {
+static const struct snd_pcm_hw_constraint_list constraints_channels = {
 	.count = ARRAY_SIZE(channels),
 	.list = channels,
 	.mask = 0,
@@ -397,11 +397,11 @@ static const struct snd_soc_ops skylake_nau8825_ops = {
 	.hw_params = skylake_nau8825_hw_params,
 };
 
-static unsigned int channels_dmic[] = {
+static const unsigned int channels_dmic[] = {
 	2, 4,
 };
 
-static struct snd_pcm_hw_constraint_list constraints_dmic_channels = {
+static const struct snd_pcm_hw_constraint_list constraints_dmic_channels = {
 	.count = ARRAY_SIZE(channels_dmic),
 	.list = channels_dmic,
 	.mask = 0,
@@ -433,11 +433,11 @@ static const struct snd_soc_ops skylake_dmic_ops = {
 	.startup = skylake_dmic_startup,
 };
 
-static unsigned int rates_16000[] = {
+static const unsigned int rates_16000[] = {
 	16000,
 };
 
-static struct snd_pcm_hw_constraint_list constraints_16000 = {
+static const struct snd_pcm_hw_constraint_list constraints_16000 = {
 	.count = ARRAY_SIZE(rates_16000),
 	.list  = rates_16000,
 };
diff --git a/sound/soc/intel/boards/skl_rt286.c b/sound/soc/intel/boards/skl_rt286.c
index f5ab7b8d51d1..e08c71625fd0 100644
--- a/sound/soc/intel/boards/skl_rt286.c
+++ b/sound/soc/intel/boards/skl_rt286.c
@@ -165,21 +165,21 @@ static int skylake_hdmi_init(struct snd_soc_pcm_runtime *rtd)
 	return 0;
 }
 
-static unsigned int rates[] = {
+static const unsigned int rates[] = {
 	48000,
 };
 
-static struct snd_pcm_hw_constraint_list constraints_rates = {
+static const struct snd_pcm_hw_constraint_list constraints_rates = {
 	.count = ARRAY_SIZE(rates),
 	.list  = rates,
 	.mask = 0,
 };
 
-static unsigned int channels[] = {
+static const unsigned int channels[] = {
 	2,
 };
 
-static struct snd_pcm_hw_constraint_list constraints_channels = {
+static const struct snd_pcm_hw_constraint_list constraints_channels = {
 	.count = ARRAY_SIZE(channels),
 	.list = channels,
 	.mask = 0,
@@ -264,11 +264,11 @@ static int skylake_dmic_fixup(struct snd_soc_pcm_runtime *rtd,
 	return 0;
 }
 
-static unsigned int channels_dmic[] = {
+static const unsigned int channels_dmic[] = {
 	2, 4,
 };
 
-static struct snd_pcm_hw_constraint_list constraints_dmic_channels = {
+static const struct snd_pcm_hw_constraint_list constraints_dmic_channels = {
 	.count = ARRAY_SIZE(channels_dmic),
 	.list = channels_dmic,
 	.mask = 0,
-- 
2.11.0

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

* Applied "ASoC: intel: byt: Constify hw_constraints" to the asoc tree
  2017-06-08 21:37 ` [PATCH 4/7] ASoC: intel: byt: " Takashi Iwai
  2017-06-09  3:36   ` Vinod Koul
@ 2017-06-13 21:08   ` Mark Brown
  1 sibling, 0 replies; 20+ messages in thread
From: Mark Brown @ 2017-06-13 21:08 UTC (permalink / raw)
  To: Takashi Iwai
  Cc: alsa-devel, Vinod Koul, Brian Austin, Krzysztof Kozlowski,
	Liam Girdwood, Mark Brown, Paul Handrigan, Matthias Brugger

The patch

   ASoC: intel: byt: Constify hw_constraints

has been applied to the asoc tree at

   git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git 

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

>From 1ebb4d9dbf8f7a429abff359fa1d779b639da76f Mon Sep 17 00:00:00 2001
From: Takashi Iwai <tiwai@suse.de>
Date: Thu, 8 Jun 2017 23:37:22 +0200
Subject: [PATCH] ASoC: intel: byt: Constify hw_constraints

snd_pcm_hw_constraint_list(), *_ratnums() and *_ratdens() receive the
const pointers.  Constify the corresponding static objects for better
hardening.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Acked-By: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/intel/boards/bytcht_nocodec.c | 4 ++--
 sound/soc/intel/boards/bytcr_rt5651.c   | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/sound/soc/intel/boards/bytcht_nocodec.c b/sound/soc/intel/boards/bytcht_nocodec.c
index 89853eeaaf9d..1dd9441806fa 100644
--- a/sound/soc/intel/boards/bytcht_nocodec.c
+++ b/sound/soc/intel/boards/bytcht_nocodec.c
@@ -85,11 +85,11 @@ static int codec_fixup(struct snd_soc_pcm_runtime *rtd,
 	return 0;
 }
 
-static unsigned int rates_48000[] = {
+static const unsigned int rates_48000[] = {
 	48000,
 };
 
-static struct snd_pcm_hw_constraint_list constraints_48000 = {
+static const struct snd_pcm_hw_constraint_list constraints_48000 = {
 	.count = ARRAY_SIZE(rates_48000),
 	.list  = rates_48000,
 };
diff --git a/sound/soc/intel/boards/bytcr_rt5651.c b/sound/soc/intel/boards/bytcr_rt5651.c
index 8164bec63bf1..4a3516b38c2c 100644
--- a/sound/soc/intel/boards/bytcr_rt5651.c
+++ b/sound/soc/intel/boards/bytcr_rt5651.c
@@ -203,11 +203,11 @@ static int byt_rt5651_codec_fixup(struct snd_soc_pcm_runtime *rtd,
 	return 0;
 }
 
-static unsigned int rates_48000[] = {
+static const unsigned int rates_48000[] = {
 	48000,
 };
 
-static struct snd_pcm_hw_constraint_list constraints_48000 = {
+static const struct snd_pcm_hw_constraint_list constraints_48000 = {
 	.count = ARRAY_SIZE(rates_48000),
 	.list  = rates_48000,
 };
-- 
2.11.0

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

end of thread, other threads:[~2017-06-13 21:08 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-08 21:37 [PATCH 0/7] ASoC: Constify hw_constraints Takashi Iwai
2017-06-08 21:37 ` [PATCH 1/7] ASoC: cs35l34: " Takashi Iwai
2017-06-13 21:08   ` Applied "ASoC: cs35l34: Constify hw_constraints" to the asoc tree Mark Brown
2017-06-08 21:37 ` [PATCH 2/7] ASoC: cs53l30: Constify hw_constraints Takashi Iwai
2017-06-13 21:08   ` Applied "ASoC: cs53l30: Constify hw_constraints" to the asoc tree Mark Brown
2017-06-08 21:37 ` [PATCH 3/7] ASoC: intel: bxt: Constify hw_constraints Takashi Iwai
2017-06-13 20:26   ` Mark Brown
2017-06-13 20:29     ` Takashi Iwai
2017-06-08 21:37 ` [PATCH 4/7] ASoC: intel: byt: " Takashi Iwai
2017-06-09  3:36   ` Vinod Koul
2017-06-13 21:08   ` Applied "ASoC: intel: byt: Constify hw_constraints" to the asoc tree Mark Brown
2017-06-08 21:37 ` [PATCH 5/7] ASoC: intel: skl: Constify hw_constraints Takashi Iwai
2017-06-09  3:36   ` Vinod Koul
2017-06-13 21:08   ` Applied "ASoC: intel: skl: Constify hw_constraints" to the asoc tree Mark Brown
2017-06-08 21:37 ` [PATCH 6/7] ASoC: mediatek: Constify hw_constraints Takashi Iwai
2017-06-09  7:39   ` Matthias Brugger
2017-06-13 21:08   ` Applied "ASoC: mediatek: Constify hw_constraints" to the asoc tree Mark Brown
2017-06-08 21:37 ` [PATCH 7/7] ASoC: samsung: Constify hw_constraints Takashi Iwai
2017-06-09  7:09   ` Krzysztof Kozlowski
2017-06-13 21:08   ` Applied "ASoC: samsung: Constify hw_constraints" to the asoc tree 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.