Skip to content

Commit 10564f2

Browse files
author
Andrei Simion
committed
crypto: atmel-aes: Fixes for upstream
Fix checkpatch.pl and implicit warning fallthrough. Add fallthrough macro to specify the compiler that is an intentional fall-through case. drivers/crypto/atmel-aes.c: In function ‘atmel_aes_get_cap’: drivers/crypto/atmel-aes.c:2563:48: warning: this statement may fall through [-Wimplicit-fallthrough=] 2563 | dd->caps.has_6words_limitation = 1; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~ drivers/crypto/atmel-aes.c:2564:9: note: here 2564 | case 0x500: | ^~~~ Fix checkpatch.pl warnings WARNING: 'suppport' may be misspelled - perhaps 'support'? FILE: drivers/crypto/atmel-aes.c:92 WARNING: line length of 103 exceeds 100 columns FILE: drivers/crypto/atmel-aes.c:2138: + crypto_aead_set_flags(ctx->fallback, crypto_aead_get_flags(tfm) & CRYPTO_TFM_REQ_MASK) Fixes: 4ade590 ("crypto: atmel-aes: Add fallback for unsupported ESP header length") Signed-off-by: Andrei Simion <andrei.simion@microchip.com> Reviewed-by: Cristian Birsan <cristian.birsan@microchip.com>
1 parent 4ade590 commit 10564f2

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

drivers/crypto/atmel-aes.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@
8989
* @has_dualbuff: dual buffer support
9090
* @has_cfb64: cfb64 support
9191
* @has_gcm: gcm support
92-
* @has_xts: xts suppport
92+
* @has_xts: xts support
9393
* @has_authenc: authentication support
9494
* @max_burst_size: max DMA bust size
9595
* @has_6words_limitation: some versions of IP have a 6 word headder limitation
@@ -2135,7 +2135,9 @@ static int atmel_aes_authenc_setkey(struct crypto_aead *tfm, const u8 *key,
21352135

21362136
if (ctx->base.dd->caps.has_6words_limitation) {
21372137
crypto_aead_clear_flags(ctx->fallback, CRYPTO_TFM_REQ_MASK);
2138-
crypto_aead_set_flags(ctx->fallback, crypto_aead_get_flags(tfm) & CRYPTO_TFM_REQ_MASK);
2138+
crypto_aead_set_flags(ctx->fallback,
2139+
crypto_aead_get_flags(tfm) &
2140+
CRYPTO_TFM_REQ_MASK);
21392141
crypto_aead_setkey(ctx->fallback, key, keylen);
21402142
}
21412143
return 0;
@@ -2561,6 +2563,7 @@ static void atmel_aes_get_cap(struct atmel_aes_dev *dd)
25612563
case 0x700:
25622564
case 0x600:
25632565
dd->caps.has_6words_limitation = 1;
2566+
fallthrough;
25642567
case 0x500:
25652568
dd->caps.has_dualbuff = 1;
25662569
dd->caps.has_cfb64 = 1;

0 commit comments

Comments
 (0)