From patchwork Mon Dec 14 08:45:23 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: 7842741 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 5A10DBEEE1 for ; Mon, 14 Dec 2015 08:59:41 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 886BF202A1 for ; Mon, 14 Dec 2015 08:59:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 883C32027D for ; Mon, 14 Dec 2015 08:59:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752644AbbLNI7i (ORCPT ); Mon, 14 Dec 2015 03:59:38 -0500 Received: from mail-db3on0142.outbound.protection.outlook.com ([157.55.234.142]:15424 "EHLO emea01-db3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752640AbbLNI7i convert rfc822-to-8bit (ORCPT ); Mon, 14 Dec 2015 03:59:38 -0500 X-Greylist: delayed 916 seconds by postgrey-1.27 at vger.kernel.org; Mon, 14 Dec 2015 03:59:38 EST 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:45:23 +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:45:23 +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 2/2] crypto: omap-aes, omap-des: Removed unused variable "err" Thread-Topic: [PATCH 2/2] crypto: omap-aes, omap-des: Removed unused variable "err" Thread-Index: AQHRNkvF+7fYBqVlUk2ynhwzbFwsZA== Date: Mon, 14 Dec 2015 08:45:23 +0000 Message-ID: <20151214084517.GA8751@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:TWxUu/zkvgfV1V+/bk7Fe+/HYusL2zR1XpOh916DSTxja80HfovCxps8L88w/vrU1mOowVKNed4rjv34Dtti3vN/TIvh1IuVdY9g0DPsQy2QIIKRFwhNMwA0AJpfLo9TBasLozBrQlWJxe+z9y4Kyw==; 24:Zm2neFgRKDWePITBBLZt6XZz8VeSfmaTv2IFb/709LLkC8cWc8+LuBr2R7Xe9sP5z6YrFVXium1h+V2e4pgxtOMFtHTHFiCKHmqXVE/Jb5Q= 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)(24434003)(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)(142933001); 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: <930EB13A8BC92A48B985757CB53E5398@eurprd06.prod.outlook.com> MIME-Version: 1.0 X-OriginatorOrg: visteon.com X-MS-Exchange-CrossTenant-originalarrivaltime: 14 Dec 2015 08:45:23.1426 (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=unavailable 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/omap-aes.c:542:5-8: Unneeded variable: "err". Return "0" on line 551 ./drivers/crypto/omap-des.c:530:5-8: Unneeded variable: "err". Return "0" on line 539 Signed-off-by: Rahul Pathak --- drivers/crypto/omap-aes.c | 4 +--- drivers/crypto/omap-des.c | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/crypto/omap-aes.c b/drivers/crypto/omap-aes.c index eba2314..dd355bd 100644 --- a/drivers/crypto/omap-aes.c +++ b/drivers/crypto/omap-aes.c @@ -539,8 +539,6 @@ static void omap_aes_finish_req(struct omap_aes_dev *dd, int err) static int omap_aes_crypt_dma_stop(struct omap_aes_dev *dd) { - int err = 0; - pr_debug("total: %d\n", dd->total); omap_aes_dma_stop(dd); @@ -548,7 +546,7 @@ static int omap_aes_crypt_dma_stop(struct omap_aes_dev *dd) dmaengine_terminate_all(dd->dma_lch_in); dmaengine_terminate_all(dd->dma_lch_out); - return err; + return 0; } static int omap_aes_check_aligned(struct scatterlist *sg, int total) diff --git a/drivers/crypto/omap-des.c b/drivers/crypto/omap-des.c index 0a70e46..a95ee4f 100644 --- a/drivers/crypto/omap-des.c +++ b/drivers/crypto/omap-des.c @@ -527,8 +527,6 @@ static void omap_des_finish_req(struct omap_des_dev *dd, int err) static int omap_des_crypt_dma_stop(struct omap_des_dev *dd) { - int err = 0; - pr_debug("total: %d\n", dd->total); omap_des_dma_stop(dd); @@ -536,7 +534,7 @@ static int omap_des_crypt_dma_stop(struct omap_des_dev *dd) dmaengine_terminate_all(dd->dma_lch_in); dmaengine_terminate_all(dd->dma_lch_out); - return err; + return 0; } static int omap_des_copy_needed(struct scatterlist *sg)