From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 0E63E81B5E for ; Thu, 19 Jan 2017 21:58:15 -0800 (PST) Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 718087E9C4; Fri, 20 Jan 2017 05:58:15 +0000 (UTC) Received: from [10.36.116.51] (ovpn-116-51.ams2.redhat.com [10.36.116.51]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id v0K5wDs1018713 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 20 Jan 2017 00:58:14 -0500 To: "Zeng, Star" , "edk2-devel@ml01.01.org" References: <1484820964-30276-1-git-send-email-thuth@redhat.com> <0C09AFA07DD0434D9E2A0C6AEB0483103B818407@shsmsx102.ccr.corp.intel.com> Cc: "Tian, Feng" From: Thomas Huth Message-ID: Date: Fri, 20 Jan 2017 06:58:12 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 MIME-Version: 1.0 In-Reply-To: <0C09AFA07DD0434D9E2A0C6AEB0483103B818407@shsmsx102.ccr.corp.intel.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Fri, 20 Jan 2017 05:58:15 +0000 (UTC) Subject: Re: [PATCH] MdeModulePkg: Remove superfluous return statements X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Jan 2017 05:58:15 -0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit On 19.01.2017 11:22, Zeng, Star wrote: > With the typo "explicitely" fixed in the commit log, Oh, right, stupid me ;-) Could you maybe fix that when picking up the patch (since I can't commit this on my own)? Or shall I rather resend the patch? Thanks, Thomas > Reviewed-by: Star Zeng > > Thanks, > Star > -----Original Message----- > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Thomas Huth > Sent: Thursday, January 19, 2017 6:16 PM > To: edk2-devel@ml01.01.org > Cc: Tian, Feng ; Zeng, Star > Subject: [edk2] [PATCH] MdeModulePkg: Remove superfluous return statements > > If the code eventually returns "Status" anyway, it does not make sense to explicitely return "Status" in case of an error, too. > (this patch has been created with Coccinelle) > > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Thomas Huth > --- > MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressHci.c | 3 --- > MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/EmmcDevice.c | 3 --- > MdeModulePkg/Bus/Sd/EmmcBlockIoPei/EmmcHci.c | 3 --- > MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.c | 3 --- > 4 files changed, 12 deletions(-) > > diff --git a/MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressHci.c b/MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressHci.c > index 51cff3c..ad6cdb1 100644 > --- a/MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressHci.c > +++ b/MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressHci.c > @@ -1046,9 +1046,6 @@ NvmeControllerInit ( > // One for blocking I/O, one for non-blocking I/O. > // > Status = NvmeCreateIoSubmissionQueue (Private); > - if (EFI_ERROR(Status)) { > - return Status; > - } > > return Status; > } > diff --git a/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/EmmcDevice.c b/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/EmmcDevice.c > index 3f73194..9dbec10 100755 > --- a/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/EmmcDevice.c > +++ b/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/EmmcDevice.c > @@ -783,9 +783,6 @@ EmmcSwitchToHighSpeed ( > > HsTiming = 1; > Status = EmmcSwitchClockFreq (PciIo, PassThru, Slot, Rca, HsTiming, ClockFreq); > - if (EFI_ERROR (Status)) { > - return Status; > - } > > return Status; > } > diff --git a/MdeModulePkg/Bus/Sd/EmmcBlockIoPei/EmmcHci.c b/MdeModulePkg/Bus/Sd/EmmcBlockIoPei/EmmcHci.c > index d6d3bdb..5a9e0b2 100644 > --- a/MdeModulePkg/Bus/Sd/EmmcBlockIoPei/EmmcHci.c > +++ b/MdeModulePkg/Bus/Sd/EmmcBlockIoPei/EmmcHci.c > @@ -2520,9 +2520,6 @@ EmmcPeimSwitchToHighSpeed ( > > HsTiming = 1; > Status = EmmcPeimSwitchClockFreq (Slot, Rca, HsTiming, ClockFreq); > - if (EFI_ERROR (Status)) { > - return Status; > - } > > return Status; > } > diff --git a/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.c b/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.c > index 7ef141f..01bec19 100644 > --- a/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.c > +++ b/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.c > @@ -1465,9 +1465,6 @@ ConSplitterStdErrDriverBindingStart ( > // > Status = ConSplitterTextOutAddDevice (&mStdErr, TextOut, NULL, NULL); > ConSplitterTextOutSetAttribute (&mStdErr.TextOut, EFI_TEXT_ATTR (EFI_MAGENTA, EFI_BLACK)); > - if (EFI_ERROR (Status)) { > - return Status; > - } > > return Status; > } > -- > 1.8.3.1 > > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel >