From patchwork Tue Dec 12 14:52:54 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: 121529 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp4222514qgn; Tue, 12 Dec 2017 06:54:38 -0800 (PST) X-Google-Smtp-Source: ACJfBossksdECju2ATrDiMuiHD9rhENTumFYP9F+OIGreIivFVBlRf8Swf6si1smT9e88dfrPFk7 X-Received: by 10.99.176.3 with SMTP id h3mr2317743pgf.207.1513090478656; Tue, 12 Dec 2017 06:54:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1513090478; cv=none; d=google.com; s=arc-20160816; b=qDAuJ+gVxu/XdT9/pL/CzwctzdVeyM4Dj5XzNvYQ9iFp4FDMs/u4WbxFKsclEqDj85 0Itus0OrPRy/VcuTXFm1NBKe70+XMsGDiF2nkbE79lVCwvegWXXEiCTv4VdYHkg1fvGs D5FJQBu/Zq7c9To0b8LIZeG5HbF7MTUoqis3hPuBx9Jl3OrbI1DpVG21mEQcIbAkoKTB r24tGTH9eRGGfGZOvbp1IlPpLpAQpVy1BIvLexdqCZmB6WtNa2wQExZnhMJmiq1emtHM Jy/NIREbJrb1XAddXke9mQ25jtrNwA1STN5ee3q6dsHoqB1Dv//mniGWEZHkvY5RHPxB yHWg== 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=OByRnOKYUywAn1yl0xFe2sDdPoREWGZ/+ltcBzbHmEE=; b=rgzVH8bsALMaZ52gXy4ZlXtuvAjSQPulDglQuaV22Tc9ulvOfhhaqR9nS5SK0ao4pE w5n2PQDG77h/zUYGvMsOZhqAef1c36Ow6CdabC7O73H0j1Hus3gyGQOT5lh4RuHsJJvo MWIVY8r8oLHJw607ROUJUt/kkEfJwM1r3ibX6r97XSKgQc5lid/63AZgihTUy1NsP0o3 OgRqLaWwF0GCqy0L9p/c9DnCCWAujFIQxi5xVB1OlBluztckFVcZuF8QllTwup6bkkTm snBReB/H2V414m59MF/P1vEGfHRLOfWqWtnnEyvkgOeKK4+5xEesPoFpGugDbJXTIyrg fQ8g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-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 v9si10144691plo.199.2017.12.12.06.54.38; Tue, 12 Dec 2017 06:54:38 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-crypto-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-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751499AbdLLOyf (ORCPT + 1 other); Tue, 12 Dec 2017 09:54:35 -0500 Received: from foss.arm.com ([217.140.101.70]:45090 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752467AbdLLOyd (ORCPT ); Tue, 12 Dec 2017 09:54:33 -0500 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 339BD1529; Tue, 12 Dec 2017 06:54:33 -0800 (PST) Received: from sugar.kfn.arm.com (unknown [10.45.48.196]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 432FA3F577; Tue, 12 Dec 2017 06:54:30 -0800 (PST) From: Gilad Ben-Yossef To: Greg Kroah-Hartman Cc: Ofir Drang , linux-crypto@vger.kernel.org, driverdev-devel@linuxdriverproject.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: [PATCH 08/24] staging: ccree: fix func call param indentation Date: Tue, 12 Dec 2017 14:52:54 +0000 Message-Id: <1513090395-7938-9-git-send-email-gilad@benyossef.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1513090395-7938-1-git-send-email-gilad@benyossef.com> References: <1513090395-7938-1-git-send-email-gilad@benyossef.com> Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org Fix function call parameter indentation according to coding style guide lines. Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/ssi_buffer_mgr.c | 28 +++++++++++----------------- drivers/staging/ccree/ssi_hash.c | 10 ++++------ 2 files changed, 15 insertions(+), 23 deletions(-) -- 2.7.4 diff --git a/drivers/staging/ccree/ssi_buffer_mgr.c b/drivers/staging/ccree/ssi_buffer_mgr.c index 490dd5a..4ab76dc 100644 --- a/drivers/staging/ccree/ssi_buffer_mgr.c +++ b/drivers/staging/ccree/ssi_buffer_mgr.c @@ -239,9 +239,9 @@ static int cc_generate_mlli(struct device *dev, struct buffer_array *sg_data, dev_dbg(dev, "NUM of SG's = %d\n", sg_data->num_of_buffers); /* Allocate memory from the pointed pool */ - mlli_params->mlli_virt_addr = dma_pool_alloc( - mlli_params->curr_pool, GFP_KERNEL, - &mlli_params->mlli_dma_addr); + mlli_params->mlli_virt_addr = + dma_pool_alloc(mlli_params->curr_pool, GFP_KERNEL, + &mlli_params->mlli_dma_addr); if (!mlli_params->mlli_virt_addr) { dev_err(dev, "dma_pool_alloc() failed\n"); rc = -ENOMEM; @@ -881,27 +881,21 @@ static void cc_prepare_aead_data_dlli(struct aead_request *req, areq_ctx->is_icv_fragmented = false; if (req->src == req->dst) { /*INPLACE*/ - areq_ctx->icv_dma_addr = sg_dma_address( - areq_ctx->src_sgl) + + areq_ctx->icv_dma_addr = sg_dma_address(areq_ctx->src_sgl) + (*src_last_bytes - authsize); - areq_ctx->icv_virt_addr = sg_virt( - areq_ctx->src_sgl) + + areq_ctx->icv_virt_addr = sg_virt(areq_ctx->src_sgl) + (*src_last_bytes - authsize); } else if (direct == DRV_CRYPTO_DIRECTION_DECRYPT) { /*NON-INPLACE and DECRYPT*/ - areq_ctx->icv_dma_addr = sg_dma_address( - areq_ctx->src_sgl) + + areq_ctx->icv_dma_addr = sg_dma_address(areq_ctx->src_sgl) + (*src_last_bytes - authsize); - areq_ctx->icv_virt_addr = sg_virt( - areq_ctx->src_sgl) + + areq_ctx->icv_virt_addr = sg_virt(areq_ctx->src_sgl) + (*src_last_bytes - authsize); } else { /*NON-INPLACE and ENCRYPT*/ - areq_ctx->icv_dma_addr = sg_dma_address( - areq_ctx->dst_sgl) + + areq_ctx->icv_dma_addr = sg_dma_address(areq_ctx->dst_sgl) + (*dst_last_bytes - authsize); - areq_ctx->icv_virt_addr = sg_virt( - areq_ctx->dst_sgl) + + areq_ctx->icv_virt_addr = sg_virt(areq_ctx->dst_sgl) + (*dst_last_bytes - authsize); } } @@ -1660,8 +1654,8 @@ int cc_buffer_mgr_init(struct ssi_drvdata *drvdata) drvdata->buff_mgr_handle = buff_mgr_handle; - buff_mgr_handle->mlli_buffs_pool = dma_pool_create( - "dx_single_mlli_tables", dev, + buff_mgr_handle->mlli_buffs_pool = + dma_pool_create("dx_single_mlli_tables", dev, MAX_NUM_OF_TOTAL_MLLI_ENTRIES * LLI_ENTRY_BYTE_SIZE, MLLI_TABLE_MIN_ALIGNMENT, 0); diff --git a/drivers/staging/ccree/ssi_hash.c b/drivers/staging/ccree/ssi_hash.c index a80279e..29c17f3 100644 --- a/drivers/staging/ccree/ssi_hash.c +++ b/drivers/staging/ccree/ssi_hash.c @@ -951,9 +951,8 @@ static int cc_hash_setkey(struct crypto_ahash *ahash, const u8 *key, ctx->is_hmac = true; if (keylen) { - ctx->key_params.key_dma_addr = dma_map_single( - dev, (void *)key, - keylen, DMA_TO_DEVICE); + ctx->key_params.key_dma_addr = + dma_map_single(dev, (void *)key, keylen, DMA_TO_DEVICE); if (dma_mapping_error(dev, ctx->key_params.key_dma_addr)) { dev_err(dev, "Mapping key va=0x%p len=%u for DMA failed\n", key, keylen); @@ -1132,9 +1131,8 @@ static int cc_xcbc_setkey(struct crypto_ahash *ahash, ctx->key_params.keylen = keylen; - ctx->key_params.key_dma_addr = dma_map_single( - dev, (void *)key, - keylen, DMA_TO_DEVICE); + ctx->key_params.key_dma_addr = + dma_map_single(dev, (void *)key, keylen, DMA_TO_DEVICE); if (dma_mapping_error(dev, ctx->key_params.key_dma_addr)) { dev_err(dev, "Mapping key va=0x%p len=%u for DMA failed\n", key, keylen);