]> git.baikalelectronics.ru Git - kernel.git/commitdiff
crypto: inside-secure - fix gcc-4.9 warnings
authorArnd Bergmann <arnd@arndb.de>
Tue, 12 Sep 2017 10:12:16 +0000 (12:12 +0200)
committerHerbert Xu <herbert@gondor.apana.org.au>
Wed, 20 Sep 2017 09:42:41 +0000 (17:42 +0800)
All older compiler versions up to gcc-4.9 produce these
harmless warnings:

drivers/crypto/inside-secure/safexcel_cipher.c:389:9: warning: missing braces around initializer [-Wmissing-braces]
drivers/crypto/inside-secure/safexcel_cipher.c:389:9: warning: (near initialization for ‘result.completion’) [-Wmissing-braces]
drivers/crypto/inside-secure/safexcel_hash.c:422:9: warning: missing braces around initializer [-Wmissing-braces]
drivers/crypto/inside-secure/safexcel_hash.c:422:9: warning: (near initialization for ‘result.completion’) [-Wmissing-braces]

This changes the syntax to something that works on all versions
without warnings.

Fixes: 1b44c5a60c13 ("crypto: inside-secure - add SafeXcel EIP197 crypto engine driver")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Antoine Tenart <antoine.tenart@free-electrons.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/inside-secure/safexcel_cipher.c
drivers/crypto/inside-secure/safexcel_hash.c

index d2207ac5ba19cdd357ab5bbae3a128d1fa92183e..5438552bc6d783b57a23763e64c59afb90c340ae 100644 (file)
@@ -386,7 +386,7 @@ static int safexcel_cipher_exit_inv(struct crypto_tfm *tfm)
        struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm);
        struct safexcel_crypto_priv *priv = ctx->priv;
        struct skcipher_request req;
-       struct safexcel_inv_result result = { 0 };
+       struct safexcel_inv_result result = {};
        int ring = ctx->base.ring;
 
        memset(&req, 0, sizeof(struct skcipher_request));
index 3f819399cd95519a9956ed1d3ecba76fa2aa62b4..3980f946874fa08b64288b5d8b04bcac9134a0ad 100644 (file)
@@ -419,7 +419,7 @@ static int safexcel_ahash_exit_inv(struct crypto_tfm *tfm)
        struct safexcel_ahash_ctx *ctx = crypto_tfm_ctx(tfm);
        struct safexcel_crypto_priv *priv = ctx->priv;
        struct ahash_request req;
-       struct safexcel_inv_result result = { 0 };
+       struct safexcel_inv_result result = {};
        int ring = ctx->base.ring;
 
        memset(&req, 0, sizeof(struct ahash_request));