Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp3477377ybg; Fri, 25 Oct 2019 04:51:12 -0700 (PDT) X-Google-Smtp-Source: APXvYqznCMjpRjDxd8wYSHuuWag4ayFUdknclGlmqeUeZstN93ywGuUfEqA+AZSOuaE9qM6WZeyg X-Received: by 2002:a17:906:f252:: with SMTP id gy18mr3059256ejb.224.1572004272592; Fri, 25 Oct 2019 04:51:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572004272; cv=none; d=google.com; s=arc-20160816; b=ZWP4hawsaJEwEZiL7cTXbOQQIPCUMjdhMB5L/UeapxC0Kwuh+PN/hzAN88jBrcURv7 zst2dZCe3owUUaPuxUBt9BF1EaNEci5s2cU8BOh7KXhap0L5XVj1Fo+Fgxw52zkf+tFP gwF++2ezfJr1Ga246QG0K2c0bOmy5zwu3b0h08AEskujfbreEf+pvBsCSmvO628JWdMT 2Db4AkiNa3qaWa4setWjL/eS9jKqJWeeo60zaLl2WfZsz6zDks0BAhP0+pSbfpo437tf /y1XF1oyZ2SL3Zb4GF6tvoh0dfos/goUDeBSeTsOueqLy6w+1csQZJOSN9JuPUpb3tTO 27tQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=pIvf3uaGexOd3cBtkCmgOi+/J9vxhbC8kqb/606IHXY=; b=iQ/mp87Yr/yzbe4m+wSUSx4ghjOXz0PDSx+j3VMhRxDc2C8MulGFGSfVRPqbSnBbY7 4OXwBQrG8jwURt+uUYqOL4ZxZIPqjhjg7bwdG/slZqnB12ygzWI+BR7qogWdwF0Outlq aIn0L6sY2rtmjNZaKs+S6ePA+AKQtI7VmQIbEhb9PbGfHIAQ4ZYhPQdOzZDhIMFm+tUn hEKSF8CXw96Ap4uJsv288xdQJ2D382aUCOzeV5W/Ifl/+8nSI/2FHfeBBBAKQE2xxzdI FTs11JoHBzEhtzKvhGutt/epkHfdERTpdj8Wjtmmidm79LVhGofr9NU40i9UNhlJCq2z XsRQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=FhF56Pxn; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p14si1160336ejn.192.2019.10.25.04.50.48; Fri, 25 Oct 2019 04:51:12 -0700 (PDT) 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; dkim=pass header.i=@linaro.org header.s=google header.b=FhF56Pxn; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731935AbfJXNYe (ORCPT + 99 others); Thu, 24 Oct 2019 09:24:34 -0400 Received: from mail-wm1-f67.google.com ([209.85.128.67]:34395 "EHLO mail-wm1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2502434AbfJXNYe (ORCPT ); Thu, 24 Oct 2019 09:24:34 -0400 Received: by mail-wm1-f67.google.com with SMTP id v3so2001226wmh.1 for ; Thu, 24 Oct 2019 06:24:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=pIvf3uaGexOd3cBtkCmgOi+/J9vxhbC8kqb/606IHXY=; b=FhF56Pxn4X3XQVxawn/+Eu+hcpuuhw0C9uevsNl8pV9C/b0nSJu6BuMkHF23q4KPHP oTVaS7ramu0vMoIUrzbPGj99cz/+em3Y8RUF0OJZbHaGBAfjMWUX+jy7li206eJNLk0G l33a4FEzF1w6/MabcLmZJCRjvHdwKPtZPYwgNXB7fJ9JILxo9PdF8DgmmaSxRWnzeUIU DDvwe1/4A4kzlNv/eL5Dxe+zp0FfhFV8tO3KDrngcRbD/B38M29QCnmQV+NvbuX5kyRZ wV4saxxqa1dSh3MwQf7bUIMUcWYJyB8DTpnEotJajuraygBur7fdbEfCbL1L/MrqTWL3 r08w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=pIvf3uaGexOd3cBtkCmgOi+/J9vxhbC8kqb/606IHXY=; b=AMIn8GRHT+vSK2XMBF6VriGs2PQMUhBim8Q2V4c43309ZAOQCJe6PDJgd1bednZhMo W4kCmAG7j1CAUkIfw/FovQDCbR+1yGpMZ+OaDEPfRQxfdOUVNGKqDpHMH0kfpE5WVirT ETTkdQ1S5SXoev9hbcbmRPb6HA/c/lFffDGxNZ5dugBcDcHcg0U49PXW30ZUbtjJG3iA 9+g8Hqx5XL03eG24VOVSvXlXOXENrG2WUhhvjr4yKBml5+62t9AelaCMpUYJrThhd8s/ 1Q+ai5XN91lCFgYUx6xfWBCzAyukxTAiolRLruPVr43MxxJx2xyb91VNifgzPHObmPze mhNQ== X-Gm-Message-State: APjAAAWXea4WqspTR4fm6rrDS/7g1LVaext5cXum6HSoEdSfWq6DE0Er /Wq1CDajknzbx4K9iA3jojPewYHUJlSrf7WS X-Received: by 2002:a7b:c94f:: with SMTP id i15mr5107043wml.8.1571923470209; Thu, 24 Oct 2019 06:24:30 -0700 (PDT) Received: from localhost.localdomain (laubervilliers-657-1-83-120.w92-154.abo.wanadoo.fr. [92.154.90.120]) by smtp.gmail.com with ESMTPSA id e3sm2346310wme.36.2019.10.24.06.24.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 24 Oct 2019 06:24:29 -0700 (PDT) From: Ard Biesheuvel To: linux-crypto@vger.kernel.org Cc: Ard Biesheuvel , Herbert Xu , "David S. Miller" , Eric Biggers , linux-arm-kernel@lists.infradead.org Subject: [PATCH v2 26/27] crypto: marvell/cesa - rename blkcipher to skcipher Date: Thu, 24 Oct 2019 15:23:44 +0200 Message-Id: <20191024132345.5236-27-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191024132345.5236-1-ard.biesheuvel@linaro.org> References: <20191024132345.5236-1-ard.biesheuvel@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org The driver specific types contain some rudimentary references to the blkcipher API, which is deprecated and will be removed. To avoid confusion, rename these to skcipher. This is a cosmetic change only, as the code does not actually use the blkcipher API. Signed-off-by: Ard Biesheuvel --- drivers/crypto/marvell/cesa.h | 6 +++--- drivers/crypto/marvell/cipher.c | 14 +++++++------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/crypto/marvell/cesa.h b/drivers/crypto/marvell/cesa.h index d63a6ee905c9..f1ed3b85c0d2 100644 --- a/drivers/crypto/marvell/cesa.h +++ b/drivers/crypto/marvell/cesa.h @@ -232,13 +232,13 @@ struct mv_cesa_sec_accel_desc { }; /** - * struct mv_cesa_blkcipher_op_ctx - cipher operation context + * struct mv_cesa_skcipher_op_ctx - cipher operation context * @key: cipher key * @iv: cipher IV * * Context associated to a cipher operation. */ -struct mv_cesa_blkcipher_op_ctx { +struct mv_cesa_skcipher_op_ctx { u32 key[8]; u32 iv[4]; }; @@ -265,7 +265,7 @@ struct mv_cesa_hash_op_ctx { struct mv_cesa_op_ctx { struct mv_cesa_sec_accel_desc desc; union { - struct mv_cesa_blkcipher_op_ctx blkcipher; + struct mv_cesa_skcipher_op_ctx skcipher; struct mv_cesa_hash_op_ctx hash; } ctx; }; diff --git a/drivers/crypto/marvell/cipher.c b/drivers/crypto/marvell/cipher.c index 84ceddfee76b..d8e8c857770c 100644 --- a/drivers/crypto/marvell/cipher.c +++ b/drivers/crypto/marvell/cipher.c @@ -209,7 +209,7 @@ mv_cesa_skcipher_complete(struct crypto_async_request *req) struct mv_cesa_req *basereq; basereq = &creq->base; - memcpy(skreq->iv, basereq->chain.last->op->ctx.blkcipher.iv, + memcpy(skreq->iv, basereq->chain.last->op->ctx.skcipher.iv, ivsize); } else { memcpy_fromio(skreq->iv, @@ -470,7 +470,7 @@ static int mv_cesa_des_op(struct skcipher_request *req, mv_cesa_update_op_cfg(tmpl, CESA_SA_DESC_CFG_CRYPTM_DES, CESA_SA_DESC_CFG_CRYPTM_MSK); - memcpy(tmpl->ctx.blkcipher.key, ctx->key, DES_KEY_SIZE); + memcpy(tmpl->ctx.skcipher.key, ctx->key, DES_KEY_SIZE); return mv_cesa_skcipher_queue_req(req, tmpl); } @@ -523,7 +523,7 @@ static int mv_cesa_cbc_des_op(struct skcipher_request *req, mv_cesa_update_op_cfg(tmpl, CESA_SA_DESC_CFG_CRYPTCM_CBC, CESA_SA_DESC_CFG_CRYPTCM_MSK); - memcpy(tmpl->ctx.blkcipher.iv, req->iv, DES_BLOCK_SIZE); + memcpy(tmpl->ctx.skcipher.iv, req->iv, DES_BLOCK_SIZE); return mv_cesa_des_op(req, tmpl); } @@ -575,7 +575,7 @@ static int mv_cesa_des3_op(struct skcipher_request *req, mv_cesa_update_op_cfg(tmpl, CESA_SA_DESC_CFG_CRYPTM_3DES, CESA_SA_DESC_CFG_CRYPTM_MSK); - memcpy(tmpl->ctx.blkcipher.key, ctx->key, DES3_EDE_KEY_SIZE); + memcpy(tmpl->ctx.skcipher.key, ctx->key, DES3_EDE_KEY_SIZE); return mv_cesa_skcipher_queue_req(req, tmpl); } @@ -628,7 +628,7 @@ struct skcipher_alg mv_cesa_ecb_des3_ede_alg = { static int mv_cesa_cbc_des3_op(struct skcipher_request *req, struct mv_cesa_op_ctx *tmpl) { - memcpy(tmpl->ctx.blkcipher.iv, req->iv, DES3_EDE_BLOCK_SIZE); + memcpy(tmpl->ctx.skcipher.iv, req->iv, DES3_EDE_BLOCK_SIZE); return mv_cesa_des3_op(req, tmpl); } @@ -694,7 +694,7 @@ static int mv_cesa_aes_op(struct skcipher_request *req, key = ctx->aes.key_enc; for (i = 0; i < ctx->aes.key_length / sizeof(u32); i++) - tmpl->ctx.blkcipher.key[i] = cpu_to_le32(key[i]); + tmpl->ctx.skcipher.key[i] = cpu_to_le32(key[i]); if (ctx->aes.key_length == 24) cfg |= CESA_SA_DESC_CFG_AES_LEN_192; @@ -755,7 +755,7 @@ static int mv_cesa_cbc_aes_op(struct skcipher_request *req, { mv_cesa_update_op_cfg(tmpl, CESA_SA_DESC_CFG_CRYPTCM_CBC, CESA_SA_DESC_CFG_CRYPTCM_MSK); - memcpy(tmpl->ctx.blkcipher.iv, req->iv, AES_BLOCK_SIZE); + memcpy(tmpl->ctx.skcipher.iv, req->iv, AES_BLOCK_SIZE); return mv_cesa_aes_op(req, tmpl); } -- 2.20.1