From patchwork Wed Sep 28 15:41:11 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SF Markus Elfring X-Patchwork-Id: 9355831 X-Patchwork-Delegate: snitzer@redhat.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 76814600C8 for ; Thu, 29 Sep 2016 07:57:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 697A42989A for ; Thu, 29 Sep 2016 07:57:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5E2A62989F; Thu, 29 Sep 2016 07:57:03 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from mx4-phx2.redhat.com (mx4-phx2.redhat.com [209.132.183.25]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 02E792989A for ; Thu, 29 Sep 2016 07:57:02 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by mx4-phx2.redhat.com (8.13.8/8.13.8) with ESMTP id u8T7slwO005985; Thu, 29 Sep 2016 03:54:47 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id u8SFfF3f024184 for ; Wed, 28 Sep 2016 11:41:15 -0400 Received: from mx1.redhat.com (ext-mx06.extmail.prod.ext.phx2.redhat.com [10.5.110.30]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u8SFfEXX031380 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 28 Sep 2016 11:41:14 -0400 Received: from mout.web.de (mout.web.de [217.72.192.78]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 8EE9D445D1; Wed, 28 Sep 2016 15:41:13 +0000 (UTC) Received: from [192.168.1.2] ([78.48.47.99]) by smtp.web.de (mrweb103) with ESMTPSA (Nemesis) id 0MAdol-1bdQUO4ATT-00Bwd3; Wed, 28 Sep 2016 17:41:12 +0200 To: dm-devel@redhat.com, linux-raid@vger.kernel.org, Alasdair Kergon , Mike Snitzer , Shaohua Li References: <566ABCD9.1060404@users.sourceforge.net> <7c232017-e291-fd2d-5516-26e5150d90df@users.sourceforge.net> From: SF Markus Elfring Message-ID: <5baf3472-b5d1-c96f-b84a-cad2f60a5547@users.sourceforge.net> Date: Wed, 28 Sep 2016 17:41:11 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 In-Reply-To: <7c232017-e291-fd2d-5516-26e5150d90df@users.sourceforge.net> X-Provags-ID: V03:K0:haqhl/hBL4bx9YIJsoLmTsnPQWIUGnXK+95HB2i/GPqM7Dkih7e UFZaKttOcDVHIf7BEnaCTEFMrTrce6uzzESMsvkylWzeboq6IttPsskkdgmdXQuuQ77afH3 GOn0kJkVe0jOEqkB3tVp1J1gjhMvaZDMIW4km5/U35g3MV9aiMNNUvD7hAeJA2lEwGFnk39 jRPJ9/dtwaSTBFLoOpoAg== X-UI-Out-Filterresults: notjunk:1; V01:K0:n5WXBVEM/VQ=:cqdXeHdF0io6uN77SNyyli O+my9qH1gkhKv3Abal6oMhmWn4svp0AfZGEDjD/tPHMV03CJvCPKB+MSY79O8iiEM0aWBxTN+ gEa1r0UJnmGus04/2C/S9sKml98byTli7SDbSCiX3N2io05pO9arFL34dAXP/JcDlJO7V+yFL ZobWtn58LCYudRWnk7p/mOZ5JYmN4Roxy9nf83AKU6Qrhg2iLHeE8yOezxAOFis1G7MXzPpuY 2on7dKAyPIapQGQFFDg8frHtEMLXpMqOljIAVKfd+CzpQgRnqVb5dAO/rkfJ+nwgSz7v+KxSQ lPEdQgpRT24TnphGY3eF+cr4oG5SZ7tSVTUbCjbFbkIdXDKGmjeVgHCM4+MVVV/2dzC68nmZg gz4r/dKl1wFHtjCqmRr2GtlvmWWVYSlOfTgKHK1U3v26BxGGTxPeOvSLNCEhf8lbFVgDI8SWF +YCZdUfQEuSZXuInSv/XGrTI2zTlXy+6IPo23HSFhhTqSMSJwbxk0eyKv/yCdcHEGTcqFEkoU ICp4FEzvrvhZikX1LYvJo7SQT1v8x2LQay5Yi3Daa1x+8auPq3PkFdXLcZkubwvaCMyc8P12m PA5E5Wr0ar8zu7pFXIKK7t7ruPiTi9hEIbyQP9eU68JECs5y08+0J+chYQmebRoG5FBOCq9Xw KhOsBcEjPtwgeZDJ2TlvhMlg9pYYIQ86sYwoiupBmrB6kFu8T5ZBUp1iNdUwLjWEWls3RQ2rY 6MGo9dPwkEDVevK3IKn6pnjJtVjy3OxZhMsTtgvTNovRuR5C/7BR46ZLkSuav97zkNOndPUkj GUvysFU X-Greylist: Sender IP whitelisted by DNSRBL, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Wed, 28 Sep 2016 15:41:14 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Wed, 28 Sep 2016 15:41:14 +0000 (UTC) for IP:'217.72.192.78' DOMAIN:'mout.web.de' HELO:'mout.web.de' FROM:'elfring@users.sourceforge.net' RCPT:'' X-RedHat-Spam-Score: 0.079 (BAYES_50, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_PASS) 217.72.192.78 mout.web.de 217.72.192.78 mout.web.de X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-Scanned-By: MIMEDefang 2.78 on 10.5.110.30 X-loop: dm-devel@redhat.com X-Mailman-Approved-At: Thu, 29 Sep 2016 03:54:16 -0400 Cc: Julia Lawall , kernel-janitors@vger.kernel.org, LKML Subject: [dm-devel] [PATCH 04/10] md/dm-crypt: Delete an unnecessary variable initialisation in crypt_message() X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: device-mapper development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com X-Virus-Scanned: ClamAV using ClamSMTP From: Markus Elfring Date: Wed, 28 Sep 2016 15:06:05 +0200 The local variable "ret" will be set to an appropriate value in if branches. Thus omit the explicit initialisation at the beginning. Signed-off-by: Markus Elfring --- drivers/md/dm-crypt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/md/dm-crypt.c b/drivers/md/dm-crypt.c index 08e3de2..7778e9b 100644 --- a/drivers/md/dm-crypt.c +++ b/drivers/md/dm-crypt.c @@ -2013,7 +2013,7 @@ static void crypt_resume(struct dm_target *ti) static int crypt_message(struct dm_target *ti, unsigned argc, char **argv) { struct crypt_config *cc = ti->private; - int ret = -EINVAL; + int ret; if (argc < 2) goto show_warning;