[PATCH] crypto:space required before the open brace '{'

chenqingyun001@208suo.com posted 1 patch 2 years, 7 months ago
arch/arm64/crypto/ghash-ce-glue.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] crypto:space required before the open brace '{'
Posted by chenqingyun001@208suo.com 2 years, 7 months ago
Maintain code readability and style consistency

Signed-off-by: Qingyun Chen <chenqingyun001@208suo.com>
---
  arch/arm64/crypto/ghash-ce-glue.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/crypto/ghash-ce-glue.c 
b/arch/arm64/crypto/ghash-ce-glue.c
index 97331b454ea8..cb1cd161c022 100644
--- a/arch/arm64/crypto/ghash-ce-glue.c
+++ b/arch/arm64/crypto/ghash-ce-glue.c
@@ -241,7 +241,7 @@ static int gcm_aes_setkey(struct crypto_aead *tfm, 
const u8 *inkey,
      if (ret)
          return -EINVAL;

-    aes_encrypt(&ctx->aes_key, key, (u8[AES_BLOCK_SIZE]){});
+    aes_encrypt(&ctx->aes_key, key, (u8[AES_BLOCK_SIZE]) {});

      /* needed for the fallback */
      memcpy(&ctx->ghash_key.k, key, GHASH_BLOCK_SIZE);
Re: [PATCH] crypto:space required before the open brace '{'
Posted by Ard Biesheuvel 2 years, 7 months ago
On Thu, 13 Jul 2023 at 10:59, <chenqingyun001@208suo.com> wrote:
>
> Maintain code readability and style consistency
>
> Signed-off-by: Qingyun Chen <chenqingyun001@208suo.com>

NAK

This is a cast operation, which doesn't require a trailing space.

If the tool you are using misidentifies this, please fix the tool instead.


> ---
>   arch/arm64/crypto/ghash-ce-glue.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/arm64/crypto/ghash-ce-glue.c
> b/arch/arm64/crypto/ghash-ce-glue.c
> index 97331b454ea8..cb1cd161c022 100644
> --- a/arch/arm64/crypto/ghash-ce-glue.c
> +++ b/arch/arm64/crypto/ghash-ce-glue.c
> @@ -241,7 +241,7 @@ static int gcm_aes_setkey(struct crypto_aead *tfm,
> const u8 *inkey,
>       if (ret)
>           return -EINVAL;
>
> -    aes_encrypt(&ctx->aes_key, key, (u8[AES_BLOCK_SIZE]){});
> +    aes_encrypt(&ctx->aes_key, key, (u8[AES_BLOCK_SIZE]) {});
>
>       /* needed for the fallback */
>       memcpy(&ctx->ghash_key.k, key, GHASH_BLOCK_SIZE);