Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750892AbeAPQQt (ORCPT + 1 other); Tue, 16 Jan 2018 11:16:49 -0500 Received: from mailout1.w1.samsung.com ([210.118.77.11]:51226 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750817AbeAPQQq (ORCPT ); Tue, 16 Jan 2018 11:16:46 -0500 DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20180116161644euoutp01e5798014deff99d7b41f4fe5159c2fd8~KVpDQvQOc3171731717euoutp01- X-AuditID: cbfec7f4-f790c6d0000075d3-4e-5a5e256bb4dd To: Herbert Xu Cc: Marek Vasut , "David S. Miller" , Bartlomiej Zolnierkiewicz , linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org From: Kamil Konieczny Subject: [PATCH] crypto: mxs-dcp: Add empty hash export and import Message-id: <4f3389a1-d6aa-b3cc-2299-d638058ddd48@partner.samsung.com> Date: Tue, 16 Jan 2018 17:16:40 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-version: 1.0 Content-type: text/plain; charset="utf-8" Content-language: en-US Content-transfer-encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFupmleLIzCtJLcpLzFFi42LZduznOd1s1bgog2vHhC02zljPajHnfAuL RfcrGYv7934yWVzeNYfN4k1bI6MDm8eWlTeZPObNOsHise2AqkffllWMHp83yQWwRnHZpKTm ZJalFunbJXBlzD3wjLmghbuis7GbpYGxjbOLkZNDQsBEYkvrZRYIW0ziwr31bCC2kMBSRon9 y+u7GLmA7M+MEgd3TWeFaTg7eTETRNEyRomJWxkhip4xShx79wIsISKgI7Hy5WJWkASzwD5G iSuXn7CDJNgEzCUebT8DViQs4CRxaOMcZhCbV8BNYnPjBrAaFgFViVVtN8BOEhWIkOh6tosV okZQ4sfke2BxZgFNiRdfJkHZ4hLNrTehbHmJzWveMoM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JNl4uCUamDUMz9arb3Ab+WkY/EMJen7 uSQOcmnd23wrbSbPH6fXCvKXfKPrbi/6sYA769v2GW+3FwTLq03LNSk7lP3wyca/T9T610q8 47/wL/OAtWNVELP0lKPSN5ZKxGdeKWPTrJwfw/2Wa9rZZ30Tc90f731+XEJai/vW7CtnFqz+ eDBtz4rn63i8SnbdVGIpzkg01GIuKk4EAFRFUJ9lAgAA X-CMS-MailID: 20180116161641eucas1p1f776ccf0d08da2d3b670e5b2ad550ea6 X-Msg-Generator: CA CMS-TYPE: 201P X-CMS-RootMailID: 20180116161641eucas1p1f776ccf0d08da2d3b670e5b2ad550ea6 X-RootMTR: 20180116161641eucas1p1f776ccf0d08da2d3b670e5b2ad550ea6 References: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: Crypto framework will require async hash export/import, so add empty functions to prevent OOPS. Signed-off-by: Kamil Konieczny --- drivers/crypto/mxs-dcp.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/drivers/crypto/mxs-dcp.c b/drivers/crypto/mxs-dcp.c index 764be3e6933c..a10c418d4e5c 100644 --- a/drivers/crypto/mxs-dcp.c +++ b/drivers/crypto/mxs-dcp.c @@ -759,6 +759,16 @@ static int dcp_sha_digest(struct ahash_request *req) return dcp_sha_finup(req); } +static int dcp_sha_noimport(struct ahash_request *req, const void *in) +{ + return -ENOSYS; +} + +static int dcp_sha_noexport(struct ahash_request *req, void *out) +{ + return -ENOSYS; +} + static int dcp_sha_cra_init(struct crypto_tfm *tfm) { crypto_ahash_set_reqsize(__crypto_ahash_cast(tfm), @@ -829,6 +839,8 @@ static struct ahash_alg dcp_sha1_alg = { .final = dcp_sha_final, .finup = dcp_sha_finup, .digest = dcp_sha_digest, + .import = dcp_sha_noimport, + .export = dcp_sha_noexport, .halg = { .digestsize = SHA1_DIGEST_SIZE, .base = { @@ -853,6 +865,8 @@ static struct ahash_alg dcp_sha256_alg = { .final = dcp_sha_final, .finup = dcp_sha_finup, .digest = dcp_sha_digest, + .import = dcp_sha_noimport, + .export = dcp_sha_noexport, .halg = { .digestsize = SHA256_DIGEST_SIZE, .base = { -- 2.15.0