linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ASoC: codecs: jz4725b: Remove unnecessary const qualifier
@ 2019-02-08  4:59 Nathan Chancellor
  2019-02-08 13:11 ` Applied "ASoC: codecs: jz4725b: Remove unnecessary const qualifier" to the asoc tree Mark Brown
  2019-02-09  0:59 ` [PATCH] ASoC: codecs: jz4725b: Remove unnecessary const qualifier Nick Desaulniers
  0 siblings, 2 replies; 3+ messages in thread
From: Nathan Chancellor @ 2019-02-08  4:59 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown
  Cc: alsa-devel, linux-kernel, Paul Cercueil, Nick Desaulniers,
	Nathan Chancellor

Clang warns:

sound/soc/codecs/jz4725b.c:177:14: warning: duplicate 'const' declaration specifier [-Wduplicate-decl-specifier]
static const SOC_VALUE_ENUM_SINGLE_DECL(jz4725b_codec_adc_src_enum,
             ^
include/sound/soc.h:356:2: note: expanded from macro 'SOC_VALUE_ENUM_SINGLE_DECL'
        SOC_VALUE_ENUM_DOUBLE_DECL(name, xreg, xshift, xshift, xmask, xtexts, xvalues)
        ^
include/sound/soc.h:353:2: note: expanded from macro 'SOC_VALUE_ENUM_DOUBLE_DECL'
        const struct soc_enum name = SOC_VALUE_ENUM_DOUBLE(xreg, xshift_l, xshift_r, xmask, \
        ^

As it points out, SOC_VALUE_ENUM_DOUBLE_DECL has the const attribute in
its definition so remove it here.

Fixes: e9d97b05a80f ("ASoC: codecs: Add jz4725b-codec driver")
Link: https://github.com/ClangBuiltLinux/linux/issues/354
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
---
 sound/soc/codecs/jz4725b.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/sound/soc/codecs/jz4725b.c b/sound/soc/codecs/jz4725b.c
index e3dba92f30bd..5cc8c7ca24c6 100644
--- a/sound/soc/codecs/jz4725b.c
+++ b/sound/soc/codecs/jz4725b.c
@@ -174,12 +174,12 @@ static const char * const jz4725b_codec_adc_src_texts[] = {
 	"Mic 1", "Mic 2", "Line In", "Mixer",
 };
 static const unsigned int jz4725b_codec_adc_src_values[] = { 0, 1, 2, 3, };
-static const SOC_VALUE_ENUM_SINGLE_DECL(jz4725b_codec_adc_src_enum,
-					JZ4725B_CODEC_REG_CR3,
-					REG_CR3_INSEL_OFFSET,
-					REG_CR3_INSEL_MASK,
-					jz4725b_codec_adc_src_texts,
-					jz4725b_codec_adc_src_values);
+static SOC_VALUE_ENUM_SINGLE_DECL(jz4725b_codec_adc_src_enum,
+				  JZ4725B_CODEC_REG_CR3,
+				  REG_CR3_INSEL_OFFSET,
+				  REG_CR3_INSEL_MASK,
+				  jz4725b_codec_adc_src_texts,
+				  jz4725b_codec_adc_src_values);
 static const struct snd_kcontrol_new jz4725b_codec_adc_src_ctrl =
 			SOC_DAPM_ENUM("Route", jz4725b_codec_adc_src_enum);
 
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Applied "ASoC: codecs: jz4725b: Remove unnecessary const qualifier" to the asoc tree
  2019-02-08  4:59 [PATCH] ASoC: codecs: jz4725b: Remove unnecessary const qualifier Nathan Chancellor
@ 2019-02-08 13:11 ` Mark Brown
  2019-02-09  0:59 ` [PATCH] ASoC: codecs: jz4725b: Remove unnecessary const qualifier Nick Desaulniers
  1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2019-02-08 13:11 UTC (permalink / raw)
  To: Nathan Chancellor
  Cc: Mark Brown, Liam Girdwood, Mark Brown, Paul Cercueil, alsa-devel,
	Nick Desaulniers, linux-kernel, alsa-devel

The patch

   ASoC: codecs: jz4725b: Remove unnecessary const qualifier

has been applied to the asoc tree at

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git 

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 d9186330c881468722c005ee772ca745c81a29ef Mon Sep 17 00:00:00 2001
From: Nathan Chancellor <natechancellor@gmail.com>
Date: Thu, 7 Feb 2019 21:59:18 -0700
Subject: [PATCH] ASoC: codecs: jz4725b: Remove unnecessary const qualifier

Clang warns:

sound/soc/codecs/jz4725b.c:177:14: warning: duplicate 'const' declaration specifier [-Wduplicate-decl-specifier]
static const SOC_VALUE_ENUM_SINGLE_DECL(jz4725b_codec_adc_src_enum,
             ^
include/sound/soc.h:356:2: note: expanded from macro 'SOC_VALUE_ENUM_SINGLE_DECL'
        SOC_VALUE_ENUM_DOUBLE_DECL(name, xreg, xshift, xshift, xmask, xtexts, xvalues)
        ^
include/sound/soc.h:353:2: note: expanded from macro 'SOC_VALUE_ENUM_DOUBLE_DECL'
        const struct soc_enum name = SOC_VALUE_ENUM_DOUBLE(xreg, xshift_l, xshift_r, xmask, \
        ^

As it points out, SOC_VALUE_ENUM_DOUBLE_DECL has the const attribute in
its definition so remove it here.

Fixes: e9d97b05a80f ("ASoC: codecs: Add jz4725b-codec driver")
Link: https://github.com/ClangBuiltLinux/linux/issues/354
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/codecs/jz4725b.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/sound/soc/codecs/jz4725b.c b/sound/soc/codecs/jz4725b.c
index 103ccbc5d55c..766354c73076 100644
--- a/sound/soc/codecs/jz4725b.c
+++ b/sound/soc/codecs/jz4725b.c
@@ -173,12 +173,12 @@ static const char * const jz4725b_codec_adc_src_texts[] = {
 	"Mic 1", "Mic 2", "Line In", "Mixer",
 };
 static const unsigned int jz4725b_codec_adc_src_values[] = { 0, 1, 2, 3, };
-static const SOC_VALUE_ENUM_SINGLE_DECL(jz4725b_codec_adc_src_enum,
-					JZ4725B_CODEC_REG_CR3,
-					REG_CR3_INSEL_OFFSET,
-					REG_CR3_INSEL_MASK,
-					jz4725b_codec_adc_src_texts,
-					jz4725b_codec_adc_src_values);
+static SOC_VALUE_ENUM_SINGLE_DECL(jz4725b_codec_adc_src_enum,
+				  JZ4725B_CODEC_REG_CR3,
+				  REG_CR3_INSEL_OFFSET,
+				  REG_CR3_INSEL_MASK,
+				  jz4725b_codec_adc_src_texts,
+				  jz4725b_codec_adc_src_values);
 static const struct snd_kcontrol_new jz4725b_codec_adc_src_ctrl =
 			SOC_DAPM_ENUM("Route", jz4725b_codec_adc_src_enum);
 
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] ASoC: codecs: jz4725b: Remove unnecessary const qualifier
  2019-02-08  4:59 [PATCH] ASoC: codecs: jz4725b: Remove unnecessary const qualifier Nathan Chancellor
  2019-02-08 13:11 ` Applied "ASoC: codecs: jz4725b: Remove unnecessary const qualifier" to the asoc tree Mark Brown
@ 2019-02-09  0:59 ` Nick Desaulniers
  1 sibling, 0 replies; 3+ messages in thread
From: Nick Desaulniers @ 2019-02-09  0:59 UTC (permalink / raw)
  To: Nathan Chancellor
  Cc: Liam Girdwood, Mark Brown, alsa-devel, LKML, Paul Cercueil

On Thu, Feb 7, 2019 at 9:00 PM Nathan Chancellor
<natechancellor@gmail.com> wrote:
>
> Clang warns:
>
> sound/soc/codecs/jz4725b.c:177:14: warning: duplicate 'const' declaration specifier [-Wduplicate-decl-specifier]
> static const SOC_VALUE_ENUM_SINGLE_DECL(jz4725b_codec_adc_src_enum,
>              ^
> include/sound/soc.h:356:2: note: expanded from macro 'SOC_VALUE_ENUM_SINGLE_DECL'
>         SOC_VALUE_ENUM_DOUBLE_DECL(name, xreg, xshift, xshift, xmask, xtexts, xvalues)
>         ^
> include/sound/soc.h:353:2: note: expanded from macro 'SOC_VALUE_ENUM_DOUBLE_DECL'
>         const struct soc_enum name = SOC_VALUE_ENUM_DOUBLE(xreg, xshift_l, xshift_r, xmask, \
>         ^
>
> As it points out, SOC_VALUE_ENUM_DOUBLE_DECL has the const attribute in
> its definition so remove it here.
>
> Fixes: e9d97b05a80f ("ASoC: codecs: Add jz4725b-codec driver")
> Link: https://github.com/ClangBuiltLinux/linux/issues/354
> Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>

Thanks for the fix.  Looks like the struct instance declaration
already contains a const.  That's a curious (not bad, per se) pattern
that probably results in a few other instances of this warning, I'll
bet.
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>

> ---
>  sound/soc/codecs/jz4725b.c | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/sound/soc/codecs/jz4725b.c b/sound/soc/codecs/jz4725b.c
> index e3dba92f30bd..5cc8c7ca24c6 100644
> --- a/sound/soc/codecs/jz4725b.c
> +++ b/sound/soc/codecs/jz4725b.c
> @@ -174,12 +174,12 @@ static const char * const jz4725b_codec_adc_src_texts[] = {
>         "Mic 1", "Mic 2", "Line In", "Mixer",
>  };
>  static const unsigned int jz4725b_codec_adc_src_values[] = { 0, 1, 2, 3, };
> -static const SOC_VALUE_ENUM_SINGLE_DECL(jz4725b_codec_adc_src_enum,
> -                                       JZ4725B_CODEC_REG_CR3,
> -                                       REG_CR3_INSEL_OFFSET,
> -                                       REG_CR3_INSEL_MASK,
> -                                       jz4725b_codec_adc_src_texts,
> -                                       jz4725b_codec_adc_src_values);
> +static SOC_VALUE_ENUM_SINGLE_DECL(jz4725b_codec_adc_src_enum,
> +                                 JZ4725B_CODEC_REG_CR3,
> +                                 REG_CR3_INSEL_OFFSET,
> +                                 REG_CR3_INSEL_MASK,
> +                                 jz4725b_codec_adc_src_texts,
> +                                 jz4725b_codec_adc_src_values);
>  static const struct snd_kcontrol_new jz4725b_codec_adc_src_ctrl =
>                         SOC_DAPM_ENUM("Route", jz4725b_codec_adc_src_enum);
>
> --
> 2.20.1
>


-- 
Thanks,
~Nick Desaulniers

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-02-09  0:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-08  4:59 [PATCH] ASoC: codecs: jz4725b: Remove unnecessary const qualifier Nathan Chancellor
2019-02-08 13:11 ` Applied "ASoC: codecs: jz4725b: Remove unnecessary const qualifier" to the asoc tree Mark Brown
2019-02-09  0:59 ` [PATCH] ASoC: codecs: jz4725b: Remove unnecessary const qualifier Nick Desaulniers

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).