From patchwork Mon Dec 14 08:44:19 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Pathak, Rahul (R.)" X-Patchwork-Id: 7842751 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 AC35ABEEE1 for ; Mon, 14 Dec 2015 09:00:25 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D6694203B4 for ; Mon, 14 Dec 2015 09:00:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3E2232027D for ; Mon, 14 Dec 2015 09:00:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752640AbbLNJAT (ORCPT ); Mon, 14 Dec 2015 04:00:19 -0500 Received: from mail-db3on0102.outbound.protection.outlook.com ([157.55.234.102]:42362 "EHLO emea01-db3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752612AbbLNJAS convert rfc822-to-8bit (ORCPT ); Mon, 14 Dec 2015 04:00:18 -0500 Received: from DB4PR06MB585.eurprd06.prod.outlook.com (10.242.231.141) by DB4PR06MB588.eurprd06.prod.outlook.com (10.242.231.28) with Microsoft SMTP Server (TLS) id 15.1.355.16; Mon, 14 Dec 2015 08:44:19 +0000 Received: from DB4PR06MB585.eurprd06.prod.outlook.com ([10.242.231.141]) by DB4PR06MB585.eurprd06.prod.outlook.com ([10.242.231.141]) with mapi id 15.01.0355.012; Mon, 14 Dec 2015 08:44:19 +0000 From: "Pathak, Rahul (R.)" To: "herbert@gondor.apana.org.au" , "davem@davemloft.net" , "linux-crypto@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: [PATCH 1/2] crypto: atmel-sha: Removed unused variable "err" Thread-Topic: [PATCH 1/2] crypto: atmel-sha: Removed unused variable "err" Thread-Index: AQHRNkufsLcqdLOhgU6jLkfcBv+UdQ== Date: Mon, 14 Dec 2015 08:44:19 +0000 Message-ID: <20151214084411.GA8727@visteon.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=rpathak@visteon.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [202.0.77.197] x-microsoft-exchange-diagnostics: 1; DB4PR06MB588; 5:wEokmzK7SdGGm+oJLttPVGs+IkDTEM3hzXACr1wGydOpoAC66RH/HzY4ufSMaY2YdaEcHUqHpJVVURoxbsHdNXXypOIqukV8pvI7rO+GHCviLrp8ITWl6ID+yy5IfROjaRqS9yMZg/StXRbXsNw7Vw==; 24:bU8TKu6MsoWJ5YiS/r0rPqhgdqUDkcU1A4XLkp0qCv/dtz1EMPi+phyBzzFigD80QpYT1Alzn7Bf1SiUeiPrdGR01A/LkXSGUSdS5gbzcfM= x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:DB4PR06MB588; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(208512329853888); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(601004)(2401047)(5005006)(520078)(8121501046)(3002001)(10201501046); SRVR:DB4PR06MB588; BCL:0; PCL:0; RULEID:; SRVR:DB4PR06MB588; x-forefront-prvs: 0790FB1F33 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(6009001)(189002)(199003)(189998001)(81156007)(66066001)(36756003)(54356999)(5008740100001)(2900100001)(2501003)(77096005)(92566002)(1076002)(3846002)(6116002)(40100003)(1096002)(122556002)(586003)(102836003)(87936001)(1220700001)(106356001)(105586002)(50986999)(107886002)(33656002)(11100500001)(5001960100002)(97736004)(2201001)(19580405001)(5002640100001)(106116001)(19580395003)(229853001)(86362001)(101416001)(5004730100002)(10400500002)(5001770100001); DIR:OUT; SFP:1102; SCL:1; SRVR:DB4PR06MB588; H:DB4PR06MB585.eurprd06.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; received-spf: None (protection.outlook.com: visteon.com does not designate permitted sender hosts) spamdiagnosticoutput: 1:23 spamdiagnosticmetadata: NSPM Content-ID: <549615F6E6C7B748B9C36D9F873D6859@eurprd06.prod.outlook.com> MIME-Version: 1.0 X-OriginatorOrg: visteon.com X-MS-Exchange-CrossTenant-originalarrivaltime: 14 Dec 2015 08:44:19.4884 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 7a147aaf-01ec-498c-80a1-e34a8c63c548 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB4PR06MB588 Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_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 From: Rahul Pathak Removed unused variable "err" and directly return "0" Reported by coccicheck - ./drivers/crypto/atmel-sha.c:758:5-8: Unneeded variable: "err". Return "0" on line 766 Signed-off-by: Rahul Pathak --- drivers/crypto/atmel-sha.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/crypto/atmel-sha.c b/drivers/crypto/atmel-sha.c index 660d8c0..20de861 100644 --- a/drivers/crypto/atmel-sha.c +++ b/drivers/crypto/atmel-sha.c @@ -755,7 +755,6 @@ static int atmel_sha_finish(struct ahash_request *req) { struct atmel_sha_reqctx *ctx = ahash_request_ctx(req); struct atmel_sha_dev *dd = ctx->dd; - int err = 0; if (ctx->digcnt[0] || ctx->digcnt[1]) atmel_sha_copy_ready_hash(req); @@ -763,7 +762,7 @@ static int atmel_sha_finish(struct ahash_request *req) dev_dbg(dd->dev, "digcnt: 0x%llx 0x%llx, bufcnt: %d\n", ctx->digcnt[1], ctx->digcnt[0], ctx->bufcnt); - return err; + return 0; } static void atmel_sha_finish_req(struct ahash_request *req, int err)