From cd69c8738391d9ce6c09cf5118c913cc7cd41d8b Mon Sep 17 00:00:00 2001 From: Star Zeng Date: Mon, 2 Jul 2018 17:07:54 +0800 Subject: [PATCH] MdeModulePkg SataControllerDxe: Use compare logic in if condition Use compare logic in if condition to fix ECC issue. It is caused by aa4240edff41034d709938a15b42cf4fd3214386. Cc: Hao Wu Cc: Dandan Bi Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Star Zeng Reviewed-by: Dandan Bi Reviewed-by: Hao Wu --- MdeModulePkg/Bus/Pci/SataControllerDxe/SataController.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MdeModulePkg/Bus/Pci/SataControllerDxe/SataController.c b/MdeModulePkg/Bus/Pci/SataControllerDxe/SataController.c index d47e918f57..86233bb86d 100644 --- a/MdeModulePkg/Bus/Pci/SataControllerDxe/SataController.c +++ b/MdeModulePkg/Bus/Pci/SataControllerDxe/SataController.c @@ -483,7 +483,7 @@ SataControllerStart ( } MaxPortNumber = 31; while (MaxPortNumber > 0) { - if (Data32 & (1 << MaxPortNumber)) { + if ((Data32 & ((UINT32)1 << MaxPortNumber)) != 0) { break; } MaxPortNumber--; -- 2.39.2