From patchwork Wed Feb 3 12:46:50 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 8202691 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 20404BEEE5 for ; Wed, 3 Feb 2016 13:19:57 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 342242008F for ; Wed, 3 Feb 2016 13:19:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DC27B20279 for ; Wed, 3 Feb 2016 13:19:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755409AbcBCNTx (ORCPT ); Wed, 3 Feb 2016 08:19:53 -0500 Received: from mail-bn1bon0099.outbound.protection.outlook.com ([157.56.111.99]:19136 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751682AbcBCNTw (ORCPT ); Wed, 3 Feb 2016 08:19:52 -0500 X-Greylist: delayed 1112 seconds by postgrey-1.27 at vger.kernel.org; Wed, 03 Feb 2016 08:19:52 EST Received: from BN3PR0301CA0053.namprd03.prod.outlook.com (10.160.152.149) by BN1PR0301MB0690.namprd03.prod.outlook.com (10.160.171.27) with Microsoft SMTP Server (TLS) id 15.1.396.15; Wed, 3 Feb 2016 12:47:00 +0000 Received: from BY2FFO11FD036.protection.gbl (2a01:111:f400:7c0c::132) by BN3PR0301CA0053.outlook.office365.com (2a01:111:e400:401e::21) with Microsoft SMTP Server (TLS) id 15.1.403.16 via Frontend Transport; Wed, 3 Feb 2016 12:47:00 +0000 Authentication-Results: spf=fail (sender IP is 192.88.158.2) smtp.mailfrom=nxp.com; nxp.com; dkim=none (message not signed) header.d=none;nxp.com; dmarc=none action=none header.from=nxp.com; Received-SPF: Fail (protection.outlook.com: domain of nxp.com does not designate 192.88.158.2 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.158.2; helo=az84smr01.freescale.net; Received: from az84smr01.freescale.net (192.88.158.2) by BY2FFO11FD036.mail.protection.outlook.com (10.1.14.221) with Microsoft SMTP Server (TLS) id 15.1.409.7 via Frontend Transport; Wed, 3 Feb 2016 12:46:59 +0000 Received: from fabio-Latitude-E6410.am.freescale.net (fabio-Latitude-E6410.am.freescale.net [10.29.244.212]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id u13CktG6032693; Wed, 3 Feb 2016 05:46:56 -0700 From: Fabio Estevam To: CC: , , , , Fabio Estevam Subject: [PATCH v3 1/3] crypto: sahara - remove unneeded mutex in the exported state Date: Wed, 3 Feb 2016 10:46:50 -0200 Message-ID: <1454503612-21344-1-git-send-email-fabio.estevam@nxp.com> X-Mailer: git-send-email 1.9.1 X-EOPAttributedMessage: 0 X-Matching-Connectors: 130989772197582070; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11FD036; 1:pXhC+Lc2DuvaZ12XaiE7oZCcTucAZzTTXdp9OGnmThmi5K+aP372oUF8Uag7ikp33BMNiQyAqzZrTqkfBZYvvKoq2ZwD8jNp/45QDMNFXMfYuurJds0DmI/1G8GEniwxw0bARg7f3ImmVlPDDCZcCLQdf6KIIXhiJOKsZnhjC9vKzXXULOC2RdzD8cEkLEnEEVqhRNM8whKV8IKpzutACY9d892OBSWi/ZsOngYo6H6TepmaLdcLcn33/MxsMWvrCTGrwpbx/wyQURlLKgW45vRCFolwdAf/ktkpt6Ob8iG1zoBXICOAOAJJ/HzutqqaKaHQ2dNU1svWIe3qxU1YxuhtI+kaOKvr0+L5puANh+qtGcp15145oJnwtyHf6l8kYUQJWQnP5pWhqe7X4AwpIKBSufcDrrk3BZ+pJM4NUkiPppmKhEP9nOqMMQISjavFu+FKCRfkCRwTE0yUgsX8PVSRLrZJIKm4A+RqQ0HjbkdqUq/uShEMzKaQoCExTJOybOAncES6QLt7Tew0tMBA+lDuCVMMHgxyqzxAhpFHx2KI17D9hOzaf+b+ULQC444TTTYXXheW/dkow3iXbp0YPg== X-Forefront-Antispam-Report: CIP:192.88.158.2; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(2980300002)(1110001)(1109001)(339900001)(199003)(189002)(104016004)(48376002)(6806005)(87936001)(11100500001)(5001960100002)(85426001)(2906002)(19580405001)(586003)(19580395003)(4326007)(50226001)(50986999)(50466002)(36756003)(2351001)(5003940100001)(47776003)(105606002)(229853001)(1096002)(77096005)(33646002)(92566002)(5008740100001)(1220700001)(86362001)(189998001)(106466001)(7059030); DIR:OUT; SFP:1101; SCL:1; SRVR:BN1PR0301MB0690; H:az84smr01.freescale.net; FPR:; SPF:Fail; MLV:sfv; A:1; MX:1; LANG:en; MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: 154a04f3-5a05-4745-d4f6-08d32c981b82 X-Microsoft-Exchange-Diagnostics: 1; BN1PR0301MB0690; 2:lkAChYBlgv4mcCxA5YmmCbUujABK24pz6TPzQuJIx8VIE2EXOrM2/6Kh2AbFsF6I1oVArDCbi1BZbtBvhlc+D2x2zWU4/RQgCA6PAS922orq/tHauTZENhq9O3csGTuxMWNJqwTXOxK/9kvoq7PncdVk/IR67gGWUkmrbRtE5D4F4TUCPCUkIRZ0m217dSRw; 3:NoVn/wLXXFMxd1g9D7jAn25/jZ0R5JHT12flQwVjMVpsjVXayAukWFSux+erB4Gc7t0xC44JqNo2CeXFgc+39wCJMRtMmex9IHydx7EeuRAm5R4hgmKqQ/hxS5zOM0aA/n3jMtPrz/ZxkpjOKEdIGSQ3iQHlvfSFW0gWvJYGmwwJd6XEWRXZ8n9lbe4P+ZKR6vueGcohklrLw/N4i3DbZ9sjtYHz+hpWaeuB2k16b1o=; 25:BKiKcSc5vCp8SXOsSISupMRJrQXOooVLgICFQZgdVDi3qqt8ZzF6aM+N6kLdDa4atHd/zN7nTrI55WX+cw8xUyR6UB+lfaHQaVwtQx9FGRnfvX50cXJ1AsDKXTrZS0KByfB0RiIH08mR1xu0PPG0iaiuh3o6hUCMjPuERFXkDy01J0V2q7Sgrvmi7dUty875OpsZMfAHpzXmEseZnh0JZM2SjagryRmABGQRctgC0Js0PCrZ1WHLeLzKGHlzy8Vf X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BN1PR0301MB0690; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(8121501046)(13018025)(13024025)(13023025)(13017025)(5005006)(13015025)(3002001)(10201501046); SRVR:BN1PR0301MB0690; BCL:0; PCL:0; RULEID:(400006); SRVR:BN1PR0301MB0690; X-Microsoft-Exchange-Diagnostics: 1; BN1PR0301MB0690; 4:F3yua/dw3B2UCpXK3DcXuzLBlzKLcqAsunZEw17ynqsvl/duNjwiyghMQw7nOKOK30a4lQqtHvMcBtrMBPqJh6wFrnYuly8Q+zqtiRlFTUoiUmLwikvTbqn7UtY+VWJtGm4Soc3K2rAi2rYjAqNKRDCmcL5auIrhP5BE0EWyzbikw5c4x84eXwCD9IBciDuNLkr7baIxX+bte+WM0xpxP/5OxpjTXbVPmPw4n39uQTPLYyucuOC68Ikqt/gSMarYxNJNz1mFdYSMq2p1YFgYLvJKRsXNP0cd1vcjA6tldFg7bKPWWNalrngETPSCq+1rn3TvkpGFmmdP23iBC3KVnNCUK4IXRoYdDD+1j03ztGbTy97xhI9aKo8aBw5B/Uq/ZvF2MmweyQi0yJiWyurXVNwpFXbuxWHtU2d2lNdDTebJ7caVWgzPHDubzMIRuAj7W0oKfTNn5oC2wOh2h3rtMreK355mbWXIyLoMqtYwZE0ApQ1HEaEb2bl/jalohe3Z X-Forefront-PRVS: 08417837C5 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN1PR0301MB0690; 23:kw2qWhmqczw4mBo5p1P79shTFMcnZc8i+puefbJ?= =?us-ascii?Q?66YJrcYh33gu0CXNTNRg2ZzYT4+CJI3dUyeJmxuTeUlir1PSYn38/1OLjelo?= =?us-ascii?Q?khcKMo6WC5hgFTVA/EwZc/GkXZsk65gdr9xigOfwGny1diT0CaSBFCOBrnYG?= =?us-ascii?Q?g1fHnSq96nCqiLCrryqhDuIr6XKjV3CYm0a+KrtBlVCXcKFbVAkfXz/3Uype?= =?us-ascii?Q?DBSj3uEYN4RdaXeEgpyXRJZkwUebCOqs6gFlgO1yhYh6bC9v80/NjvQNc7yc?= =?us-ascii?Q?YcRtmYiwiKJRpLKVxyA88dW0ICDp9HfbPTEx0+D+AzR1Lq4TF1T1ov51OFHi?= =?us-ascii?Q?XwQcOWkS372iEUBFhOK9XZnGEMpiwNwnz+GA7Y1hJYepCelKoSNO2+buPaEK?= =?us-ascii?Q?ZFRUjvY+KirVzn/C4dVR63nKLVVQjGJI9GBqXzGLxrJNENQEBM1rjKzkVymU?= =?us-ascii?Q?GkE6dMpCn1hdYrBPGBOn/Uh8wm6GYAXPfAWKLNIlV4U2aOU16hTS8AB/LKXW?= =?us-ascii?Q?KxqdVON+SKWagttbgRPZ6SBqmsYT1FzJ3+kuBJGwt9dmsiW8iHNtB+CUE1UZ?= =?us-ascii?Q?JhyYhATzLlkefq7rITkELfa5C7/rSo892xed+A/Geig1uVpwsMG/97FxPjkJ?= =?us-ascii?Q?1ZEETUnapjEPlR1rBDjpKzJV3r11EUIPSonA7EZJThb3Mlyw0XU9x5Ad+VZG?= =?us-ascii?Q?OEevcOEEyHnerLhpGpJOy87z3MfRa/6arJ1R4S8jg9ebm9LF91DUrUPblLc7?= =?us-ascii?Q?BwrzaKLrDEqMhp8rxWfDKT0ZBB4/YSZmAyNAsUyF83djN3lBCHKgrT4V/kmU?= =?us-ascii?Q?2IRDOkQI0fHqIQB1EtgZKMxnqsGnzLui6uGBnpv72mLGi4Jz0KVRZYfitBmb?= =?us-ascii?Q?AHwqGpu44NeVzK35xT4jQLxGEi5unE9wApijyj335P7VC9mHxS/oaKCO8snc?= =?us-ascii?Q?NgLICR8lXJStGt9Pc18yyQQB/Xf/2u2n9yhdeeeDgRYaFwYVQJ/+G5wQrh3z?= =?us-ascii?Q?lRiOuNsxe5jyWMMvYF47LTPMw?= X-Microsoft-Exchange-Diagnostics: 1; BN1PR0301MB0690; 5:dwHfe6AZEJCZ9tha3PXOJTcTZK7zOqLGp23yD+dzca4WSoEMHMli3v/F2KnS7uxwg+B4mFrKds5gduzh6xzCG8w2Ioil/ERKohYlRhWo0qEffX6s/0Euqh/ki4IiUhcu9+CHsCMqeYiyPKUmiHeim2LxDeNneIU/DnpNOelttfc=; 24:hfZK6tNZtX1ns/xF7XzSGeERzuJ3tVrEV82Ty85yqP4khKG8BOO1u+LRwpkSkPB7TBISBCFwLhx8hPEXYfftQIjvA2HXD2wYGrOSoweXc4A= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Feb 2016 12:46:59.6490 (UTC) X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e; Ip=[192.88.158.2]; Helo=[az84smr01.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN1PR0301MB0690 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.3 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 As pointed out by Herbert Xu we should not include the mutex in the exported state, so let's just get rid of it. Signed-off-by: Fabio Estevam --- drivers/crypto/sahara.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/drivers/crypto/sahara.c b/drivers/crypto/sahara.c index 6c4f91c..7e8147d 100644 --- a/drivers/crypto/sahara.c +++ b/drivers/crypto/sahara.c @@ -182,7 +182,6 @@ struct sahara_sha_reqctx { u8 buf[SAHARA_MAX_SHA_BLOCK_SIZE]; u8 rembuf[SAHARA_MAX_SHA_BLOCK_SIZE]; u8 context[SHA256_DIGEST_SIZE + 4]; - struct mutex mutex; unsigned int mode; unsigned int digest_size; unsigned int context_size; @@ -1096,7 +1095,6 @@ static int sahara_sha_enqueue(struct ahash_request *req, int last) if (!req->nbytes && !last) return 0; - mutex_lock(&rctx->mutex); rctx->last = last; if (!rctx->active) { @@ -1109,7 +1107,6 @@ static int sahara_sha_enqueue(struct ahash_request *req, int last) mutex_unlock(&dev->queue_mutex); wake_up_process(dev->kthread); - mutex_unlock(&rctx->mutex); return ret; } @@ -1137,8 +1134,6 @@ static int sahara_sha_init(struct ahash_request *req) rctx->context_size = rctx->digest_size + 4; rctx->active = 0; - mutex_init(&rctx->mutex); - return 0; }