From patchwork Tue Jun 27 07:27:18 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gilad Ben-Yossef X-Patchwork-Id: 106399 Delivered-To: patch@linaro.org Received: by 10.140.101.48 with SMTP id t45csp909114qge; Tue, 27 Jun 2017 00:31:26 -0700 (PDT) X-Received: by 10.99.120.199 with SMTP id t190mr3920437pgc.176.1498548686650; Tue, 27 Jun 2017 00:31:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1498548686; cv=none; d=google.com; s=arc-20160816; b=MI5IFgzLQjBldORTD0P0Ngr84nbbh5mOmfkRwvJ6VhQS8VChAb9pKBGJLKng9Drz+/ 9lhFwVGrRcW3FoBc0otbxKvbNhJmMRQPVqivVZ0P0au45RRxUJqR9KO3eHtoppSPVCRr sEA1ssnFuRpZD4rqwM7hsWFhXSlSL/0ybNZk+UzAK6GCq8hA1Z/UkueMDvghnSX3pwq3 i9T9oZb6PSPbVr6ZB0CBUvn1C5jc0EHfiO78gwBM+/WxfUVm5DQ7ryvLIyvb+b0Fe2S+ atmDujpNxKtXoZgZhLSVUvun7UEkOkJ/WJMjctwlwKqefG5xWBEvnkdrpj5Ojsog37Fg 9HLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=k+rY0m5+G4LsysvcRHBWq8lojclW6XJAgBeQfkqpTI8=; b=xr1pKIsRbubtUHwF8z2BB7UbXsSgAONNcr94lw/e4ADNrHuha0sRCdaULoAjklbrl1 v1LD0MdaTQR5RrHVdAVWuKwf/rG9zkRcof7/Tojt/2ixFsMCQV4lkreUEAXY4Mi89JOi Ut+Q03J046KJTFlNa5wNPg0RqltH+tGV23V6A8XIzvQ8eghNCMFKDivwVn6YDOUIopaZ QHI9Qol813uK8RPceXOZrcRbmgYaeKzkymoLSjGLELYTpKtHPFGm04gjB/CFnfAhIuFT lnfnz0nzKBNcpt9ADCgbwjzkg3H2M5OrrdeNmvSaeCOc0KOA9cJcQYl0Ib3t+30jPz8V 0ZtQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i16si1433849pfj.91.2017.06.27.00.31.26; Tue, 27 Jun 2017 00:31:26 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752607AbdF0HbT (ORCPT + 25 others); Tue, 27 Jun 2017 03:31:19 -0400 Received: from foss.arm.com ([217.140.101.70]:52456 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752440AbdF0H2O (ORCPT ); Tue, 27 Jun 2017 03:28:14 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 27678344; Tue, 27 Jun 2017 00:28:09 -0700 (PDT) Received: from gby.kfn.arm.com (unknown [10.45.48.148]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 9881C3F4FF; Tue, 27 Jun 2017 00:28:07 -0700 (PDT) From: Gilad Ben-Yossef To: Greg Kroah-Hartman , linux-crypto@vger.kernel.org, driverdev-devel@linuxdriverproject.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Cc: Ofir Drang Subject: [PATCH 06/14] staging: ccree: fix unmatched if/else braces Date: Tue, 27 Jun 2017 10:27:18 +0300 Message-Id: <1498548449-10803-7-git-send-email-gilad@benyossef.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1498548449-10803-1-git-send-email-gilad@benyossef.com> References: <1498548449-10803-1-git-send-email-gilad@benyossef.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fix mismatched braces between if and else. Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/ssi_buffer_mgr.c | 3 ++- drivers/staging/ccree/ssi_cipher.c | 7 +++---- 2 files changed, 5 insertions(+), 5 deletions(-) -- 2.1.4 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);