Message ID | 20170608213725.5378-7-tiwai@suse.de (mailing list archive) |
---|---|
State | Accepted |
Commit | b02ee56087adae4819ce4d91c08d57403f71fd34 |
Headers | show |
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>
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,
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(-)