Received: by 10.223.148.5 with SMTP id 5csp7877809wrq; Thu, 18 Jan 2018 10:36:28 -0800 (PST) X-Google-Smtp-Source: ACJfBovdDIGhJr0o0t70w0fU97jjX6nc1CzZ5dq/E/YkBXFJNrSJq5iWWYmxgCYpzYvVbLyzb2EI X-Received: by 10.99.103.69 with SMTP id b66mr13539721pgc.233.1516300588703; Thu, 18 Jan 2018 10:36:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516300588; cv=none; d=google.com; s=arc-20160816; b=YgjjUMLCbLliVSaPOPFffJhgo/BONdY4f3Gs1fH+O2JrX7riFsKEhgQRb1I/ZQ1Kb6 1KNWvOzcMa3sCqVQsZrVSoUebp8nbqkMES+YmI/PrYvs04eM8RP3ZItdRmn8uSWAYHsZ QMEU7ywc746IzC+PSF1CVT9vAjOQGf/h3KFWG0M84wUMD7Xm5Eh3wtu0J1y5AUObRdGb FGoas6a36cXAQQCpKbq4a5vbHrCpZ3UYTDcTU+4fQ567NrruxBgEo6QcvNcXucTOeEaq L/zUaekfHxV0G9uSKtLx5N/jXgJAjq757qWRqNgpupAmr5RU0XfbwUhq4OeA56+fW4Bd XlTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:cms-type:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature:dkim-filter :arc-authentication-results; bh=GgAlV3k1HgYqfWnry/WSEw0V0llsRkdLqi5ZlnSMW+Y=; b=xjunKtAMG0t7F//YWtthWUzp++GknicbSH0yZ+LNdxrx+Pmr5GXUDdkL7yEkpqNObO TvioiOeh60XD0RjxZHto1uvn5G7v/hYD2koUVmQpD9qD0ROKz8X9ZAzNE3SKtm7H/7u2 KBG3R0DWm9Po/HnQZ8XtW4x6GcKxXxBMbXsvXuJqo2yTIzL/VIQ+DmIaGMPqsZxc0y7h OLmjurRCpkXPIjsHOgTC1FuaIMnuF+jnSMfWdJWEX7gtrBVTQUnoZ1chKPrFO+LdNriI LWD1puwB712yVTqesReLnZHra6T/CSIOiGelm7q3T+AYm9E7NYv0fWBG0yO2zhdGYOQi zBeQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=NpPxOTJ6; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q127si6543436pgq.711.2018.01.18.10.36.15; Thu, 18 Jan 2018 10:36:28 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=NpPxOTJ6; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756002AbeARSfZ (ORCPT + 99 others); Thu, 18 Jan 2018 13:35:25 -0500 Received: from mailout1.w1.samsung.com ([210.118.77.11]:33233 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755823AbeARSep (ORCPT ); Thu, 18 Jan 2018 13:34:45 -0500 Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20180118183443euoutp01c6c33139391853262f4b5853ec35547d~K_0F3j0eq1230212302euoutp01f; Thu, 18 Jan 2018 18:34:43 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20180118183443euoutp01c6c33139391853262f4b5853ec35547d~K_0F3j0eq1230212302euoutp01f DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1516300483; bh=GgAlV3k1HgYqfWnry/WSEw0V0llsRkdLqi5ZlnSMW+Y=; h=From:To:Cc:Subject:Date:In-reply-to:References:From; b=NpPxOTJ6FEY0J7ss4Mp/BKzoUeu7pRhH3AI95n/leH0UjBf+IXf+24KTNBsN0Fkl9 /x3Gqh7tUrskapz7uxoxRdbZvvVang3kIob8posWuNweh1xBOo6LMyUg9WeWCxiLUm EqjBh/68BfURaQLbpt5QUt2n1O7YJR6/+eF0Knzs= Received: from eusmges3.samsung.com (unknown [203.254.199.242]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20180118183442eucas1p16e23863475b2134b402212e2a2f2067c~K_0E-BtXk1373713737eucas1p1H; Thu, 18 Jan 2018 18:34:42 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges3.samsung.com (EUCPMTA) with SMTP id D5.BC.12867.1C8E06A5; Thu, 18 Jan 2018 18:34:41 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20180118183441eucas1p2ee3f046a594945299ea7b75ffb13e2ca~K_0EQT9c60763107631eucas1p2F; Thu, 18 Jan 2018 18:34:41 +0000 (GMT) X-AuditID: cbfec7f2-f793b6d000003243-dc-5a60e8c1432c Received: from eusync1.samsung.com ( [203.254.199.211]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id F3.61.20118.1C8E06A5; Thu, 18 Jan 2018 18:34:41 +0000 (GMT) Received: from AMDC3218.DIGITAL.local ([106.120.51.18]) by eusync1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0P2R00FS4KXJWN40@eusync1.samsung.com>; Thu, 18 Jan 2018 18:34:41 +0000 (GMT) From: Kamil Konieczny To: linux-crypto@vger.kernel.org Cc: Kamil Konieczny , "David S. Miller" , Bartlomiej Zolnierkiewicz , Marek Vasut , Sonic Zhang , Fabio Estevam , Shawn Guo , Tom Lendacky , Jan Engelhardt , Arvind Yadav , Linus Walleij , Joakim Bech , linux-kernel@vger.kernel.org, Herbert Xu Subject: [PATCH 5/5] crypto: ahash.c: Require export/import in ahash Date: Thu, 18 Jan 2018 19:34:04 +0100 Message-id: <20180118183404.12583-6-k.konieczny@partner.samsung.com> X-Mailer: git-send-email 2.15.0 In-reply-to: <20180118183404.12583-1-k.konieczny@partner.samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmphleLIzCtJLcpLzFFi42LZduzned2DLxKiDLp3mVlc613IbLFxxnpW iznnW1gsZnXpWnS/krFoevmWyeLzqqcsFn37/jNaTPmznMni/r2fTBaXd81hs3jT1sho8XTd EmaLO1ub2SyOTNnH6sDv0XrpL5vHq6uOHltW3mTymDfrBIvHv8P9TB47Z91l99h2QNVj47Pn LB53ru1h8zj4bg+TR9+WVYwenzfJBfBEcdmkpOZklqUW6dslcGU8vydaMIG3ommGUAPjc64u Rk4OCQETiTM/JrJB2GISF+6tB7OFBJYySjS1hHYxcgHZnxklfh+dyQLTMOPcDyaIxDJGiYnP utkhnP+MErtPXWQCqWITMJd4tP0MkM3BISKgIDHvqw5IDbPAARaJA2d2sILUCAu4SPQeawez WQRUJVZOfQq2gRco3ve2iR1im7zE4u87wU7iFHCVuD33KiPIIAmBz2wS89dNYoYocpE4cvMk E4QtLPHq+BaoZhmJy5O7WSAa+hkllt84xQ7hTGGUOD7tKlSHtcTh4xfBzmAW4JOYtG06M8jZ EgK8Eh1tQhAlHhLbli6CKneUuPK5D+rlGYwS+57OZpvAKL2AkWEVo0hqaXFuemqxsV5xYm5x aV66XnJ+7iZGYNo4/e/4px2MX09YHWIU4GBU4uHdsDghSog1say4MvcQowQHs5II7ztvoBBv SmJlVWpRfnxRaU5q8SFGaQ4WJXFe26i2SCGB9MSS1OzU1ILUIpgsEwenVANj+7xfu/X+3g6f 6PFt89xTF5p7xGbYOSb85roUv/SMhnjS9XvhVRFqZ/f4n3ruFKSSnjCX9+/zVs1L2yp+bf22 nicqfsqMvZtaFDX+qe38dl6/jfmwv8aKwq1cLv5MPo7SzW2XzvStC7uQxVIR1O4WkepnvW4D u6qpttXxo5FaCgsYMq/Z3AtQYinOSDTUYi4qTgQANYhtzhcDAAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrOLMWRmVeSWpSXmKPExsVy+t/xy7oHXyREGXy8JmFxrXchs8XGGetZ Leacb2GxmNWla9H9Ssai6eVbJovPq56yWPTt+89oMeXPciaL+/d+Mllc3jWHzeJNWyOjxdN1 S5gt7mxtZrM4MmUfqwO/R+ulv2wer646emxZeZPJY96sEywe/w73M3nsnHWX3WPbAVWPjc+e s3jcubaHzePguz1MHn1bVjF6fN4kF8ATxWWTkpqTWZZapG+XwJXx/J5owQTeiqYZQg2Mz7m6 GDk5JARMJGac+8EEYYtJXLi3nq2LkYtDSGAJo8TEjVdZIJxGJokDr0+CVbEJmEs82n4GyObg EBFQkJj3VQekhlngCIvE7oXrWEBqhAVcJHqPtbOC2CwCqhIrpz4Fi/MCxfveNrFDbJOXWPx9 JxuIzSngKnF77lVGkJlCQDUrzspPYORdwMiwilEktbQ4Nz232EivODG3uDQvXS85P3cTIzC4 tx37uWUHY9e74EOMAhyMSjy8GxYnRAmxJpYVV+YeYpTgYFYS4X3nDRTiTUmsrEotyo8vKs1J LT7EKM3BoiTO27tndaSQQHpiSWp2ampBahFMlomDU6qBkbHeSE4gVedj0upsp1d/zY+rGG7R lRQoLqmd18Ua9apZeUv2Tr+PMct4rzupSjFdrZ2ecDvrSKzqtOPAgP+d8LPCNJNBSvRogzNT tppegojLHpELz0QZbM+5Zh6sOSm27ft0xSk1P5c2h+38fb45+9aC4N8RZS9KeY7dMjjEGf+2 OvDDBD4lluKMREMt5qLiRAArTv62agIAAA== X-CMS-MailID: 20180118183441eucas1p2ee3f046a594945299ea7b75ffb13e2ca X-Msg-Generator: CA CMS-TYPE: 201P X-CMS-RootMailID: 20180118183441eucas1p2ee3f046a594945299ea7b75ffb13e2ca X-RootMTR: 20180118183441eucas1p2ee3f046a594945299ea7b75ffb13e2ca References: <20180118183404.12583-1-k.konieczny@partner.samsung.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Export and import are mandatory in async hash. As drivers were rewritten, drop empty wrappers and correct init of ahash transformation. Signed-off-by: Kamil Konieczny --- crypto/ahash.c | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/crypto/ahash.c b/crypto/ahash.c index 3a35d67de7d9..c3cce508c1d4 100644 --- a/crypto/ahash.c +++ b/crypto/ahash.c @@ -434,16 +434,6 @@ static int ahash_def_finup(struct ahash_request *req) return ahash_def_finup_finish1(req, err); } -static int ahash_no_export(struct ahash_request *req, void *out) -{ - return -ENOSYS; -} - -static int ahash_no_import(struct ahash_request *req, const void *in) -{ - return -ENOSYS; -} - static int crypto_ahash_init_tfm(struct crypto_tfm *tfm) { struct crypto_ahash *hash = __crypto_ahash_cast(tfm); @@ -451,8 +441,6 @@ static int crypto_ahash_init_tfm(struct crypto_tfm *tfm) hash->setkey = ahash_nosetkey; hash->has_setkey = false; - hash->export = ahash_no_export; - hash->import = ahash_no_import; if (tfm->__crt_alg->cra_type != &crypto_ahash_type) return crypto_init_shash_ops_async(tfm); @@ -462,15 +450,13 @@ static int crypto_ahash_init_tfm(struct crypto_tfm *tfm) hash->final = alg->final; hash->finup = alg->finup ?: ahash_def_finup; hash->digest = alg->digest; + hash->export = alg->export; + hash->import = alg->import; if (alg->setkey) { hash->setkey = alg->setkey; hash->has_setkey = true; } - if (alg->export) - hash->export = alg->export; - if (alg->import) - hash->import = alg->import; return 0; } -- 2.15.0