* [PATCH] ASoC: tas571x: Fix -Wunused-const-variable
@ 2019-06-12 23:25 Nathan Huckleberry
2019-06-12 23:55 ` Nick Desaulniers
2019-06-13 19:06 ` Applied "ASoC: tas571x: Fix -Wunused-const-variable" to the asoc tree Mark Brown
0 siblings, 2 replies; 3+ messages in thread
From: Nathan Huckleberry @ 2019-06-12 23:25 UTC (permalink / raw)
To: cernekee, lgirdwood, broonie, perex, tiwai
Cc: alsa-devel, linux-kernel, Nathan Huckleberry, clang-built-linux
Clang produces the following warning
sound/soc/codecs/tas571x.c:666:38: warning: unused variable
'tas5721_controls' [-Wunused-const-variable]
In the chip struct definition tas5711_controls is used rather than
tac5712_controls. Looks like a typo was made in the original commit.
Since tac5711_controls is identical to tas5721_controls we can just swap
them
Cc: clang-built-linux@googlegroups.com
Link: https://github.com/ClangBuiltLinux/linux/issues/522
Signed-off-by: Nathan Huckleberry <nhuck@google.com>
---
sound/soc/codecs/tas571x.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sound/soc/codecs/tas571x.c b/sound/soc/codecs/tas571x.c
index 20798fa2988a..1554631cb397 100644
--- a/sound/soc/codecs/tas571x.c
+++ b/sound/soc/codecs/tas571x.c
@@ -721,8 +721,8 @@ static const struct regmap_config tas5721_regmap_config = {
static const struct tas571x_chip tas5721_chip = {
.supply_names = tas5721_supply_names,
.num_supply_names = ARRAY_SIZE(tas5721_supply_names),
- .controls = tas5711_controls,
- .num_controls = ARRAY_SIZE(tas5711_controls),
+ .controls = tas5721_controls,
+ .num_controls = ARRAY_SIZE(tas5721_controls),
.regmap_config = &tas5721_regmap_config,
.vol_reg_size = 1,
};
--
2.22.0.rc2.383.gf4fbbf30c2-goog
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] ASoC: tas571x: Fix -Wunused-const-variable
2019-06-12 23:25 [PATCH] ASoC: tas571x: Fix -Wunused-const-variable Nathan Huckleberry
@ 2019-06-12 23:55 ` Nick Desaulniers
2019-06-13 19:06 ` Applied "ASoC: tas571x: Fix -Wunused-const-variable" to the asoc tree Mark Brown
1 sibling, 0 replies; 3+ messages in thread
From: Nick Desaulniers @ 2019-06-12 23:55 UTC (permalink / raw)
To: Nathan Huckleberry, Mark Brown
Cc: cernekee, Liam Girdwood, Jaroslav Kysela, Takashi Iwai,
alsa-devel, LKML, clang-built-linux
On Wed, Jun 12, 2019 at 4:25 PM 'Nathan Huckleberry' via Clang Built
Linux <clang-built-linux@googlegroups.com> wrote:
> Since tac5711_controls is identical to tas5721_controls we can just swap
> them
380 static const struct snd_kcontrol_new tas5711_controls[] = {
381 SOC_SINGLE_TLV("Master Volume",
382 TAS571X_MVOL_REG,
383 0, 0xff, 1, tas5711_volume_tlv),
384 SOC_DOUBLE_R_TLV("Speaker Volume",
385 TAS571X_CH1_VOL_REG,
386 TAS571X_CH2_VOL_REG,
387 0, 0xff, 1, tas5711_volume_tlv),
388 SOC_DOUBLE("Speaker Switch",
389 TAS571X_SOFT_MUTE_REG,
390 TAS571X_SOFT_MUTE_CH1_SHIFT, TAS571X_SOFT_MUTE_CH2_SHIFT,
391 1, 1),
392 };
vs
666 static const struct snd_kcontrol_new tas5721_controls[] = {
667 SOC_SINGLE_TLV("Master Volume",
668 TAS571X_MVOL_REG,
669 0, 0xff, 1, tas5711_volume_tlv),
670 SOC_DOUBLE_R_TLV("Speaker Volume",
671 TAS571X_CH1_VOL_REG,
672 TAS571X_CH2_VOL_REG,
673 0, 0xff, 1, tas5711_volume_tlv),
674 SOC_DOUBLE("Speaker Switch",
675 TAS571X_SOFT_MUTE_REG,
676 TAS571X_SOFT_MUTE_CH1_SHIFT, TAS571X_SOFT_MUTE_CH2_SHIFT,
677 1, 1),
678 };
Thanks for the patch!
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Alternatively, we could make 2 variables w/ the same variable, 1
variable. It seems there's at least 4 `_control` variables:
tas5711_controls
tas5707_controls
tas5717_controls
tas5721_controls
so maybe `tas57X1_controls` would be appropriate? Not sure if the
maintainers have a preference here?
(Looks like L669 also refers to tas5711, but it seems there no tas5721
equivalent for `_volume_tlv`.)
--
Thanks,
~Nick Desaulniers
^ permalink raw reply [flat|nested] 3+ messages in thread
* Applied "ASoC: tas571x: Fix -Wunused-const-variable" to the asoc tree
2019-06-12 23:25 [PATCH] ASoC: tas571x: Fix -Wunused-const-variable Nathan Huckleberry
2019-06-12 23:55 ` Nick Desaulniers
@ 2019-06-13 19:06 ` Mark Brown
1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2019-06-13 19:06 UTC (permalink / raw)
To: Nathan Huckleberry
Cc: alsa-devel, broonie, cernekee, clang-built-linux, lgirdwood,
linux-kernel, Mark Brown, perex, tiwai
The patch
ASoC: tas571x: Fix -Wunused-const-variable
has been applied to the asoc tree at
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-5.3
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 2f7e015c1f20cfdbe97df25868abbfa8b7514778 Mon Sep 17 00:00:00 2001
From: Nathan Huckleberry <nhuck@google.com>
Date: Wed, 12 Jun 2019 16:25:02 -0700
Subject: [PATCH] ASoC: tas571x: Fix -Wunused-const-variable
Clang produces the following warning
sound/soc/codecs/tas571x.c:666:38: warning: unused variable
'tas5721_controls' [-Wunused-const-variable]
In the chip struct definition tas5711_controls is used rather than
tac5712_controls. Looks like a typo was made in the original commit.
Since tac5711_controls is identical to tas5721_controls we can just swap
them
Cc: clang-built-linux@googlegroups.com
Link: https://github.com/ClangBuiltLinux/linux/issues/522
Signed-off-by: Nathan Huckleberry <nhuck@google.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
sound/soc/codecs/tas571x.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sound/soc/codecs/tas571x.c b/sound/soc/codecs/tas571x.c
index ca2dfe12344e..684b7afa9252 100644
--- a/sound/soc/codecs/tas571x.c
+++ b/sound/soc/codecs/tas571x.c
@@ -725,8 +725,8 @@ static const struct regmap_config tas5721_regmap_config = {
static const struct tas571x_chip tas5721_chip = {
.supply_names = tas5721_supply_names,
.num_supply_names = ARRAY_SIZE(tas5721_supply_names),
- .controls = tas5711_controls,
- .num_controls = ARRAY_SIZE(tas5711_controls),
+ .controls = tas5721_controls,
+ .num_controls = ARRAY_SIZE(tas5721_controls),
.regmap_config = &tas5721_regmap_config,
.vol_reg_size = 1,
};
--
2.20.1
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-06-13 19:06 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-12 23:25 [PATCH] ASoC: tas571x: Fix -Wunused-const-variable Nathan Huckleberry
2019-06-12 23:55 ` Nick Desaulniers
2019-06-13 19:06 ` Applied "ASoC: tas571x: Fix -Wunused-const-variable" to the asoc tree Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome