lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAKwvOd=R6NrqAvQWdu3yZHFNPVqAMO=verL6gRDGprMjCDPGcQ@mail.gmail.com>
Date:   Fri, 24 Jan 2020 09:39:48 -0800
From:   Nick Desaulniers <ndesaulniers@...gle.com>
To:     Nathan Chancellor <natechancellor@...il.com>
Cc:     Bard Liao <bardliao@...ltek.com>,
        Oder Chiou <oder_chiou@...ltek.com>,
        Liam Girdwood <lgirdwood@...il.com>,
        Mark Brown <broonie@...nel.org>, alsa-devel@...a-project.org,
        LKML <linux-kernel@...r.kernel.org>,
        clang-built-linux <clang-built-linux@...glegroups.com>
Subject: Re: [PATCH] ASoC: rt1015: Remove unnecessary const

On Fri, Jan 24, 2020 at 7:58 AM Nathan Chancellor
<natechancellor@...il.com> wrote:
>
> 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")
> Link: https://github.com/ClangBuiltLinux/linux/issues/845
> Signed-off-by: Nathan Chancellor <natechancellor@...il.com>

Thanks for the patch!

Reviewed-by: Nick Desaulniers <ndesaulniers@...gle.com>

> ---
>  sound/soc/codecs/rt1015.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/sound/soc/codecs/rt1015.c b/sound/soc/codecs/rt1015.c
> index 4a9c5b54008f..6d490e2dbc25 100644
> --- a/sound/soc/codecs/rt1015.c
> +++ b/sound/soc/codecs/rt1015.c
> @@ -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,
> --

-- 
Thanks,
~Nick Desaulniers

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ