From patchwork Wed Jul 6 09:04:10 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Corentin LABBE X-Patchwork-Id: 12907730 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8AEBCC433EF for ; Wed, 6 Jul 2022 09:23:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=YiXVW53mxGI5QMA3TTiEndmD9GtNVKYRvgCDrb8W7iY=; b=QJGlvrM9HC86ia heObZBCkNdhfO1i5G9zRe0q1fsLKuM7+QxScwxgS/JBlqa675xgj1bPnOKQG3vHdXRECHDwM3yPgP rxBQukN6Rk+ETR9qFfAKYhpXgPvAgdUvT9WJY9S4sR6SaiHQZWWH6ADJ98DHP/rGJkh3wCxJSLBwW BTd4EZvQy1QUVTDEZiU3u2czeraf7XyCaXQN7J51yBT/BO9QT41aMxmYtYtM8DN08GDTchne93Q0p +mSo4wpaYX6OjDcNIdoBfG65eA6qoM3+mZLq3AxyaQhIJ2y7Y+YIi4X1v+ChhaWyOr3DmMUk3hNnf 7aUtaTdaoJa2SM1SrYSQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o91EZ-007jqR-Lx; Wed, 06 Jul 2022 09:22:11 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1o91EO-007jcM-HU for linux-arm-kernel@bombadil.infradead.org; Wed, 06 Jul 2022 09:22:00 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=/HcULCDUWUOb7zL9pkaT5teTJK7hgsOh6ToY9+UZMac=; b=Z3P43S915L5AcNJrNLtkMImT1o AaTPt8h9Ug1+HIm0vlpCfAb7DOHClgTCGFDD6mW2sfLMNRgqjAxN3w7oi3EA+2z2yprZL7lX816Vd pzGa0ElAY6mj/HiJOi5+Au5M6e6qZBGOgNS4ZigTbk1qm50jN5bBrV6xBqqR00hCBde6xuQYdn5Kt MLrkqAnZpRLjseWw866SDQx510yIPAa4SYW7e0KPhow23ymRHqUNmjmy/UzkaLppcFYWlpDG8Ux8+ 7F7shF6BrwkGl7MzqbR8U8ZP5yXnN/mL81JS7YpNLEUOYlmPVRDbMNcSL2rMrjrvS6pbGIklM4EvH h4+oPgUA==; Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]) by casper.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1o90yD-001MPL-UO for linux-arm-kernel@lists.infradead.org; Wed, 06 Jul 2022 09:05:23 +0000 Received: by mail-wr1-x42e.google.com with SMTP id f2so15688038wrr.6 for ; Wed, 06 Jul 2022 02:05:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=/HcULCDUWUOb7zL9pkaT5teTJK7hgsOh6ToY9+UZMac=; b=jzmrHnL6AP5JP5ynKqMYe5yX2tYmFdVE8TwhZFHgWJFWW0o1xKFCEzfUtnEChQnGm/ A6fQvxFRl2SJpiM4Zj/xug3hmVwSmyjac1QgUpHLeezzF65VvWPXm1axFpEEUOV6/Tvq FmFmnBGkQtH8EGsxTiOQ3zh9mBrKz/VYH64Ram1n1qoiNJN0DeG0dPQXrNtxp3U+wfWW e1NjKc352R2J8iC4t/8fmbX8ZkB6Zor6dVY+HZIwU2XX5wv7jTxP50GPf53rIHxA+20F 12t1xepnNyAfFnfApYwl21tsc0KoW0p5KIZ1vlvUXF4b+4tt44fifPg2WA5jVg9InUm5 TAyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=/HcULCDUWUOb7zL9pkaT5teTJK7hgsOh6ToY9+UZMac=; b=yyOyD3mrK8SjN67l4tLQXilhQxTZK5WRBYs+S+PKAC6h0fgwiN698UP5FLW+ta0+7R FZ/wg/JElKW1HvjvRCaE5LGhozyLmMu/EyijgrfETJMlfeEkVA+jf1ssKkjKSSX5P98V iZP0DrYNdCnZXUo6mMSA32bKIb35zPYmOVupfxodESbpfrXU1cXeTjoxnrYpl6v075wO DOM/wrWjeMkRaZZ9yNBzM31v7ZWqY2pK/TRGD7P+Ao+iNiX2U2K9ZPdiqahGXXVYU1Yy jDPxxUO+UWpc6WJLqfSQ6eOLk8wjjgHozmXjueEdiHrg94lSN5T2BrPrW4gvD6cXGJLo 2r1Q== X-Gm-Message-State: AJIora8ggIYZL8gF8omv7g2/UOOIiTEHciODdJDPfd7GNzMc/HErTGKA Z8/mMz8SQ1dPJwSn+D4nLyAf6g== X-Google-Smtp-Source: AGRyM1vRD4rRZCFfC8x4QQPMMOy8cjZ8voHj35W/8OT3F5k7JS0Li37UwyHkRVf/XoUVjf0EDwXrnw== X-Received: by 2002:adf:fb08:0:b0:21b:af81:2ffd with SMTP id c8-20020adffb08000000b0021baf812ffdmr36963912wrr.685.1657098305026; Wed, 06 Jul 2022 02:05:05 -0700 (PDT) Received: from localhost.localdomain (laubervilliers-658-1-213-31.w90-63.abo.wanadoo.fr. [90.63.244.31]) by smtp.googlemail.com with ESMTPSA id v11-20020adfe28b000000b0021d6ef34b2asm5230223wri.51.2022.07.06.02.05.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Jul 2022 02:05:04 -0700 (PDT) From: Corentin Labbe To: heiko@sntech.de, herbert@gondor.apana.org.au, krzysztof.kozlowski+dt@linaro.org, mturquette@baylibre.com, p.zabel@pengutronix.de, robh+dt@kernel.org, sboyd@kernel.org Cc: linux-rockchip@lists.infradead.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, john@metanate.com, didi.debian@cknow.org, Corentin Labbe Subject: [PATCH v8 31/33] crypto: rockchip: rk_ahash_reg_init use crypto_info from parameter Date: Wed, 6 Jul 2022 09:04:10 +0000 Message-Id: <20220706090412.806101-32-clabbe@baylibre.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220706090412.806101-1-clabbe@baylibre.com> References: <20220706090412.806101-1-clabbe@baylibre.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220706_100519_357617_9F553A4A X-CRM114-Status: UNSURE ( 9.81 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org rk_ahash_reg_init() use crypto_info from TFM context, since we will remove it, let's take if from parameters. Signed-off-by: Corentin Labbe --- drivers/crypto/rockchip/rk3288_crypto_ahash.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/crypto/rockchip/rk3288_crypto_ahash.c b/drivers/crypto/rockchip/rk3288_crypto_ahash.c index d1bf68cb390d..30f78256c955 100644 --- a/drivers/crypto/rockchip/rk3288_crypto_ahash.c +++ b/drivers/crypto/rockchip/rk3288_crypto_ahash.c @@ -78,12 +78,10 @@ static int zero_message_process(struct ahash_request *req) return 0; } -static void rk_ahash_reg_init(struct ahash_request *req) +static void rk_ahash_reg_init(struct ahash_request *req, + struct rk_crypto_info *dev) { struct rk_ahash_rctx *rctx = ahash_request_ctx(req); - struct crypto_ahash *tfm = crypto_ahash_reqtfm(req); - struct rk_ahash_ctx *tctx = crypto_ahash_ctx(tfm); - struct rk_crypto_info *dev = tctx->dev; int reg_status; reg_status = CRYPTO_READ(dev, RK_CRYPTO_CTRL) | @@ -281,7 +279,7 @@ static int rk_hash_run(struct crypto_engine *engine, void *breq) goto theend; } - rk_ahash_reg_init(areq); + rk_ahash_reg_init(areq, rkc); while (sg) { reinit_completion(&rkc->complete);