Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1675374
| From | Gilad Ben-Yossef <gilad@benyossef.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 06/14] staging: ccree: fix unmatched if/else braces |
| Date | 2017-06-27 09:40 +0200 |
| Message-ID | <tWTgm-5HC-37@gated-at.bofh.it> (permalink) |
| References | <tWT6G-5BT-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Fix mismatched braces between if and else.
Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
---
drivers/staging/ccree/ssi_buffer_mgr.c | 3 ++-
drivers/staging/ccree/ssi_cipher.c | 7 +++----
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/ccree/ssi_buffer_mgr.c b/drivers/staging/ccree/ssi_buffer_mgr.c
index 9e8a134..f9720fc 100644
--- a/drivers/staging/ccree/ssi_buffer_mgr.c
+++ b/drivers/staging/ccree/ssi_buffer_mgr.c
@@ -551,8 +551,9 @@ int ssi_buffer_mgr_map_blkcipher_request(
SSI_LOG_DEBUG("Mapped iv %u B at va=%pK to dma=0x%llX\n",
ivsize, info,
(unsigned long long)req_ctx->gen_ctx.iv_dma_addr);
- } else
+ } else {
req_ctx->gen_ctx.iv_dma_addr = 0;
+ }
/* Map the src SGL */
rc = ssi_buffer_mgr_map_scatterlist(dev, src,
diff --git a/drivers/staging/ccree/ssi_cipher.c b/drivers/staging/ccree/ssi_cipher.c
index c233b7c..88ed777 100644
--- a/drivers/staging/ccree/ssi_cipher.c
+++ b/drivers/staging/ccree/ssi_cipher.c
@@ -401,8 +401,9 @@ static int ssi_blkcipher_setkey(struct crypto_tfm *tfm,
/* STAT_PHASE_1: Copy key to ctx */
dma_sync_single_for_cpu(dev, ctx_p->user.key_dma_addr,
max_key_buf_size, DMA_TO_DEVICE);
-#if SSI_CC_HAS_MULTI2
+
if (ctx_p->flow_mode == S_DIN_to_MULTI2) {
+#if SSI_CC_HAS_MULTI2
memcpy(ctx_p->user.key, key, CC_MULTI2_SYSTEM_N_DATA_KEY_SIZE);
ctx_p->key_round_number = key[CC_MULTI2_SYSTEM_N_DATA_KEY_SIZE];
if (ctx_p->key_round_number < CC_MULTI2_MIN_NUM_ROUNDS ||
@@ -410,10 +411,8 @@ static int ssi_blkcipher_setkey(struct crypto_tfm *tfm,
crypto_tfm_set_flags(tfm, CRYPTO_TFM_RES_BAD_KEY_LEN);
SSI_LOG_DEBUG("ssi_blkcipher_setkey: SSI_CC_HAS_MULTI2 einval");
return -EINVAL;
- }
- } else
#endif /*SSI_CC_HAS_MULTI2*/
- {
+ } else {
memcpy(ctx_p->user.key, key, keylen);
if (keylen == 24)
memset(ctx_p->user.key + 24, 0, CC_AES_KEY_SIZE_MAX - 24);
--
2.1.4
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 00/14] staging: ccree: coding style fixes Gilad Ben-Yossef <gilad@benyossef.com> - 2017-06-27 09:30 +0200
[PATCH 14/14] staging: ccree: fix block comment style Gilad Ben-Yossef <gilad@benyossef.com> - 2017-06-27 09:30 +0200
Re: [PATCH 14/14] staging: ccree: fix block comment style Frans Klaver <fransklaver@gmail.com> - 2017-06-29 16:40 +0200
[PATCH 12/14] staging: ccree: remove unused type CCFipsSyncStatus_t Gilad Ben-Yossef <gilad@benyossef.com> - 2017-06-27 09:30 +0200
[PATCH 09/14] staging: ccree: remove custom type tdes_keys_t Gilad Ben-Yossef <gilad@benyossef.com> - 2017-06-27 09:30 +0200
[PATCH 07/14] staging: ccree: remove comparisons to NULL Gilad Ben-Yossef <gilad@benyossef.com> - 2017-06-27 09:30 +0200
[PATCH 10/14] staging: ccree: remove custom type ssi_fips_error_t Gilad Ben-Yossef <gilad@benyossef.com> - 2017-06-27 09:40 +0200
[PATCH 04/14] staging: ccree: remove redundant blank lines Gilad Ben-Yossef <gilad@benyossef.com> - 2017-06-27 09:40 +0200
[PATCH 11/14] staging: ccree: remove custom type ssi_fips_state_t Gilad Ben-Yossef <gilad@benyossef.com> - 2017-06-27 09:40 +0200
[PATCH 06/14] staging: ccree: fix unmatched if/else braces Gilad Ben-Yossef <gilad@benyossef.com> - 2017-06-27 09:40 +0200
[PATCH 05/14] staging: ccree: no need for braces for single statements Gilad Ben-Yossef <gilad@benyossef.com> - 2017-06-27 09:40 +0200
[PATCH 03/14] staging: ccree: fix else placement Gilad Ben-Yossef <gilad@benyossef.com> - 2017-06-27 09:40 +0200
csiph-web