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: <CAMj1kXE-v=mDLUjiL=dhMN+wVs-UNTQiBLdhJftNqVQ3sxSQsQ@mail.gmail.com>
Date:   Fri, 30 Oct 2020 11:38:38 +0100
From:   Ard Biesheuvel <ardb@...nel.org>
To:     Tian Tao <tiantao6@...ilicon.com>
Cc:     Herbert Xu <herbert@...dor.apana.org.au>,
        "David S. Miller" <davem@...emloft.net>,
        Catalin Marinas <catalin.marinas@....com>,
        Will Deacon <will@...nel.org>,
        Linux Crypto Mailing List <linux-crypto@...r.kernel.org>,
        Linux ARM <linux-arm-kernel@...ts.infradead.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] crypto: arm64 - move const after static

On Fri, 30 Oct 2020 at 09:18, Tian Tao <tiantao6@...ilicon.com> wrote:
>
> Fixed the WARNING: Move const after static - use 'static const u8'
>
> Signed-off-by: Tian Tao <tiantao6@...ilicon.com>

Nak.

What warning is that? This is perfectly valid C, and the const is
already after the static. And in general, const applies to the type on
the left, unless it comes first, so putting it after the type is less
ambiguous:


> ---
>  arch/arm64/crypto/aes-ce-glue.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/arm64/crypto/aes-ce-glue.c b/arch/arm64/crypto/aes-ce-glue.c
> index 56a5f6f..8ba6f04 100644
> --- a/arch/arm64/crypto/aes-ce-glue.c
> +++ b/arch/arm64/crypto/aes-ce-glue.c
> @@ -77,7 +77,7 @@ int ce_aes_expandkey(struct crypto_aes_ctx *ctx, const u8 *in_key,
>         /*
>          * The AES key schedule round constants
>          */
> -       static u8 const rcon[] = {
> +       static const u8 rcon[] = {
>                 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36,
>         };
>
> --
> 2.7.4
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ