[PATCH 0/9] ASoC: Constify struct regmap_config
This series adds the const modifier to the remaining regmap_config structs under sound/soc that are effectively used as const (i.e., only read after their declaration), but kept as writtable data.
Signed-off-by: Javier Carrasco javier.carrasco.cruz@gmail.com --- Javier Carrasco (9): ASoC: cs35l34: Constify struct regmap_config ASoC: cs35l35: Constify struct regmap_config ASoC: cs35l36: Constify struct regmap_config ASoC: cs53l30: Constify struct regmap_config ASoC: jz4760: Constify struct regmap_config ASoC: jz4770: Constify struct regmap_config ASoC: wsa881x: Constify struct regmap_config ASoC: wsa883x: Constify struct regmap_config ASoC: wsa884x: Constify struct regmap_config
sound/soc/codecs/cs35l34.c | 2 +- sound/soc/codecs/cs35l35.c | 2 +- sound/soc/codecs/cs35l36.c | 2 +- sound/soc/codecs/cs53l30.c | 2 +- sound/soc/codecs/jz4760.c | 2 +- sound/soc/codecs/jz4770.c | 2 +- sound/soc/codecs/wsa881x.c | 2 +- sound/soc/codecs/wsa883x.c | 2 +- sound/soc/codecs/wsa884x.c | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) --- base-commit: 0b58e108042b0ed28a71cd7edf5175999955b233 change-id: 20240703-sound-const-regmap_config-1d4d56b7e5ee
Best regards,
`cs35l34_regmap` is not modified and can be declared as const to move its data to a read-only section.
Signed-off-by: Javier Carrasco javier.carrasco.cruz@gmail.com --- sound/soc/codecs/cs35l34.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/codecs/cs35l34.c b/sound/soc/codecs/cs35l34.c index 4c517231d765..e63a518e3b8e 100644 --- a/sound/soc/codecs/cs35l34.c +++ b/sound/soc/codecs/cs35l34.c @@ -787,7 +787,7 @@ static const struct snd_soc_component_driver soc_component_dev_cs35l34 = { .endianness = 1, };
-static struct regmap_config cs35l34_regmap = { +static const struct regmap_config cs35l34_regmap = { .reg_bits = 8, .val_bits = 8,
`cs35l35_regmap` is not modified and can be declared as const to move its data to a read-only section.
Signed-off-by: Javier Carrasco javier.carrasco.cruz@gmail.com --- sound/soc/codecs/cs35l35.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/codecs/cs35l35.c b/sound/soc/codecs/cs35l35.c index c39b3cfe9574..7a01b1d9fc9d 100644 --- a/sound/soc/codecs/cs35l35.c +++ b/sound/soc/codecs/cs35l35.c @@ -1086,7 +1086,7 @@ static const struct snd_soc_component_driver soc_component_dev_cs35l35 = { .endianness = 1, };
-static struct regmap_config cs35l35_regmap = { +static const struct regmap_config cs35l35_regmap = { .reg_bits = 8, .val_bits = 8,
`cs53l30_regmap` is not modified and can be declared as const to move its data to a read-only section.
Signed-off-by: Javier Carrasco javier.carrasco.cruz@gmail.com --- 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 2ee13d885fdc..bcbaf28a0b2d 100644 --- a/sound/soc/codecs/cs53l30.c +++ b/sound/soc/codecs/cs53l30.c @@ -900,7 +900,7 @@ static const struct snd_soc_component_driver cs53l30_driver = { .endianness = 1, };
-static struct regmap_config cs53l30_regmap = { +static const struct regmap_config cs53l30_regmap = { .reg_bits = 8, .val_bits = 8,
`cs35l36_regmap` is not modified and can be declared as const to move its data to a read-only section.
Signed-off-by: Javier Carrasco javier.carrasco.cruz@gmail.com --- sound/soc/codecs/cs35l36.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/codecs/cs35l36.c b/sound/soc/codecs/cs35l36.c index bc79990615e8..cbea79bd8980 100644 --- a/sound/soc/codecs/cs35l36.c +++ b/sound/soc/codecs/cs35l36.c @@ -1300,7 +1300,7 @@ static const struct snd_soc_component_driver soc_component_dev_cs35l36 = { .endianness = 1, };
-static struct regmap_config cs35l36_regmap = { +static const struct regmap_config cs35l36_regmap = { .reg_bits = 32, .val_bits = 32, .reg_stride = 4,
`jz4760_codec_regmap_config` is not modified and can be declared as const to move its data to a read-only section.
Signed-off-by: Javier Carrasco javier.carrasco.cruz@gmail.com --- sound/soc/codecs/jz4760.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/codecs/jz4760.c b/sound/soc/codecs/jz4760.c index 9df58e23d360..6217e611259f 100644 --- a/sound/soc/codecs/jz4760.c +++ b/sound/soc/codecs/jz4760.c @@ -821,7 +821,7 @@ static const u8 jz4760_codec_reg_defaults[] = { 0x1F, 0x00, 0x00, 0x00 };
-static struct regmap_config jz4760_codec_regmap_config = { +static const struct regmap_config jz4760_codec_regmap_config = { .reg_bits = 7, .val_bits = 8,
`jz4760_codec_regmap_config` is not modified and can be declared as const to move its data to a read-only section.
Signed-off-by: Javier Carrasco javier.carrasco.cruz@gmail.com --- sound/soc/codecs/jz4770.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/codecs/jz4770.c b/sound/soc/codecs/jz4770.c index 1d0c467ab57b..acb9eaa7ea1c 100644 --- a/sound/soc/codecs/jz4770.c +++ b/sound/soc/codecs/jz4770.c @@ -872,7 +872,7 @@ static const u8 jz4770_codec_reg_defaults[] = { 0x07, 0x44, 0x1F, 0x00 };
-static struct regmap_config jz4770_codec_regmap_config = { +static const struct regmap_config jz4770_codec_regmap_config = { .reg_bits = 7, .val_bits = 8,
`wsa881x_regmap_config` is not modified and can be declared as const to move its data to a read-only section.
Signed-off-by: Javier Carrasco javier.carrasco.cruz@gmail.com --- sound/soc/codecs/wsa881x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/codecs/wsa881x.c b/sound/soc/codecs/wsa881x.c index 1253695bebd8..0478599d0f35 100644 --- a/sound/soc/codecs/wsa881x.c +++ b/sound/soc/codecs/wsa881x.c @@ -634,7 +634,7 @@ static bool wsa881x_volatile_register(struct device *dev, unsigned int reg) } }
-static struct regmap_config wsa881x_regmap_config = { +static const struct regmap_config wsa881x_regmap_config = { .reg_bits = 32, .val_bits = 8, .cache_type = REGCACHE_MAPLE,
`wsa883x_regmap_config` is not modified and can be declared as const to move its data to a read-only section.
Signed-off-by: Javier Carrasco javier.carrasco.cruz@gmail.com --- sound/soc/codecs/wsa883x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/codecs/wsa883x.c b/sound/soc/codecs/wsa883x.c index f5a15f0e891e..d0ab4e2290b6 100644 --- a/sound/soc/codecs/wsa883x.c +++ b/sound/soc/codecs/wsa883x.c @@ -934,7 +934,7 @@ static bool wsa883x_volatile_register(struct device *dev, unsigned int reg) return wsa883x_readonly_register(dev, reg); }
-static struct regmap_config wsa883x_regmap_config = { +static const struct regmap_config wsa883x_regmap_config = { .reg_bits = 32, .val_bits = 8, .cache_type = REGCACHE_MAPLE,
`wsa884x_regmap_config` is not modified and can be declared as const to move its data to a read-only section.
Signed-off-by: Javier Carrasco javier.carrasco.cruz@gmail.com --- sound/soc/codecs/wsa884x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/codecs/wsa884x.c b/sound/soc/codecs/wsa884x.c index a6034547b4f3..d17ae17b2938 100644 --- a/sound/soc/codecs/wsa884x.c +++ b/sound/soc/codecs/wsa884x.c @@ -1319,7 +1319,7 @@ static bool wsa884x_volatile_register(struct device *dev, unsigned int reg) return wsa884x_readonly_register(dev, reg); }
-static struct regmap_config wsa884x_regmap_config = { +static const struct regmap_config wsa884x_regmap_config = { .reg_bits = 32, .val_bits = 8, .cache_type = REGCACHE_MAPLE,
On Wed, 03 Jul 2024 18:20:56 +0200, Javier Carrasco wrote:
This series adds the const modifier to the remaining regmap_config structs under sound/soc that are effectively used as const (i.e., only read after their declaration), but kept as writtable data.
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/9] ASoC: cs35l34: Constify struct regmap_config commit: cb148180125ef88a4c1c20ecf25337f1e45657bb [2/9] ASoC: cs35l35: Constify struct regmap_config commit: 306e0317bddfbb6bea1ad31c3daeecaec0304295 [3/9] ASoC: cs35l36: Constify struct regmap_config commit: 0271df05e6fe92b7000dcce5058a0ed6af127ef6 [4/9] ASoC: cs53l30: Constify struct regmap_config commit: 52f0aa5fb9437013f7f35d61426de497a8927891 [5/9] ASoC: jz4760: Constify struct regmap_config commit: 8d9c0ede48f29c9fccd095952d657fc5696da9ac [6/9] ASoC: jz4770: Constify struct regmap_config commit: 7abfa29ba6a43c5e25622de1ba1f1846b9c9b5e8 [7/9] ASoC: wsa881x: Constify struct regmap_config commit: 5ffab1d3f3f3281869b894070fe4438f307759ec [8/9] ASoC: wsa883x: Constify struct regmap_config commit: 22c361dc7ce4d4d6a688febee57d6e4b130b96b3 [9/9] ASoC: wsa884x: Constify struct regmap_config commit: e15cc906b9c5af5414bb6002b6a036550bca6bd8
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
participants (2)
-
Javier Carrasco
-
Mark Brown