* [PATCH] MdeModulePkg/Bus/Ata/AhciPei: Fix DEADCODE Coverity issue @ 2022-12-22 10:05 Ranbir.Singh3 2022-12-30 1:36 ` 回复: [edk2-devel] " gaoliming 0 siblings, 1 reply; 3+ messages in thread From: Ranbir.Singh3 @ 2022-12-22 10:05 UTC (permalink / raw) To: devel [-- Attachment #1.1: Type: text/plain, Size: 139 bytes --] Hi All, The attached patch fixes the DEADCODE issue in MdeModulePkg/Bus/Ata/AhciPei. Please review. Best Regards, Ranbir Singh [-- Attachment #1.2: Type: text/html, Size: 171 bytes --] [-- Attachment #2: 0001-MdeModulePkg-Bus-Ata-AhciPei-Fix-DEADCODE-Coverity-i.patch --] [-- Type: text/plain, Size: 1082 bytes --] From 10175e59ad725db9f499b6f57ab43524c624715c Mon Sep 17 00:00:00 2001 From: Ranbir Singh <Ranbir.Singh3@Dell.com> Date: Thu, 22 Dec 2022 13:42:39 +0530 Subject: [PATCH] MdeModulePkg/Bus/Ata/AhciPei: Fix DEADCODE Coverity issue REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4201 The code can reach line 69 only through the else path above at line 57. The else path already has the same NULL check at line 59 and hence the duplicate code lines are totally redundant which can be deleted. Signed-off-by: Ranbir Singh <Ranbir.Singh3@Dell.com> --- MdeModulePkg/Bus/Ata/AhciPei/AhciPeiS3.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/MdeModulePkg/Bus/Ata/AhciPei/AhciPeiS3.c b/MdeModulePkg/Bus/Ata/AhciPei/AhciPeiS3.c index 42e4203a22..6013af858d 100644 --- a/MdeModulePkg/Bus/Ata/AhciPei/AhciPeiS3.c +++ b/MdeModulePkg/Bus/Ata/AhciPei/AhciPeiS3.c @@ -66,10 +66,6 @@ AhciS3GetEumeratePorts ( } } - if (S3InitDevices == NULL) { - return 0; - } - // // Only enumerate the ports that exist in the device list. // -- 2.36.1.windows.1 ^ permalink raw reply related [flat|nested] 3+ messages in thread
* 回复: [edk2-devel] [PATCH] MdeModulePkg/Bus/Ata/AhciPei: Fix DEADCODE Coverity issue 2022-12-22 10:05 [PATCH] MdeModulePkg/Bus/Ata/AhciPei: Fix DEADCODE Coverity issue Ranbir.Singh3 @ 2022-12-30 1:36 ` gaoliming 2023-01-04 4:49 ` [edk2-devel] " Ranbir Singh 0 siblings, 1 reply; 3+ messages in thread From: gaoliming @ 2022-12-30 1:36 UTC (permalink / raw) To: devel, Ranbir.Singh3 [-- Attachment #1: Type: text/plain, Size: 514 bytes --] Ranbir: This change is good. Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn> Thanks Liming 发件人: devel@edk2.groups.io <devel@edk2.groups.io> 代表 Ranbir Singh via groups.io 发送时间: 2022年12月22日 18:06 收件人: devel@edk2.groups.io 主题: [edk2-devel] [PATCH] MdeModulePkg/Bus/Ata/AhciPei: Fix DEADCODE Coverity issue Hi All, The attached patch fixes the DEADCODE issue in MdeModulePkg/Bus/Ata/AhciPei. Please review. Best Regards, Ranbir Singh [-- Attachment #2: Type: text/html, Size: 3907 bytes --] ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [edk2-devel] 回复: [edk2-devel] [PATCH] MdeModulePkg/Bus/Ata/AhciPei: Fix DEADCODE Coverity issue 2022-12-30 1:36 ` 回复: [edk2-devel] " gaoliming @ 2023-01-04 4:49 ` Ranbir Singh 0 siblings, 0 replies; 3+ messages in thread From: Ranbir Singh @ 2023-01-04 4:49 UTC (permalink / raw) To: gaoliming, devel [-- Attachment #1: Type: text/plain, Size: 851 bytes --] The code can reach line 69 only through the else path above at line 57. The else path already has the same NULL check at line 59 and hence the duplicate code lines are totally redundant which can be deleted. REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4201 Signed-off-by: Ranbir Singh <Ranbir.Singh3@Dell.com> --- MdeModulePkg/Bus/Ata/AhciPei/AhciPeiS3.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/MdeModulePkg/Bus/Ata/AhciPei/AhciPeiS3.c b/MdeModulePkg/Bus/Ata/AhciPei/AhciPeiS3.c index 42e4203a22..6013af858d 100644 --- a/MdeModulePkg/Bus/Ata/AhciPei/AhciPeiS3.c +++ b/MdeModulePkg/Bus/Ata/AhciPei/AhciPeiS3.c @@ -66,10 +66,6 @@ AhciS3GetEumeratePorts ( } } - if (S3InitDevices == NULL) { - return 0; - } - // // Only enumerate the ports that exist in the device list. // -- 2.36.1.windows.1 [-- Attachment #2: Type: text/html, Size: 1272 bytes --] ^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-01-04 4:49 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2022-12-22 10:05 [PATCH] MdeModulePkg/Bus/Ata/AhciPei: Fix DEADCODE Coverity issue Ranbir.Singh3 2022-12-30 1:36 ` 回复: [edk2-devel] " gaoliming 2023-01-04 4:49 ` [edk2-devel] " Ranbir Singh
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox