* [PATCH] crypto: arm64 - move const after static
@ 2020-10-30 8:19 Tian Tao
2020-10-30 10:38 ` Ard Biesheuvel
0 siblings, 1 reply; 2+ messages in thread
From: Tian Tao @ 2020-10-30 8:19 UTC (permalink / raw)
To: herbert, davem, catalin.marinas, will, linux-crypto,
linux-arm-kernel, linux-kernel
Fixed the WARNING: Move const after static - use 'static const u8'
Signed-off-by: Tian Tao <tiantao6@hisilicon.com>
---
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
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] crypto: arm64 - move const after static
2020-10-30 8:19 [PATCH] crypto: arm64 - move const after static Tian Tao
@ 2020-10-30 10:38 ` Ard Biesheuvel
0 siblings, 0 replies; 2+ messages in thread
From: Ard Biesheuvel @ 2020-10-30 10:38 UTC (permalink / raw)
To: Tian Tao
Cc: Herbert Xu, Catalin Marinas, Linux Kernel Mailing List,
Linux Crypto Mailing List, Will Deacon, David S. Miller,
Linux ARM
On Fri, 30 Oct 2020 at 09:18, Tian Tao <tiantao6@hisilicon.com> wrote:
>
> Fixed the WARNING: Move const after static - use 'static const u8'
>
> Signed-off-by: Tian Tao <tiantao6@hisilicon.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
>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-10-30 10:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-30 8:19 [PATCH] crypto: arm64 - move const after static Tian Tao
2020-10-30 10:38 ` Ard Biesheuvel
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).