Skip to content

Commit

Permalink
ASoC: rt1015: Remove unnecessary const
Browse files Browse the repository at this point in the history
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: df31007 ("ASoC: rt1015: add rt1015 amplifier driver")
Link: ClangBuiltLinux#845
Signed-off-by: Nathan Chancellor <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Mark Brown <[email protected]>
  • Loading branch information
nathanchance authored and broonie committed Jan 24, 2020
1 parent 3a6adf3 commit e91440d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sound/soc/codecs/rt1015.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit e91440d

Please sign in to comment.