ASoC: bcm: allo-piano-dac-plus: Remove unnecessary const specifiers
authorNathan Chancellor <nathan@kernel.org>
Tue, 1 Feb 2022 00:20:55 +0000 (17:20 -0700)
committerDom Cobley <popcornmix@gmail.com>
Mon, 21 Mar 2022 16:04:39 +0000 (16:04 +0000)
Clang warns:

  sound/soc/bcm/allo-piano-dac-plus.c:66:14: warning: duplicate 'const' declaration specifier [-Wduplicate-decl-specifier]
  static const SOC_ENUM_SINGLE_DECL(allo_piano_mode_enum,
               ^
  ./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, \
          ^
  sound/soc/bcm/allo-piano-dac-plus.c:75:14: warning: duplicate 'const' declaration specifier [-Wduplicate-decl-specifier]
  static const SOC_ENUM_SINGLE_DECL(allo_piano_dual_mode_enum,
               ^
  ./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, \
          ^
  sound/soc/bcm/allo-piano-dac-plus.c:96:14: warning: duplicate 'const' declaration specifier [-Wduplicate-decl-specifier]
  static const SOC_ENUM_SINGLE_DECL(allo_piano_enum,
               ^
  ./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, \
          ^
  3 warnings generated.

SOC_VALUE_ENUM_DOUBLE_DECL already has a const specifier. Remove the duplicate
const specifiers to clean up the warnings.

Fixes: 42444979e710 ("Add support for all the downstream rpi sound card drivers")
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
sound/soc/bcm/allo-piano-dac-plus.c

index fd0fe58..3efc898 100644 (file)
@@ -63,7 +63,7 @@ static const char * const allo_piano_mode_texts[] = {
        "2.2",
 };
 
-static const SOC_ENUM_SINGLE_DECL(allo_piano_mode_enum,
+static SOC_ENUM_SINGLE_DECL(allo_piano_mode_enum,
                0, 0, allo_piano_mode_texts);
 
 static const char * const allo_piano_dual_mode_texts[] = {
@@ -72,7 +72,7 @@ static const char * const allo_piano_dual_mode_texts[] = {
        "Dual-Stereo",
 };
 
-static const SOC_ENUM_SINGLE_DECL(allo_piano_dual_mode_enum,
+static SOC_ENUM_SINGLE_DECL(allo_piano_dual_mode_enum,
                0, 0, allo_piano_dual_mode_texts);
 
 static const char * const allo_piano_dsp_low_pass_texts[] = {
@@ -93,7 +93,7 @@ static const char * const allo_piano_dsp_low_pass_texts[] = {
        "200",
 };
 
-static const SOC_ENUM_SINGLE_DECL(allo_piano_enum,
+static SOC_ENUM_SINGLE_DECL(allo_piano_enum,
                0, 0, allo_piano_dsp_low_pass_texts);
 
 static int __snd_allo_piano_dsp_program(struct snd_soc_pcm_runtime *rtd,