Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751150AbeAPQSt (ORCPT + 1 other); Tue, 16 Jan 2018 11:18:49 -0500 Received: from mailout1.w1.samsung.com ([210.118.77.11]:51629 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750764AbeAPQSr (ORCPT ); Tue, 16 Jan 2018 11:18:47 -0500 DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20180116161845euoutp012e98cf2fbc3d699311371300e80350c8~KVq0R_sKY0046600466euoutp01K X-AuditID: cbfec7f5-f79d06d0000031c7-bd-5a5e25e41552 To: Herbert Xu Cc: "David S. Miller" , Bartlomiej Zolnierkiewicz , linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org From: Kamil Konieczny Subject: [PATCH] crypto: n2_core: Add empty hash export and import Message-id: Date: Tue, 16 Jan 2018 17:18:43 +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+NgFmpileLIzCtJLcpLzFFi42LZduzned0nqnFRBpePWVhsnLGe1WLO+RYW i+5XMhb37/1ksri8aw6bA6vHlpU3mTy2HVD16NuyitHj8ya5AJYoLpuU1JzMstQifbsEroz2 51OZCv5wVmx4tpC5gXEPRxcjJ4eEgInE9f61LBC2mMSFe+vZuhi5OIQEljJK3PjxBMr5zChx bcN7FpiOFXefQiWWMUpcXLCaEcJ5xijRsucwO0iViICOxMqXi1lBEswCCxklfvSfB0uwCZhL PNp+hgnEFhZwkljYfxlsLK+Am8Sdn7eAbA4OFgFViQPnUkDCogIREl3PdrFClAhK/Jh8D6yc WUBT4sWXSVC2uERz600oW15i85q3zCB7JQSWsEncm7uOHeJsF4n1uw6wQdjCEq+Ob4GKy0h0 dhxkgmjoZ5RYfuMUO4Qz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8qy777zgkWHRoj8rUAklZ8X2Jkax3W3TfuM39fdb27Ko4Ng05Q+VGcd2d Ub0vpkkpqixeNN+sWSDi19HKQw8/tc1bLnD/wKFo0R1lM75xd57NUC6wkJfR013eEeqoYZzV r1ytxFKckWioxVxUnAgA3qRGEVsCAAA= X-CMS-MailID: 20180116161844eucas1p27634e8860ca620b45224fa9efe491e2c X-Msg-Generator: CA CMS-TYPE: 201P X-CMS-RootMailID: 20180116161844eucas1p27634e8860ca620b45224fa9efe491e2c X-RootMTR: 20180116161844eucas1p27634e8860ca620b45224fa9efe491e2c 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/n2_core.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/drivers/crypto/n2_core.c b/drivers/crypto/n2_core.c index 662e709812cc..80e9c842aad4 100644 --- a/drivers/crypto/n2_core.c +++ b/drivers/crypto/n2_core.c @@ -359,6 +359,16 @@ static int n2_hash_async_finup(struct ahash_request *req) return crypto_ahash_finup(&rctx->fallback_req); } +static int n2_hash_async_noimport(struct ahash_request *req, const void *in) +{ + return -ENOSYS; +} + +static int n2_hash_async_noexport(struct ahash_request *req, void *out) +{ + return -ENOSYS; +} + static int n2_hash_cra_init(struct crypto_tfm *tfm) { const char *fallback_driver_name = crypto_tfm_alg_name(tfm); @@ -1467,6 +1477,8 @@ static int __n2_register_one_ahash(const struct n2_hash_tmpl *tmpl) ahash->final = n2_hash_async_final; ahash->finup = n2_hash_async_finup; ahash->digest = n2_hash_async_digest; + ahash->export = n2_hash_async_noexport; + ahash->import = n2_hash_async_noimport; halg = &ahash->halg; halg->digestsize = tmpl->digest_size; -- 2.15.0