]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdeModulePkg SataControllerDxe: Use compare logic in if condition
authorStar Zeng <star.zeng@intel.com>
Mon, 2 Jul 2018 09:07:54 +0000 (17:07 +0800)
committerStar Zeng <star.zeng@intel.com>
Tue, 3 Jul 2018 06:44:08 +0000 (14:44 +0800)
Use compare logic in if condition to fix ECC issue.
It is caused by aa4240edff41034d709938a15b42cf4fd3214386.

Cc: Hao Wu <hao.a.wu@intel.com>
Cc: Dandan Bi <dandan.bi@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Hao Wu <hao.a.wu@intel.com>
MdeModulePkg/Bus/Pci/SataControllerDxe/SataController.c

index d47e918f5757eff15ab5f056f1651635596aede6..86233bb86dc007a87131e34418266d9c4e3e1cf5 100644 (file)
@@ -483,7 +483,7 @@ SataControllerStart (
     }\r
     MaxPortNumber = 31;\r
     while (MaxPortNumber > 0) {\r
-      if (Data32 & (1 << MaxPortNumber)) {\r
+      if ((Data32 & ((UINT32)1 << MaxPortNumber)) != 0) {\r
         break;\r
       }\r
       MaxPortNumber--;\r