Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

crypto: ccree - Fix fall-through warnings for Clang

In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple
warnings by explicitly adding multiple break statements instead of
letting the code fall through to the next case.

Link: https://github.com/KSPP/linux/issues/115
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Acked-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

authored by

Gustavo A. R. Silva and committed by
Herbert Xu
abc6146a ad6d66bc

+3
+3
drivers/crypto/ccree/cc_cipher.c
··· 97 97 case S_DIN_to_SM4: 98 98 if (size == SM4_KEY_SIZE) 99 99 return 0; 100 + break; 100 101 default: 101 102 break; 102 103 } ··· 140 139 case DRV_CIPHER_CBC: 141 140 if (IS_ALIGNED(size, SM4_BLOCK_SIZE)) 142 141 return 0; 142 + break; 143 143 default: 144 144 break; 145 145 } 146 + break; 146 147 default: 147 148 break; 148 149 }