[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20190809061024.GC10392@gondor.apana.org.au>
Date: Fri, 9 Aug 2019 16:10:24 +1000
From: Herbert Xu <herbert@...dor.apana.org.au>
To: "Gustavo A. R. Silva" <gustavo@...eddedor.com>
Cc: "David S. Miller" <davem@...emloft.net>,
linux-crypto@...r.kernel.org, linux-kernel@...r.kernel.org,
Kees Cook <keescook@...omium.org>
Subject: Re: [PATCH] crypto: ux500/crypt: Mark expected switch fall-throughs
On Mon, Jul 29, 2019 at 05:38:19PM -0500, Gustavo A. R. Silva wrote:
> Mark switch cases where we are expecting to fall through.
>
> This patch fixes the following warning (Building: arm):
>
> drivers/crypto/ux500/cryp/cryp.c: In function ‘cryp_save_device_context’:
> drivers/crypto/ux500/cryp/cryp.c:316:16: warning: this statement may fall through [-Wimplicit-fallthrough=]
> ctx->key_4_r = readl_relaxed(&src_reg->key_4_r);
> drivers/crypto/ux500/cryp/cryp.c:318:2: note: here
> case CRYP_KEY_SIZE_192:
> ^~~~
> drivers/crypto/ux500/cryp/cryp.c:320:16: warning: this statement may fall through [-Wimplicit-fallthrough=]
> ctx->key_3_r = readl_relaxed(&src_reg->key_3_r);
> drivers/crypto/ux500/cryp/cryp.c:322:2: note: here
> case CRYP_KEY_SIZE_128:
> ^~~~
> drivers/crypto/ux500/cryp/cryp.c:324:16: warning: this statement may fall through [-Wimplicit-fallthrough=]
> ctx->key_2_r = readl_relaxed(&src_reg->key_2_r);
> drivers/crypto/ux500/cryp/cryp.c:326:2: note: here
> default:
> ^~~~~~~
> In file included from ./include/linux/io.h:13:0,
> from drivers/crypto/ux500/cryp/cryp_p.h:14,
> from drivers/crypto/ux500/cryp/cryp.c:15:
> drivers/crypto/ux500/cryp/cryp.c: In function ‘cryp_restore_device_context’:
> ./arch/arm/include/asm/io.h:92:22: warning: this statement may fall through [-Wimplicit-fallthrough=]
> #define __raw_writel __raw_writel
> ^
> ./arch/arm/include/asm/io.h:299:29: note: in expansion of macro ‘__raw_writel’
> #define writel_relaxed(v,c) __raw_writel((__force u32) cpu_to_le32(v),c)
> ^~~~~~~~~~~~
> drivers/crypto/ux500/cryp/cryp.c:363:3: note: in expansion of macro ‘writel_relaxed’
> writel_relaxed(ctx->key_4_r, ®->key_4_r);
> ^~~~~~~~~~~~~~
> drivers/crypto/ux500/cryp/cryp.c:365:2: note: here
> case CRYP_KEY_SIZE_192:
> ^~~~
> In file included from ./include/linux/io.h:13:0,
> from drivers/crypto/ux500/cryp/cryp_p.h:14,
> from drivers/crypto/ux500/cryp/cryp.c:15:
> ./arch/arm/include/asm/io.h:92:22: warning: this statement may fall through [-Wimplicit-fallthrough=]
> #define __raw_writel __raw_writel
> ^
> ./arch/arm/include/asm/io.h:299:29: note: in expansion of macro ‘__raw_writel’
> #define writel_relaxed(v,c) __raw_writel((__force u32) cpu_to_le32(v),c)
> ^~~~~~~~~~~~
> drivers/crypto/ux500/cryp/cryp.c:367:3: note: in expansion of macro ‘writel_relaxed’
> writel_relaxed(ctx->key_3_r, ®->key_3_r);
> ^~~~~~~~~~~~~~
> drivers/crypto/ux500/cryp/cryp.c:369:2: note: here
> case CRYP_KEY_SIZE_128:
> ^~~~
> In file included from ./include/linux/io.h:13:0,
> from drivers/crypto/ux500/cryp/cryp_p.h:14,
> from drivers/crypto/ux500/cryp/cryp.c:15:
> ./arch/arm/include/asm/io.h:92:22: warning: this statement may fall through [-Wimplicit-fallthrough=]
> #define __raw_writel __raw_writel
> ^
> ./arch/arm/include/asm/io.h:299:29: note: in expansion of macro ‘__raw_writel’
> #define writel_relaxed(v,c) __raw_writel((__force u32) cpu_to_le32(v),c)
> ^~~~~~~~~~~~
> drivers/crypto/ux500/cryp/cryp.c:371:3: note: in expansion of macro ‘writel_relaxed’
> writel_relaxed(ctx->key_2_r, ®->key_2_r);
> ^~~~~~~~~~~~~~
> drivers/crypto/ux500/cryp/cryp.c:373:2: note: here
> default:
> ^~~~~~~
>
> Signed-off-by: Gustavo A. R. Silva <gustavo@...eddedor.com>
> ---
> drivers/crypto/ux500/cryp/cryp.c | 6 ++++++
> 1 file changed, 6 insertions(+)
Patch applied. Thanks.
--
Email: Herbert Xu <herbert@...dor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
Powered by blists - more mailing lists