From patchwork Tue Aug 15 06:26:47 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: 110107 Delivered-To: patch@linaro.org Received: by 10.182.109.195 with SMTP id hu3csp5115634obb; Mon, 14 Aug 2017 23:28:41 -0700 (PDT) X-Received: by 10.84.232.13 with SMTP id h13mr31752491plk.168.1502778521011; Mon, 14 Aug 2017 23:28:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1502778521; cv=none; d=google.com; s=arc-20160816; b=iuvEJb+Z5S7ivNlyTqK19WMmQuEvEPoeOvmqv3mYqPBR0c10kMpBlIwN4pe4KLVrwL UlZdG8xdxWpPztqIdPMBgLZKDwsqBf6lcEB/WXG4hhd2L3OoQMpnGzd67CkY5Iz18PAs kLlbYlNY36aHlfP/+30+7Ru1WeiZ/aCefmXFUxI/2lUzf72iMWcuKaf7Cuom/v8F4w/z WWoPF5awIYv6R8WHaYOb/F3xe8buySskVM9+YKqG1qsNHBWkcnkIZkYSoHd8qHs1yfCV 0w+w56XOn9cIrCbqCWBeB1ul6sYaiY6feWELFnkdc/Pp1bqmJYG2njcevmbfcUwuhf2C u5Xg== 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=QY/OPTyyH/m6z0BMjKVUsgLwYdZyEtUEjYQOKQKo19U=; b=QIb81HGLpq3ZN3URRf1tCVkCZox32hGfWSAhihIUopb/51Eeg3aXw3FkNDfsp/BAzP AIIHvXNM6woh3EsqJz8zSSuu5R4QDyj1AuxFMwT9Iu11crLXXYh8PF1Acz/N6KNGUa29 38L5DLv5QRTlqnX1wvxHZwYh5dTQ2j2IVzg6xzfDnD0X6MeGIhaspy23HllR11RZmJ3K WeNAf830MCSUNvZQpintDKupMjrE9xRKdraAeNDmoiwUSBnimI534G72npogedp1aPUe jfuswy/iQqM3uUJnfvBJQhdlzVXtzX7SYmjdnYhjLk6tqrjVaWraE9OBH18pXthciYEM 6KlA== 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 r13si5782622plj.167.2017.08.14.23.28.40; Mon, 14 Aug 2017 23:28:41 -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 S1753712AbdHOG2i (ORCPT + 25 others); Tue, 15 Aug 2017 02:28:38 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:48214 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753657AbdHOG2f (ORCPT ); Tue, 15 Aug 2017 02:28:35 -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 2E5FE2B; Mon, 14 Aug 2017 23:28:35 -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 8F7273F3E1; Mon, 14 Aug 2017 23:28:33 -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 v3 19/22] staging: ccree: fix code indent Date: Tue, 15 Aug 2017 09:26:47 +0300 Message-Id: <1502778412-16255-20-git-send-email-gilad@benyossef.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1502778412-16255-1-git-send-email-gilad@benyossef.com> References: <1502778412-16255-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 multiple code indentation issues. Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/ssi_buffer_mgr.c | 23 ++++++++++++----------- drivers/staging/ccree/ssi_cipher.c | 2 +- drivers/staging/ccree/ssi_sysfs.c | 4 +++- 3 files changed, 16 insertions(+), 13 deletions(-) -- 2.1.4 diff --git a/drivers/staging/ccree/ssi_buffer_mgr.c b/drivers/staging/ccree/ssi_buffer_mgr.c index 202387b..051d948 100644 --- a/drivers/staging/ccree/ssi_buffer_mgr.c +++ b/drivers/staging/ccree/ssi_buffer_mgr.c @@ -420,8 +420,8 @@ ssi_aead_handle_config_buf(struct device *dev, sg_init_one(&areq_ctx->ccm_adata_sg, config_data, AES_BLOCK_SIZE + areq_ctx->ccm_hdr_size); if (unlikely(dma_map_sg(dev, &areq_ctx->ccm_adata_sg, 1, DMA_TO_DEVICE) != 1)) { - SSI_LOG_ERR("dma_map_sg() config buffer failed\n"); - return -ENOMEM; + SSI_LOG_ERR("dma_map_sg() config buffer failed\n"); + return -ENOMEM; } SSI_LOG_DEBUG("Mapped curr_buff: dma_address=%pad page=%p addr=%pK " "offset=%u length=%u\n", @@ -451,8 +451,8 @@ static inline int ssi_ahash_handle_curr_buf(struct device *dev, sg_init_one(areq_ctx->buff_sg, curr_buff, curr_buff_cnt); if (unlikely(dma_map_sg(dev, areq_ctx->buff_sg, 1, DMA_TO_DEVICE) != 1)) { - SSI_LOG_ERR("dma_map_sg() src buffer failed\n"); - return -ENOMEM; + SSI_LOG_ERR("dma_map_sg() src buffer failed\n"); + return -ENOMEM; } SSI_LOG_DEBUG("Mapped curr_buff: dma_address=%pad page=%p addr=%pK " "offset=%u length=%u\n", @@ -1050,15 +1050,16 @@ static inline int ssi_buffer_mgr_prepare_aead_data_mlli( * verification is made by CPU compare in order to * simplify MAC verification upon request completion */ - u32 size_to_skip = req->assoclen; + u32 size_to_skip = req->assoclen; - if (areq_ctx->is_gcm4543) - size_to_skip += crypto_aead_ivsize(tfm); + if (areq_ctx->is_gcm4543) + size_to_skip += crypto_aead_ivsize(tfm); - ssi_buffer_mgr_copy_scatterlist_portion( - areq_ctx->backup_mac, req->src, - size_to_skip + req->cryptlen - areq_ctx->req_authsize, - size_to_skip + req->cryptlen, SSI_SG_TO_BUF); + ssi_buffer_mgr_copy_scatterlist_portion(areq_ctx->backup_mac, + req->src, + size_to_skip + req->cryptlen - areq_ctx->req_authsize, + size_to_skip + req->cryptlen, + SSI_SG_TO_BUF); areq_ctx->icv_virt_addr = areq_ctx->backup_mac; } else { /* Contig. ICV */ /*Should hanlde if the sg is not contig.*/ diff --git a/drivers/staging/ccree/ssi_cipher.c b/drivers/staging/ccree/ssi_cipher.c index 14930ce..aa722e1 100644 --- a/drivers/staging/ccree/ssi_cipher.c +++ b/drivers/staging/ccree/ssi_cipher.c @@ -139,7 +139,7 @@ static int validate_data_size(struct ssi_ablkcipher_ctx *ctx_p, unsigned int siz break; case S_DIN_to_DES: if (likely(IS_ALIGNED(size, DES_BLOCK_SIZE))) - return 0; + return 0; break; #if SSI_CC_HAS_MULTI2 case S_DIN_to_MULTI2: diff --git a/drivers/staging/ccree/ssi_sysfs.c b/drivers/staging/ccree/ssi_sysfs.c index a0ab3c6..40cd3be2 100644 --- a/drivers/staging/ccree/ssi_sysfs.c +++ b/drivers/staging/ccree/ssi_sysfs.c @@ -316,7 +316,9 @@ static ssize_t ssi_sys_help_show(struct kobject *kobj, offset += scnprintf(buf + offset, PAGE_SIZE - offset, "Usage:\n"); for (i = 0; i < ARRAY_SIZE(help_str); i += 2) - offset += scnprintf(buf + offset, PAGE_SIZE - offset, "%s\t\t%s\n", help_str[i], help_str[i + 1]); + offset += scnprintf(buf + offset, PAGE_SIZE - offset, + "%s\t\t%s\n", help_str[i], + help_str[i + 1]); return offset; }