Commit abc6146a authored by Gustavo A. R. Silva's avatar Gustavo A. R. Silva Committed by Herbert Xu

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/115Signed-off-by: default avatarGustavo A. R. Silva <gustavoars@kernel.org>
Acked-by: default avatarGilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent ad6d66bc
...@@ -97,6 +97,7 @@ static int validate_keys_sizes(struct cc_cipher_ctx *ctx_p, u32 size) ...@@ -97,6 +97,7 @@ static int validate_keys_sizes(struct cc_cipher_ctx *ctx_p, u32 size)
case S_DIN_to_SM4: case S_DIN_to_SM4:
if (size == SM4_KEY_SIZE) if (size == SM4_KEY_SIZE)
return 0; return 0;
break;
default: default:
break; break;
} }
...@@ -139,9 +140,11 @@ static int validate_data_size(struct cc_cipher_ctx *ctx_p, ...@@ -139,9 +140,11 @@ static int validate_data_size(struct cc_cipher_ctx *ctx_p,
case DRV_CIPHER_CBC: case DRV_CIPHER_CBC:
if (IS_ALIGNED(size, SM4_BLOCK_SIZE)) if (IS_ALIGNED(size, SM4_BLOCK_SIZE))
return 0; return 0;
break;
default: default:
break; break;
} }
break;
default: default:
break; break;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment