diff options
author | Star Zeng <star.zeng@intel.com> | 2018-07-02 17:07:54 +0800 |
---|---|---|
committer | Star Zeng <star.zeng@intel.com> | 2018-07-03 14:44:08 +0800 |
commit | cd69c8738391d9ce6c09cf5118c913cc7cd41d8b (patch) | |
tree | abbd8e1f20d41468d3a627e6280cf77c939ce4e9 | |
parent | 5f46352300f64d79c43cbfc67bb7a5f94bb982b8 (diff) | |
download | edk2-cd69c8738391d9ce6c09cf5118c913cc7cd41d8b.tar.gz edk2-cd69c8738391d9ce6c09cf5118c913cc7cd41d8b.tar.bz2 edk2-cd69c8738391d9ce6c09cf5118c913cc7cd41d8b.zip |
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 <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>
-rw-r--r-- | MdeModulePkg/Bus/Pci/SataControllerDxe/SataController.c | 2 |
1 files changed, 1 insertions, 1 deletions
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--;
|