Skip to contentSkip to conversation

ASoC: rt1015: Remove unnecessary const

PATCH In review Nathan Chancellor 2 participants 2 messages Jan 24, 2020

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ASoC: rt1015: Remove unnecessary const

Clang warns:

../sound/soc/codecs/rt1015.c:392:14: warning: duplicate 'const' declaration specifier [-Wduplicate-decl-specifier] static const SOC_ENUM_SINGLE_DECL(rt1015_boost_mode_enum, 0, 0,

             ^

../include/sound/soc.h:355:2: note: expanded from macro 'SOC_ENUM_SINGLE_DECL'
SOC_ENUM_DOUBLE_DECL(name, xreg, xshift, xshift, xtexts) ^
../include/sound/soc.h:352:2: note: expanded from macro 'SOC_ENUM_DOUBLE_DECL'

        const struct soc_enum name = SOC_ENUM_DOUBLE(xreg, xshift_l, xshift_r, \
        ^

1 warning generated.

Remove the const after static to fix it.

Fixes df31007400c3 ("ASoC: rt1015: add rt1015 amplifier driver")
---
 sound/soc/codecs/rt1015.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/codecs/rt1015.c +1 -1
index 4a9c5b54008f..6d490e2dbc25 100644
@@ -389,7 +389,7 @@ static const char * const rt1015_boost_mode[] = {
 	"Bypass", "Adaptive", "Fixed Adaptive"
 };
 
-static const SOC_ENUM_SINGLE_DECL(rt1015_boost_mode_enum, 0, 0,
+static SOC_ENUM_SINGLE_DECL(rt1015_boost_mode_enum, 0, 0,
 	rt1015_boost_mode);
 
 static int rt1015_boost_mode_get(struct snd_kcontrol *kcontrol,
Signature · 1 line
2.25.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 15 lines · Nathan Chancellor

Clang warns:

../sound/soc/codecs/rt1015.c:392:14: warning: duplicate 'const' declaration specifier [-Wduplicate-decl-specifier] static const SOC_ENUM_SINGLE_DECL(rt1015_boost_mode_enum, 0, 0,

             ^

../include/sound/soc.h:355:2: note: expanded from macro 'SOC_ENUM_SINGLE_DECL'
SOC_ENUM_DOUBLE_DECL(name, xreg, xshift, xshift, xtexts) ^
../include/sound/soc.h:352:2: note: expanded from macro 'SOC_ENUM_DOUBLE_DECL'

        const struct soc_enum name = SOC_ENUM_DOUBLE(xreg, xshift_l, xshift_r, \
        ^
Quoted 7 lines

1 warning generated.

Remove the const after static to fix it.

Fixes df31007400c3 ("ASoC: rt1015: add rt1015 amplifier driver")

Thanks for the patch!

Quoted 18 lines
---
 sound/soc/codecs/rt1015.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/codecs/rt1015.c +1 -2
index 4a9c5b54008f..6d490e2dbc25 100644
@@ -389,7 +389,7 @@ static const char * const rt1015_boost_mode[] = {
        "Bypass", "Adaptive", "Fixed Adaptive"
 };
 
-static const SOC_ENUM_SINGLE_DECL(rt1015_boost_mode_enum, 0, 0,
+static SOC_ENUM_SINGLE_DECL(rt1015_boost_mode_enum, 0, 0,
        rt1015_boost_mode);
 
 static int rt1015_boost_mode_get(struct snd_kcontrol *kcontrol,
--
Signature · 2 lines
Thanks,
~Nick Desaulniers