From patchwork Mon May 30 13:32:02 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Corentin Labbe X-Patchwork-Id: 9141441 X-Patchwork-Delegate: herbert@gondor.apana.org.au Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 2419A60801 for ; Mon, 30 May 2016 13:32:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1914827D17 for ; Mon, 30 May 2016 13:32:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0DCF12821F; Mon, 30 May 2016 13:32:34 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A44B527D17 for ; Mon, 30 May 2016 13:32:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933296AbcE3Nc3 (ORCPT ); Mon, 30 May 2016 09:32:29 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:36164 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933074AbcE3Nc1 (ORCPT ); Mon, 30 May 2016 09:32:27 -0400 Received: by mail-wm0-f65.google.com with SMTP id q62so22805591wmg.3; Mon, 30 May 2016 06:32:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=YR/q50jMvBfmTjKNIybvDYiEvHPM4XTLGcMaCbzGoUg=; b=pAFlL/wbw/hT6gAzx2ga9onk8XShVGf9d5ThPX97SS1KohvDanMN8vkmOJX8XJlHc8 Dvu6SBjlmBdSxDfpEdnqnb3XG0DqV+KaDLnk1v0mKUPQj3cWIQxaESZ7JZ0DAC70VJk7 YS5YhtoglgP5Cv/2xORVH1xjwblTnDZlEpG08MMpBhEeSGc8ERHHOnmk69uoEG2Xpami 9i14QR+7E8CQ9OnuRs5k3h13enoP+WTm9trfkuGivEUuckZKjToHXd0kWij1etsWQmwP HRAShFYCGM3uMecoShYGnFyq/ID5TwZuL4iUcWEkZt3jsG9edplLUSli80FUl3HsXHQa n0yw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=YR/q50jMvBfmTjKNIybvDYiEvHPM4XTLGcMaCbzGoUg=; b=Vo3k7Xb+5AJFvN90RWIsmft/WeEDvhlJzL9XaVn/BuMUSkhbuZqoOqhxSy49StAV8K qehYe3+davLl/QCM95y9rF3XmQOS/mhIqYgFWJQkbJ2ZxTYgFVOEEU79x5sYPci890GQ BPw97QnbyVVYA0uFIbLvnLA/3DtxTIisJ2Ym/Vf+8xA0i5dV1STIQMDP4wFmVUezxqCB 7N90VGq0+A2yJLY8FDwAPo0KEpbO5ktBlzouc+kTk2WRfe4w5YuI9D5BjUr5IbDdPfdW uDlOlS7BsLwWZgtefNaP8Tw+8V0Z2dF4qbZXOvAd6qugm13k6/0KBwKX7G7ASECjSzCn 2diQ== X-Gm-Message-State: ALyK8tLKdI7QiL5/qMkq/hQZdfwAuyDumXkZ0sjbmYEbyPTgUXg7mt4/k8mM0Vljqj1QWw== X-Received: by 10.28.35.194 with SMTP id j185mr10376870wmj.17.1464615146093; Mon, 30 May 2016 06:32:26 -0700 (PDT) Received: from Red.local (ANice-651-1-275-203.w86-193.abo.wanadoo.fr. [86.193.135.203]) by smtp.googlemail.com with ESMTPSA id b201sm20669178wmb.9.2016.05.30.06.32.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 30 May 2016 06:32:25 -0700 (PDT) From: LABBE Corentin To: herbert@gondor.apana.org.au, davem@davemloft.net, baolin.wang@linaro.org Cc: linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, LABBE Corentin Subject: [PATCH v2 2/2] crypto: omap: convert to the new cryptoengine API Date: Mon, 30 May 2016 15:32:02 +0200 Message-Id: <1464615122-16685-3-git-send-email-clabbe.montjoie@gmail.com> X-Mailer: git-send-email 2.7.3 In-Reply-To: <1464615122-16685-1-git-send-email-clabbe.montjoie@gmail.com> References: <1464615122-16685-1-git-send-email-clabbe.montjoie@gmail.com> Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Since the crypto engine has been converted to use crypto_async_request instead of ablkcipher_request, minor changes are needed to use it. Signed-off-by: LABBE Corentin Reviewed-by: Baolin Wang --- drivers/crypto/omap-aes.c | 10 ++++++---- drivers/crypto/omap-des.c | 10 ++++++---- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/drivers/crypto/omap-aes.c b/drivers/crypto/omap-aes.c index ce174d3..7007f13 100644 --- a/drivers/crypto/omap-aes.c +++ b/drivers/crypto/omap-aes.c @@ -519,7 +519,7 @@ static void omap_aes_finish_req(struct omap_aes_dev *dd, int err) pr_debug("err: %d\n", err); - crypto_finalize_request(dd->engine, req, err); + crypto_finalize_request(dd->engine, &req->base, err); } static int omap_aes_crypt_dma_stop(struct omap_aes_dev *dd) @@ -592,14 +592,15 @@ static int omap_aes_handle_queue(struct omap_aes_dev *dd, struct ablkcipher_request *req) { if (req) - return crypto_transfer_request_to_engine(dd->engine, req); + return crypto_transfer_request_to_engine(dd->engine, &req->base); return 0; } static int omap_aes_prepare_req(struct crypto_engine *engine, - struct ablkcipher_request *req) + struct crypto_async_request *areq) { + struct ablkcipher_request *req = ablkcipher_request_cast(areq); struct omap_aes_ctx *ctx = crypto_ablkcipher_ctx( crypto_ablkcipher_reqtfm(req)); struct omap_aes_dev *dd = omap_aes_find_dev(ctx); @@ -642,8 +643,9 @@ static int omap_aes_prepare_req(struct crypto_engine *engine, } static int omap_aes_crypt_req(struct crypto_engine *engine, - struct ablkcipher_request *req) + struct crypto_async_request *areq) { + struct ablkcipher_request *req = ablkcipher_request_cast(areq); struct omap_aes_ctx *ctx = crypto_ablkcipher_ctx( crypto_ablkcipher_reqtfm(req)); struct omap_aes_dev *dd = omap_aes_find_dev(ctx); diff --git a/drivers/crypto/omap-des.c b/drivers/crypto/omap-des.c index 3eedb03..0da5686 100644 --- a/drivers/crypto/omap-des.c +++ b/drivers/crypto/omap-des.c @@ -506,7 +506,7 @@ static void omap_des_finish_req(struct omap_des_dev *dd, int err) pr_debug("err: %d\n", err); pm_runtime_put(dd->dev); - crypto_finalize_request(dd->engine, req, err); + crypto_finalize_request(dd->engine, &req->base, err); } static int omap_des_crypt_dma_stop(struct omap_des_dev *dd) @@ -572,14 +572,15 @@ static int omap_des_handle_queue(struct omap_des_dev *dd, struct ablkcipher_request *req) { if (req) - return crypto_transfer_request_to_engine(dd->engine, req); + return crypto_transfer_request_to_engine(dd->engine, &req->base); return 0; } static int omap_des_prepare_req(struct crypto_engine *engine, - struct ablkcipher_request *req) + struct crypto_async_request *areq) { + struct ablkcipher_request *req = ablkcipher_request_cast(areq); struct omap_des_ctx *ctx = crypto_ablkcipher_ctx( crypto_ablkcipher_reqtfm(req)); struct omap_des_dev *dd = omap_des_find_dev(ctx); @@ -620,8 +621,9 @@ static int omap_des_prepare_req(struct crypto_engine *engine, } static int omap_des_crypt_req(struct crypto_engine *engine, - struct ablkcipher_request *req) + struct crypto_async_request *areq) { + struct ablkcipher_request *req = ablkcipher_request_cast(areq); struct omap_des_ctx *ctx = crypto_ablkcipher_ctx( crypto_ablkcipher_reqtfm(req)); struct omap_des_dev *dd = omap_des_find_dev(ctx);