ASoC: Constify hw_constraints
Subsystems (6)
cover ASoC: Constify hw_constraints
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(-)
Signature · 1 line
2.13.0
PATCH 1/7 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.
--- sound/soc/codecs/cs35l34.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
sound/soc/codecs/cs35l34.c +2 -2
@@ -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, };
Signature · 1 line
2.13.0
Mark Brown
maintainerApplied "ASoC: cs35l34: Constify hw_constraints" to the asoc tree
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
Quoted 1 line
From
e8fa1a4929849b71936f30e88c0b17c3a641509dMon Sep 17 00:00:00 2001
From: Takashi Iwai <[email protected]>
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.
--- sound/soc/codecs/cs35l34.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
sound/soc/codecs/cs35l34.c +2 -2
@@ -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, };
Signature · 1 line
2.11.0
PATCH 2/7 ASoC: cs53l30: Constify hw_constraints
In reply to Takashi Iwaisnd_pcm_hw_constraint_list(), *_ratnums() and *_ratdens() receive the const pointers. Constify the corresponding static objects for better hardening.
--- sound/soc/codecs/cs53l30.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/codecs/cs53l30.c +1 -1
@@ -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, };
Signature · 1 line
2.13.0
Mark Brown
maintainerApplied "ASoC: cs53l30: Constify hw_constraints" to the asoc tree
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
Quoted 1 line
From
92f468d2c587e3cea32032df064d06c96637f295Mon Sep 17 00:00:00 2001
From: Takashi Iwai <[email protected]>
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.
--- sound/soc/codecs/cs53l30.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/codecs/cs53l30.c +1 -1
@@ -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, };
Signature · 1 line
2.11.0
PATCH 3/7 ASoC: intel: bxt: Constify hw_constraints
In reply to Takashi Iwaisnd_pcm_hw_constraint_list(), *_ratnums() and *_ratdens() receive the const pointers. Constify the corresponding static objects for better hardening.
--- sound/soc/intel/boards/bxt_da7219_max98357a.c | 12 ++++++------ sound/soc/intel/boards/bxt_rt298.c | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-)
sound/soc/intel/boards/bxt_da7219_max98357a.c +6 -6
@@ -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 ,
sound/soc/intel/boards/bxt_rt298.c +6 -6
@@ -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 ,
Signature · 1 line
2.13.0
Mark Brown
maintainerRe: [PATCH 3/7] ASoC: intel: bxt: Constify hw_constraints
Quoted 3 lines · Takashi Iwai
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.
Re: [PATCH 3/7] ASoC: intel: bxt: Constify hw_constraints
Quoted 7 lines · Mark Brown
Quoted 3 lines · Takashi Iwai
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
PATCH 4/7 ASoC: intel: byt: Constify hw_constraints
In reply to Takashi Iwaisnd_pcm_hw_constraint_list(), *_ratnums() and *_ratdens() receive the const pointers. Constify the corresponding static objects for better hardening.
--- sound/soc/intel/boards/bytcht_nocodec.c | 4 ++-- sound/soc/intel/boards/bytcr_rt5651.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-)
sound/soc/intel/boards/bytcht_nocodec.c +2 -2
@@ -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, };
sound/soc/intel/boards/bytcr_rt5651.c +2 -2
@@ -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, };
Signature · 1 line
2.13.0
Re: [PATCH 4/7] ASoC: intel: byt: Constify hw_constraints
Quoted 4 lines · Takashi Iwai
snd_pcm_hw_constraint_list(),*_ratnums()and*_ratdens()receive the const pointers. Constify the corresponding static objects for better hardening.
Signature · 1 line
~Vinod
Mark Brown
maintainerApplied "ASoC: intel: byt: Constify hw_constraints" to the asoc tree
In reply to Takashi IwaiThe 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
Quoted 1 line
From
1ebb4d9dbf8f7a429abff359fa1d779b639da76fMon Sep 17 00:00:00 2001
From: Takashi Iwai <[email protected]>
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.
--- sound/soc/intel/boards/bytcht_nocodec.c | 4 ++-- sound/soc/intel/boards/bytcr_rt5651.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-)
sound/soc/intel/boards/bytcht_nocodec.c +2 -2
@@ -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, };
sound/soc/intel/boards/bytcr_rt5651.c +2 -2
@@ -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, };
Signature · 1 line
2.11.0
PATCH 5/7 ASoC: intel: skl: Constify hw_constraints
In reply to Takashi Iwaisnd_pcm_hw_constraint_list(), *_ratnums() and *_ratdens() receive the const pointers. Constify the corresponding static objects for better hardening.
--- 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(-)
sound/soc/intel/boards/skl_nau88l25_max98357a.c +8 -8
@@ -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, };
sound/soc/intel/boards/skl_nau88l25_ssm4567.c +8 -8
@@ -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, };
sound/soc/intel/boards/skl_rt286.c +6 -6
@@ -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 ,
Signature · 1 line
2.13.0
Re: [PATCH 5/7] ASoC: intel: skl: Constify hw_constraints
Quoted 3 lines · Takashi Iwai
snd_pcm_hw_constraint_list(),*_ratnums()and*_ratdens()receive the const pointers. Constify the corresponding static objects for better hardening.
Signature · 1 line
~Vinod
Mark Brown
maintainerApplied "ASoC: intel: skl: Constify hw_constraints" to the asoc tree
In reply to Takashi IwaiThe 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
Quoted 1 line
From
617647ae2880cf291293048f8cfd54f8111acb1cMon Sep 17 00:00:00 2001
From: Takashi Iwai <[email protected]>
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.
--- 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(-)
sound/soc/intel/boards/skl_nau88l25_max98357a.c +8 -8
@@ -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, };
sound/soc/intel/boards/skl_nau88l25_ssm4567.c +8 -8
@@ -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, };
sound/soc/intel/boards/skl_rt286.c +6 -6
@@ -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 ,
Signature · 1 line
2.11.0
PATCH 6/7 ASoC: mediatek: Constify hw_constraints
In reply to Takashi Iwaisnd_pcm_hw_constraint_list(), *_ratnums() and *_ratdens() receive the const pointers. Constify the corresponding static objects for better hardening.
--- sound/soc/mediatek/mt2701/mt2701-cs42448.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/mediatek/mt2701/mt2701-cs42448.c +1 -1
@@ -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 ,
Signature · 1 line
2.13.0
Re: [PATCH 6/7] ASoC: mediatek: Constify hw_constraints
Quoted 15 lines · Takashi Iwai
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 <[email protected]>--- sound/soc/mediatek/mt2701/mt2701-cs42448.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)sound/soc/mediatek/mt2701/mt2701-cs42448.c +0
-0
sound/soc/mediatek/mt2701/mt2701-cs42448.c static const struct snd_kcontrol_new mt2701_cs42448_controls[] = { · line 113
Quoted 8 lines
sound/soc/mediatek/mt2701/mt2701-cs42448.c +1
-1@@ -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 ,
Mark Brown
maintainerApplied "ASoC: mediatek: Constify hw_constraints" to the asoc tree
In reply to Takashi IwaiThe 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
Quoted 1 line
From
b02ee56087adae4819ce4d91c08d57403f71fd34Mon Sep 17 00:00:00 2001
From: Takashi Iwai <[email protected]>
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.
--- sound/soc/mediatek/mt2701/mt2701-cs42448.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/mediatek/mt2701/mt2701-cs42448.c +1 -1
@@ -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 ,
Signature · 1 line
2.11.0
PATCH 7/7 ASoC: samsung: Constify hw_constraints
In reply to Takashi Iwaisnd_pcm_hw_constraint_list(), *_ratnums() and *_ratdens() receive the const pointers. Constify the corresponding static objects for better hardening.
--- sound/soc/samsung/s3c24xx_uda134x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/samsung/s3c24xx_uda134x.c +1 -1
@@ -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,
Signature · 1 line
2.13.0
Re: [PATCH 7/7] ASoC: samsung: Constify hw_constraints
Quoted 8 lines · Takashi Iwai
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 <[email protected]>--- sound/soc/samsung/s3c24xx_uda134x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Best regards,
Krzysztof
Mark Brown
maintainerApplied "ASoC: samsung: Constify hw_constraints" to the asoc tree
In reply to Takashi IwaiThe 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
Quoted 1 line
From
0994c030443b50089b8ac74bc863d71238739f2eMon Sep 17 00:00:00 2001
From: Takashi Iwai <[email protected]>
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.
--- sound/soc/samsung/s3c24xx_uda134x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/samsung/s3c24xx_uda134x.c +1 -1
@@ -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,
Signature · 1 line
2.11.0