From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) (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 DB63581E84 for ; Thu, 19 Jan 2017 02:22:28 -0800 (PST) Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga105.fm.intel.com with ESMTP; 19 Jan 2017 02:22:28 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,253,1477983600"; d="scan'208";a="55760809" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by fmsmga006.fm.intel.com with ESMTP; 19 Jan 2017 02:22:28 -0800 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.248.2; Thu, 19 Jan 2017 02:22:28 -0800 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.88]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.132]) with mapi id 14.03.0248.002; Thu, 19 Jan 2017 18:22:26 +0800 From: "Zeng, Star" To: Thomas Huth , "edk2-devel@ml01.01.org" CC: "Tian, Feng" , "Zeng, Star" Thread-Topic: [edk2] [PATCH] MdeModulePkg: Remove superfluous return statements Thread-Index: AQHScj0ayPvQNZ344kine0K2lHiD06E/lqHw Date: Thu, 19 Jan 2017 10:22:26 +0000 Message-ID: <0C09AFA07DD0434D9E2A0C6AEB0483103B818407@shsmsx102.ccr.corp.intel.com> References: <1484820964-30276-1-git-send-email-thuth@redhat.com> In-Reply-To: <1484820964-30276-1-git-send-email-thuth@redhat.com> Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 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: Thu, 19 Jan 2017 10:22:29 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable With the typo "explicitely" fixed in the commit log, Reviewed-by: Star Zeng Thanks, Star -----Original Message----- From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Thom= as 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 e= xplicitely 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/MdeModule= Pkg/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 =3D NvmeCreateIoSubmissionQueue (Private); - if (EFI_ERROR(Status)) { - return Status; - } =20 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 ( =20 HsTiming =3D 1; Status =3D EmmcSwitchClockFreq (PciIo, PassThru, Slot, Rca, HsTiming, Cl= ockFreq); - if (EFI_ERROR (Status)) { - return Status; - } =20 return Status; } diff --git a/MdeModulePkg/Bus/Sd/EmmcBlockIoPei/EmmcHci.c b/MdeModulePkg/Bu= s/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 ( =20 HsTiming =3D 1; Status =3D EmmcPeimSwitchClockFreq (Slot, Rca, HsTiming, ClockFreq); - if (EFI_ERROR (Status)) { - return Status; - } =20 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 =3D ConSplitterTextOutAddDevice (&mStdErr, TextOut, NULL, NULL); ConSplitterTextOutSetAttribute (&mStdErr.TextOut, EFI_TEXT_ATTR (EFI_MAG= ENTA, EFI_BLACK)); - if (EFI_ERROR (Status)) { - return Status; - } =20 return Status; } -- 1.8.3.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel