From patchwork Sun Sep 20 18:37:12 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Corentin Labbe X-Patchwork-Id: 252985 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C071DC43463 for ; Sun, 20 Sep 2020 18:37:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8AEBA20897 for ; Sun, 20 Sep 2020 18:37:46 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=baylibre-com.20150623.gappssmtp.com header.i=@baylibre-com.20150623.gappssmtp.com header.b="pT0FFND6" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726384AbgITShc (ORCPT ); Sun, 20 Sep 2020 14:37:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56010 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726055AbgITSh1 (ORCPT ); Sun, 20 Sep 2020 14:37:27 -0400 Received: from mail-wm1-x343.google.com (mail-wm1-x343.google.com [IPv6:2a00:1450:4864:20::343]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 86704C061755 for ; Sun, 20 Sep 2020 11:37:26 -0700 (PDT) Received: by mail-wm1-x343.google.com with SMTP id d4so10005461wmd.5 for ; Sun, 20 Sep 2020 11:37:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=jTdlzUzyc1hcRCjE509a2kDcbNHBKMDXHMkrLBJjCcg=; b=pT0FFND6nkoHYyotdgwU1JAtZKe+QpWMkWB0/vahBAzG/8Ld4jH7LOF+KhWyjcj83t 5Sx1nwXbpU0PNjl2Y003G0PYjPMwRiIqD5CYsm3Z0nBKnZ52AW5B3f5Hhj8p7itelMfp fvBatPUhYCOePXCZd1QIH91PiEHEvt+VDnDRsjG3ZauxunjMmzsJ+bmE99QNcPDxN6rS mKT67ZLBJo3J9fkL813BBeFdlQUanY2I2v07DKoQLz8k78j1GXzlghb79gZU2bah7KKg 4p4K2uuaQccbL2gIHbH3zwiC8/XjHX0tiV71d3nbLb9AJadcKfPh7hAuDZKn0Mj0E89F Hdqg== 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; bh=jTdlzUzyc1hcRCjE509a2kDcbNHBKMDXHMkrLBJjCcg=; b=hO0nNSa2qNfRo8tfes7hPS5+BB0TdGysA09xMc3TIZeB5OlAElf2qgjQOkDGqYRQU8 MsayZ7pEx4BcgX0/eTAkHA7vb1b5gqrlknBm16EWut3mCDg4tnrGvckP6Ai6HtSYIuNm dEnvSTyyfq858IALgtagmgj6tQDoZdX+2OhF6mSHt/bKwycTVXG0rlCTICQvFmwlLW/U hnI0J+zB7kl1O4EjJQCniqfJfaVDq/QRrTi0o+yqRSlKKJXZVWA3I0tEvNxBO8qtZmC2 LXxmlPtzc8zhqz3td76tT2wvGv7CdQS1c1yRXGWgiVqA37CXvakn4IiV0/YPFhbHICb2 6kMw== X-Gm-Message-State: AOAM531Bd4+e4C+MIuC0uIsGrAc9Ec5DSgKnTOWFAicoBXzJe4NnZK5a cXutKAUSNubTt/AlbxLQmNQJ5Q== X-Google-Smtp-Source: ABdhPJznL0wnKPFRx+ll8rXF6fFCp51XOjtzRgf3arfEI4ScF5bVizdGKfVQJuxQR3n2Q1QXlekbrg== X-Received: by 2002:a05:600c:414b:: with SMTP id h11mr26441143wmm.20.1600627045206; Sun, 20 Sep 2020 11:37:25 -0700 (PDT) Received: from localhost.localdomain ([51.15.160.169]) by smtp.googlemail.com with ESMTPSA id e18sm16419841wrx.50.2020.09.20.11.37.24 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 20 Sep 2020 11:37:24 -0700 (PDT) From: Corentin Labbe To: arnd@arndb.de, davem@davemloft.net, herbert@gondor.apana.org.au, mripard@kernel.org, wens@csie.org Cc: linux-arm-kernel@lists.infradead.org, linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com, Corentin Labbe Subject: [PATCH v2 1/7] crypto: sun4i-ss: linearize buffers content must be kept Date: Sun, 20 Sep 2020 18:37:12 +0000 Message-Id: <1600627038-40000-2-git-send-email-clabbe@baylibre.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1600627038-40000-1-git-send-email-clabbe@baylibre.com> References: <1600627038-40000-1-git-send-email-clabbe@baylibre.com> Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org When running the non-optimized cipher function, SS produce partial random output. This is due to linearize buffers being reseted after each loop. Fixes: 8d3bcb9900ca ("crypto: sun4i-ss - reduce stack usage") Signed-off-by: Corentin Labbe --- drivers/crypto/allwinner/sun4i-ss/sun4i-ss-cipher.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/crypto/allwinner/sun4i-ss/sun4i-ss-cipher.c b/drivers/crypto/allwinner/sun4i-ss/sun4i-ss-cipher.c index b72de8939497..b92d175b5d2a 100644 --- a/drivers/crypto/allwinner/sun4i-ss/sun4i-ss-cipher.c +++ b/drivers/crypto/allwinner/sun4i-ss/sun4i-ss-cipher.c @@ -163,6 +163,8 @@ static int sun4i_ss_cipher_poll(struct skcipher_request *areq) unsigned int todo; struct sg_mapping_iter mi, mo; unsigned int oi, oo; /* offset for in and out */ + char buf[4 * SS_RX_MAX];/* buffer for linearize SG src */ + char bufo[4 * SS_TX_MAX]; /* buffer for linearize SG dst */ unsigned int ob = 0; /* offset in buf */ unsigned int obo = 0; /* offset in bufo*/ unsigned int obl = 0; /* length of data in bufo */ @@ -233,8 +235,6 @@ static int sun4i_ss_cipher_poll(struct skcipher_request *areq) while (oleft) { if (ileft) { - char buf[4 * SS_RX_MAX];/* buffer for linearize SG src */ - /* * todo is the number of consecutive 4byte word that we * can read from current SG @@ -295,8 +295,6 @@ static int sun4i_ss_cipher_poll(struct skcipher_request *areq) oo = 0; } } else { - char bufo[4 * SS_TX_MAX]; /* buffer for linearize SG dst */ - /* * read obl bytes in bufo, we read at maximum for * emptying the device From patchwork Sun Sep 20 18:37:15 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Corentin Labbe X-Patchwork-Id: 252984 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 19A17C43465 for ; Sun, 20 Sep 2020 18:37:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D65752158C for ; Sun, 20 Sep 2020 18:37:54 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=baylibre-com.20150623.gappssmtp.com header.i=@baylibre-com.20150623.gappssmtp.com header.b="cxfwt+vj" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726342AbgITShs (ORCPT ); Sun, 20 Sep 2020 14:37:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56042 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726353AbgITShc (ORCPT ); Sun, 20 Sep 2020 14:37:32 -0400 Received: from mail-wm1-x343.google.com (mail-wm1-x343.google.com [IPv6:2a00:1450:4864:20::343]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9AE6FC0613D7 for ; Sun, 20 Sep 2020 11:37:29 -0700 (PDT) Received: by mail-wm1-x343.google.com with SMTP id l15so10178051wmh.1 for ; Sun, 20 Sep 2020 11:37:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Gd2hvr/SAKzjKtmSl3X2mEioPmDAlGeI7zVBmc2l4K8=; b=cxfwt+vj0IMFYW+JQ/I7RatzPtFw1+jGLORAJybIyLwiBbd8P6wU5H00s9S1g4XMCY UtVX46Nx5geEh0rX6GT/R1NqCO0wAXNvq3PTMp5xIYww5KxBWgMxCm08fYTjWz8EDRly ORI6B+JW2+/ifJ9LxD6u6F21uUfuTr3CMQTPHbky+JTF7baBn+u9aYHI31U0DUYBtoPK Gku7/dytrVz3juRK5t7OQNxRwpCr840JqSDM2TwYFdt0VxmmGUHG41RSjfnRWNaCOPDB T0dou1BYOe5x7NuYgGSLZ8uaOHyw0lvLaQmG7zhUGOm7By0kKCa6jx/62Q5Gu59Csz3q Mhag== 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; bh=Gd2hvr/SAKzjKtmSl3X2mEioPmDAlGeI7zVBmc2l4K8=; b=V2nlRA7TFhKSzjwuXpM4EPnHmD6VDesqO8FpFdMt6xoUq1pAbq/x3eS1Ezdnm2TWz6 XEJDzLbaPvPeDOS/2vNiLdGHj2EUWjXo7AFEyFKiZ19OxJnu2kesnmO37u5BcRhruDG3 KpgnLOXKC13luuOLc2kELa9Tg6D7nF49JfV8ZCcErL+1B8z1Lssgc/cFO3fGAMYDohR4 Dp6SB05bXX+vx+nkg+0NJ1Qth+kvGwImUfnniS1atNz5Ba9qOyqFFnURXTClaDIQ3jg0 m2ubOinkoTgTv2DidJACo3qVe+2xiFyUYuQmE9dNK/4osXPpGkt5LjWTAiNSNsA4vH8v bdhg== X-Gm-Message-State: AOAM533tqNPwwBxY+k8F1cX1Je8sESgJOjJnjMGxhqXSlODuCpkq1+n8 ynYVCsoPM5obOVpfzdahVDvtHg== X-Google-Smtp-Source: ABdhPJxFgf7fh7vgfuCj7uPWgYnoR/9rCAgoeOSkNbbVfdIgvzC4Qjnot2R01IIEr2PfqXC84D6//w== X-Received: by 2002:a1c:f208:: with SMTP id s8mr27172664wmc.85.1600627048332; Sun, 20 Sep 2020 11:37:28 -0700 (PDT) Received: from localhost.localdomain ([51.15.160.169]) by smtp.googlemail.com with ESMTPSA id e18sm16419841wrx.50.2020.09.20.11.37.27 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 20 Sep 2020 11:37:27 -0700 (PDT) From: Corentin Labbe To: arnd@arndb.de, davem@davemloft.net, herbert@gondor.apana.org.au, mripard@kernel.org, wens@csie.org Cc: linux-arm-kernel@lists.infradead.org, linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com, Corentin Labbe , stable@vger.kernel.org Subject: [PATCH v2 4/7] crypto: sun4i-ss: handle BigEndian for cipher Date: Sun, 20 Sep 2020 18:37:15 +0000 Message-Id: <1600627038-40000-5-git-send-email-clabbe@baylibre.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1600627038-40000-1-git-send-email-clabbe@baylibre.com> References: <1600627038-40000-1-git-send-email-clabbe@baylibre.com> Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org Ciphers produce invalid results on BE. Key and IV need to be written in LE. Fixes: 6298e948215f2 ("crypto: sunxi-ss - Add Allwinner Security System crypto accelerator") Cc: Signed-off-by: Corentin Labbe --- drivers/crypto/allwinner/sun4i-ss/sun4i-ss-cipher.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/crypto/allwinner/sun4i-ss/sun4i-ss-cipher.c b/drivers/crypto/allwinner/sun4i-ss/sun4i-ss-cipher.c index c6c25204780d..a05889745097 100644 --- a/drivers/crypto/allwinner/sun4i-ss/sun4i-ss-cipher.c +++ b/drivers/crypto/allwinner/sun4i-ss/sun4i-ss-cipher.c @@ -52,13 +52,13 @@ static int noinline_for_stack sun4i_ss_opti_poll(struct skcipher_request *areq) spin_lock_irqsave(&ss->slock, flags); - for (i = 0; i < op->keylen; i += 4) - writel(*(op->key + i / 4), ss->base + SS_KEY0 + i); + for (i = 0; i < op->keylen / 4; i++) + writel(cpu_to_le32(op->key[i]), ss->base + SS_KEY0 + i * 4); if (areq->iv) { for (i = 0; i < 4 && i < ivsize / 4; i++) { v = *(u32 *)(areq->iv + i * 4); - writel(v, ss->base + SS_IV0 + i * 4); + writel(cpu_to_le32(v), ss->base + SS_IV0 + i * 4); } } writel(mode, ss->base + SS_CTL); @@ -225,13 +225,13 @@ static int sun4i_ss_cipher_poll(struct skcipher_request *areq) spin_lock_irqsave(&ss->slock, flags); - for (i = 0; i < op->keylen; i += 4) - writel(*(op->key + i / 4), ss->base + SS_KEY0 + i); + for (i = 0; i < op->keylen / 4; i++) + writel(cpu_to_le32(op->key[i]), ss->base + SS_KEY0 + i * 4); if (areq->iv) { for (i = 0; i < 4 && i < ivsize / 4; i++) { v = *(u32 *)(areq->iv + i * 4); - writel(v, ss->base + SS_IV0 + i * 4); + writel(cpu_to_le32(v), ss->base + SS_IV0 + i * 4); } } writel(mode, ss->base + SS_CTL); From patchwork Sun Sep 20 18:37:18 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Corentin Labbe X-Patchwork-Id: 252986 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 947B9C43465 for ; Sun, 20 Sep 2020 18:37:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 53286207BB for ; Sun, 20 Sep 2020 18:37:44 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=baylibre-com.20150623.gappssmtp.com header.i=@baylibre-com.20150623.gappssmtp.com header.b="kqyC244Z" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726221AbgITShn (ORCPT ); Sun, 20 Sep 2020 14:37:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56054 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726326AbgITShd (ORCPT ); Sun, 20 Sep 2020 14:37:33 -0400 Received: from mail-wm1-x32d.google.com (mail-wm1-x32d.google.com [IPv6:2a00:1450:4864:20::32d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E009CC061755 for ; Sun, 20 Sep 2020 11:37:32 -0700 (PDT) Received: by mail-wm1-x32d.google.com with SMTP id z9so10367499wmk.1 for ; Sun, 20 Sep 2020 11:37:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=ak5yUn/HwPwh2LarMLINzwpMFmwyFpMzNUg8yxcj+9E=; b=kqyC244ZUrr+OGvHrenlLr4NXJg0ICZFMRPzTVeKpgjPv3CwO0vDfsOqTHrf4/EOei mIMKqiJd5yVxd9TQzQ7IRQk8jI8yyBm3X+ryl82MxHKNLCuRxtc9OcelqfLrOGVLzGWG Jp0ta8tk8EYeFjCM3ToAFqxvHV20SZerE5CYbUZQIL3Ga8uwHjMSYdZmiqXAcFNuzeiq ON4H2d7wBoxixhIGpd59wZXq4nURMeaPp9ngqFvxLVMMyPb6p4+cLz8NKRvWfkaW9g7H C/Tm1UpwDuU9rbTyR6+ul5V/TnKmsw/kBtutElXRiqgk91oXuI3InCse7yLPrEZzJ+Cy z5XA== 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; bh=ak5yUn/HwPwh2LarMLINzwpMFmwyFpMzNUg8yxcj+9E=; b=O+dqNkWeDR05PyokdBq+HXCxInxxXOBCxbKz/ImrbXLnOwXZjqh+AlD6c6Bbd21MNT jSjW9z/f/KnrlcxX+w2ScRngb+uzR2G+31Azk7jNkgCu2HtZsAPV1MNmEgKUaeem7V1x he8RfNzdYDDzwJJLVjxG0c5Lcy+Q1pHv3CwYOXCgv5qhXAgtdovuC6LhJz7DTKZnKF7+ v5P0zerYJOrOo1Ce12AZonfpzotGgxLx7nAlJRi867L+uavX3JC0VFY9R3HSaeTE0jK2 kdC44yuQQ09mUuIAU8m1GSeXmdw3o7flD8Wzr5RRQwBN6pmMOaLJy8+yugb1cwLHsABp RyMw== X-Gm-Message-State: AOAM5300mxPWN9MLgFKwZLcuiN4h+absbtE8CEWdKQZnoy0Si3i9eIc7 5xZl1o+ag3ECQoIj9gt4bBCZxQ== X-Google-Smtp-Source: ABdhPJxygsyfg5yVhWw6vSFMg8ycLN6WBvpVpQT8imbOMME8fIFWZPFMYhYGBdqb/exUcPjfaZQcig== X-Received: by 2002:a1c:3d44:: with SMTP id k65mr25521614wma.132.1600627051042; Sun, 20 Sep 2020 11:37:31 -0700 (PDT) Received: from localhost.localdomain ([51.15.160.169]) by smtp.googlemail.com with ESMTPSA id e18sm16419841wrx.50.2020.09.20.11.37.30 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 20 Sep 2020 11:37:30 -0700 (PDT) From: Corentin Labbe To: arnd@arndb.de, davem@davemloft.net, herbert@gondor.apana.org.au, mripard@kernel.org, wens@csie.org Cc: linux-arm-kernel@lists.infradead.org, linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com, Corentin Labbe Subject: [PATCH v2 7/7] crypto: sun4i-ss: add SPDX header and remove blank lines Date: Sun, 20 Sep 2020 18:37:18 +0000 Message-Id: <1600627038-40000-8-git-send-email-clabbe@baylibre.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1600627038-40000-1-git-send-email-clabbe@baylibre.com> References: <1600627038-40000-1-git-send-email-clabbe@baylibre.com> Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org This patchs fixes some remaining style issue. Signed-off-by: Corentin Labbe --- drivers/crypto/allwinner/sun4i-ss/sun4i-ss-cipher.c | 3 --- drivers/crypto/allwinner/sun4i-ss/sun4i-ss-prng.c | 1 + 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/crypto/allwinner/sun4i-ss/sun4i-ss-cipher.c b/drivers/crypto/allwinner/sun4i-ss/sun4i-ss-cipher.c index 2ec359eaa4cf..3f19c00f1b0b 100644 --- a/drivers/crypto/allwinner/sun4i-ss/sun4i-ss-cipher.c +++ b/drivers/crypto/allwinner/sun4i-ss/sun4i-ss-cipher.c @@ -137,7 +137,6 @@ static int noinline_for_stack sun4i_ss_opti_poll(struct skcipher_request *areq) return err; } - static int noinline_for_stack sun4i_ss_cipher_poll_fallback(struct skcipher_request *areq) { struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(areq); @@ -544,7 +543,6 @@ int sun4i_ss_cipher_init(struct crypto_tfm *tfm) sizeof(struct sun4i_cipher_req_ctx) + crypto_skcipher_reqsize(op->fallback_tfm)); - err = pm_runtime_get_sync(op->ss->dev); if (err < 0) goto error_pm; @@ -631,5 +629,4 @@ int sun4i_ss_des3_setkey(struct crypto_skcipher *tfm, const u8 *key, crypto_skcipher_set_flags(op->fallback_tfm, tfm->base.crt_flags & CRYPTO_TFM_REQ_MASK); return crypto_skcipher_setkey(op->fallback_tfm, key, keylen); - } diff --git a/drivers/crypto/allwinner/sun4i-ss/sun4i-ss-prng.c b/drivers/crypto/allwinner/sun4i-ss/sun4i-ss-prng.c index 102f8a90ce0f..4d1610952e90 100644 --- a/drivers/crypto/allwinner/sun4i-ss/sun4i-ss-prng.c +++ b/drivers/crypto/allwinner/sun4i-ss/sun4i-ss-prng.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0-or-later #include "sun4i-ss.h" int sun4i_ss_prng_seed(struct crypto_rng *tfm, const u8 *seed,