From patchwork Thu Nov 26 15:47:41 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 7707831 X-Patchwork-Delegate: herbert@gondor.apana.org.au Return-Path: X-Original-To: patchwork-linux-crypto@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 88E8EBF90C for ; Thu, 26 Nov 2015 16:02:12 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 52861206CD for ; Thu, 26 Nov 2015 16:02:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C9CAD206C3 for ; Thu, 26 Nov 2015 16:02:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752379AbbKZQCE (ORCPT ); Thu, 26 Nov 2015 11:02:04 -0500 Received: from mail-bn1bbn0105.outbound.protection.outlook.com ([157.56.111.105]:53203 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751368AbbKZQCB (ORCPT ); Thu, 26 Nov 2015 11:02:01 -0500 Received: from BN3PR0301CA0035.namprd03.prod.outlook.com (10.160.180.173) by BLUPR03MB1426.namprd03.prod.outlook.com (10.163.81.148) with Microsoft SMTP Server (TLS) id 15.1.331.20; Thu, 26 Nov 2015 15:47:48 +0000 Received: from BY2FFO11FD002.protection.gbl (2a01:111:f400:7c0c::157) by BN3PR0301CA0035.outlook.office365.com (2a01:111:e400:4000::45) with Microsoft SMTP Server (TLS) id 15.1.331.20 via Frontend Transport; Thu, 26 Nov 2015 15:47:48 +0000 Authentication-Results: spf=permerror (sender IP is 192.88.168.50) smtp.mailfrom=freescale.com; vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=none action=none header.from=freescale.com; Received-SPF: PermError (protection.outlook.com: domain of freescale.com used an invalid SPF mechanism) Received: from tx30smr01.am.freescale.net (192.88.168.50) by BY2FFO11FD002.mail.protection.outlook.com (10.1.14.124) with Microsoft SMTP Server (TLS) id 15.1.331.11 via Frontend Transport; Thu, 26 Nov 2015 15:47:48 +0000 Received: from fabio-Latitude-E6410.am.freescale.net (fabio-Latitude-E6410.am.freescale.net [10.29.244.206]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id tAQFliVG023079; Thu, 26 Nov 2015 08:47:46 -0700 From: Fabio Estevam To: CC: , , , Fabio Estevam , Subject: [PATCH] crypto: mxs-dcp - Initialize .statesize fields Date: Thu, 26 Nov 2015 13:47:41 -0200 Message-ID: <1448552861-17410-1-git-send-email-fabio.estevam@freescale.com> X-Mailer: git-send-email 1.9.1 X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11FD002; 1:aFZ3z9Zwan2X4Sk+/IkFcrCNGiGeSFNC9g3OmLXLkVZYBQembhJw3R0WGDlGz/tKEIKB1z5j3DB4C3Hsmgx/abSbkP+FccRZ8U42wmf5QWrFn0rGMXnjS+bBTFlzbAPL/sZvcx/raWWyyx1ToOYuQxPpwIGrVaDXVuRfc/ZGMVOn2TXz0GsS6yOZko9aXWLR3VRhvZ3RQqGhDBWpP7sEgG2umHYgzTCfTuaI87mMhvJ+jhIIS46Si7Hnu2poDu9nDnoJzJ8YhukCNq79YyjDZOoRqYzSAO0SXUwk+12WoaEBvlxCPz5g8H/yXsgvA8IKL5CZuG6GIFRxKNEWvivxWwYrFcDCwAcQfnzKQwCVHeS1J0hJ3TI2SYdbQzF/gEHs1zA+24xsj3FTmReAccyAoj50O5X1CfSo6MmtZaFO5vc= X-Forefront-Antispam-Report: CIP:192.88.168.50; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(2980300002)(448002)(189002)(199003)(1220700001)(86362001)(77096005)(5001960100002)(229853001)(50226001)(85326001)(87936001)(110136002)(97736004)(50986999)(33646002)(189998001)(1096002)(81156007)(92566002)(5003940100001)(2351001)(586003)(50466002)(48376002)(6806005)(36756003)(106466001)(47776003)(104016004)(19580395003)(19580405001)(11100500001)(5008740100001)(142923001); DIR:OUT; SFP:1102; SCL:1; SRVR:BLUPR03MB1426; H:tx30smr01.am.freescale.net; FPR:; SPF:PermError; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; MIME-Version: 1.0 X-Microsoft-Exchange-Diagnostics: 1; BLUPR03MB1426; 2:BL9o/L84MO917sIW8lsr32aukyuBSc0OYw3tOh8sH9sgXp+0lxNKNIeEKaQxB98qYyhzZOJAJn7NqJStL+djpWmTGVIvwiMZACsC7+dWjHmfCEK5aXH93pyIybJ8rVMYnHhUsxs5t6BjvOi+aL7ohw==; 3:uvHlpxGgV9SeY68F/KhYMPEUex2/hJqpA283ma2ewg9G/2uYTptVylsvvXtbqvYzJN4as8ROFmyUREomG/TjiYcrXtJEvLLXtsi7qrfrz7PUHqB20FWa2UfCMgmIJ31QnQ4GbqHmM9ubyQawZ9NTniLhqmzmN1oKGXRSq6tU7jsmre5bdmf7hZCFueUGas+NsEX85XVZdBj2GjX1VMLuoHblPCbE2ndj7giFJo8moeM=; 25:UWFokEVKh6j9WuMVobGsmvVYMP+fJrn28P/sZiTEdbS78vztbqVSb2+pteg8eK3vTuFcaN8igvB8nMIAF9NwMBspEFXbWyCpWlBf9I0XPxEk8tQNVZaZbkQiuRjcKcbeWBCsHM0355CAJr96+Nnz9pNChRUlsomL/1GRBXrAyRIErD1a+cg6dH3LjNCIjtrC5xJmHxDErprGRGxg/OMkGTqiISDhAs8i69jKtGZxvkgSYwqLggn/VruaW/y9YLj1 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BLUPR03MB1426; X-Microsoft-Exchange-Diagnostics: 1; BLUPR03MB1426; 20:0eYbQ7jAwdLFBUNsWuCFsqLJxeO3hWQLgTxMGBVEyE2wZZLIvzdvsXiZI1E/W/X4XBxTRCaBlgfbJznFeAQmYzUrVstQQr3BygKiQocDDXnwjXOcj019aGLoJuXCdNfIi5SijNEOgcAqRgs1mBE6grgp+vqsYEWLVeA2dLIGf7nvsvlyCTJfoigI8OUR/CnY9PEnNjWbcwwQvQevt49AaVlwAjgJeqDkaxJ5HSqgqL74T87rdjgPL6Sdnteikwiln1dxJRxIX0xWUCvP9k9aCY7Ni8n4OdMyVqfWKpomUhScnmmXAZsL2h1OsVafD9KzUV4LDeT2+s01a2eDRy3FwDmEBEBS59w9r32OAsLhLRw=; 4:sR1zJSdBkMCvzrJHSubZ6qN7i3n4ZM8zzYRVty7knJFSAwu/kjFFeK552yQbib5NyPHZzI31Op1fq/amMMs7RXGqbd62XlNL3jy2j5hvKQj8QArk45zfIHp/FKXBIo7g0BrD4tzGYGcNKJb5iWf8DdzXbp7wnLAOOw1SaIc+UboJQ3D0q5vkQFYlmEAkHVtYSqQX/gY2BzeKoPadG8uMlPGJghqVHIJ+nrBEAm24IbGUPfXNAvRPXaLP6Yi9XvWUVg8qRRv7SnDmlHXTC0OLMBYK88BmoIIgFtmo4yHCWa6QXhasZHzGab88jjr245ZWLtl2e9DYAKkp9IIkjwxh9L8KU4WY1uEoeQXjblNZbWHAB3StOxZQdyarl7M4ri6/Oh4WERiq8ZY1I1qkvmnZCmGzZ4Z8vSxAmOe1v+citpc= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(101931422205132); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(520078)(5005006)(8121501046)(3002001)(10201501046); SRVR:BLUPR03MB1426; BCL:0; PCL:0; RULEID:; SRVR:BLUPR03MB1426; X-Forefront-PRVS: 0772E5DAD5 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BLUPR03MB1426; 23:e4/MekGr3zOIbOQGIikLMMfEK2Zm/EA0X5eS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Fn4nxpHiYEWc0gpRrkhrGi+9RVErwFxcsizia/pWyblGtMTnDKbF2vBxuo?= =?us-ascii?Q?ovCaCFXf12PcM0esSJc7Nlf5y3pV1gTIbmRqUD4dg=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1; BLUPR03MB1426; 5:hH0PHEB0CJWDI4ZX2uoOzrX5HfqCH/oJiAv5LPqT66u7rOnwLxJhWWSvYSTTpDwZ/UgxNSHSB+Ep10Y28ej2bnHzug7vGsTnMv/Y4LiwLoj1DTC2778jNbI0UTUyKZijYyxQ0ogxtyS62M+zHn/Erw==; 24:PfKBMeeal5Mr9nSroOVdHAqnAm9eoHLTw1Lw1ytGx5YDPNK04zrSbVkSB3T23yCtvUves8WBWRSKUB/tv6+QLfdRzfix1HxyyNBJevrCyXQ= X-OriginatorOrg: freescale.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Nov 2015 15:47:48.5886 (UTC) X-MS-Exchange-CrossTenant-Id: 710a03f5-10f6-4d38-9ff4-a80b81da590d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=710a03f5-10f6-4d38-9ff4-a80b81da590d; Ip=[192.88.168.50]; Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR03MB1426 Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org X-Spam-Status: No, score=-7.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Initialize .statesize fields in order to avoid the following error on probe: mxs-dcp 80028000.dcp: Failed to register sha1 hash! mxs-dcp: probe of 80028000.dcp failed with error -22 Cc: # 4.1+ Suggested-by: Stephan Mueller Signed-off-by: Fabio Estevam --- drivers/crypto/mxs-dcp.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/crypto/mxs-dcp.c b/drivers/crypto/mxs-dcp.c index 59ed54e..e65d379 100644 --- a/drivers/crypto/mxs-dcp.c +++ b/drivers/crypto/mxs-dcp.c @@ -836,6 +836,7 @@ static struct ahash_alg dcp_sha1_alg = { .digest = dcp_sha_digest, .halg = { .digestsize = SHA1_DIGEST_SIZE, + .statesize = sizeof(struct sha1_state), .base = { .cra_name = "sha1", .cra_driver_name = "sha1-dcp", @@ -860,6 +861,7 @@ static struct ahash_alg dcp_sha256_alg = { .digest = dcp_sha_digest, .halg = { .digestsize = SHA256_DIGEST_SIZE, + .statesize = sizeof(struct sha256_state), .base = { .cra_name = "sha256", .cra_driver_name = "sha256-dcp",