[edk2] [PATCH] MdeModulePkg/UfsPassThruDxe: Fix typo in UfsPassThruGetTargetLun()

Hao Wu posted 1 patch 7 years, 7 months ago
Failed in applying to current master (apply log)
MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThru.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
[edk2] [PATCH] MdeModulePkg/UfsPassThruDxe: Fix typo in UfsPassThruGetTargetLun()
Posted by Hao Wu 7 years, 7 months ago
For function UfsPassThruGetTargetLun(), the length of the input device
node specified by 'DevicePath' should be compared with the size of
'UFS_DEVICE_PATH' rather than the size of 'SCSI_DEVICE_PATH'.

Cc: Star Zeng <star.zeng@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
---
 MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThru.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThru.c b/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThru.c
index 68a44367b5..e27f4fbab1 100644
--- a/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThru.c
+++ b/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThru.c
@@ -479,10 +479,10 @@ UfsPassThruGetTargetLun (
   }
 
   //
-  // Check whether the DevicePath belongs to SCSI_DEVICE_PATH
+  // Check whether the DevicePath belongs to UFS_DEVICE_PATH
   //
   if ((DevicePath->Type != MESSAGING_DEVICE_PATH) || (DevicePath->SubType != MSG_UFS_DP) ||
-      (DevicePathNodeLength(DevicePath) != sizeof(SCSI_DEVICE_PATH))) {
+      (DevicePathNodeLength(DevicePath) != sizeof(UFS_DEVICE_PATH))) {
     return EFI_UNSUPPORTED;
   }
 
-- 
2.12.0.windows.1

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [PATCH] MdeModulePkg/UfsPassThruDxe: Fix typo in UfsPassThruGetTargetLun()
Posted by Zeng, Star 7 years, 7 months ago
Reviewed-by: Star Zeng <star.zeng@intel.com>

Thanks,
Star
-----Original Message-----
From: Wu, Hao A 
Sent: Tuesday, May 16, 2017 1:35 PM
To: edk2-devel@lists.01.org
Cc: Wu, Hao A <hao.a.wu@intel.com>; Zeng, Star <star.zeng@intel.com>
Subject: [PATCH] MdeModulePkg/UfsPassThruDxe: Fix typo in UfsPassThruGetTargetLun()

For function UfsPassThruGetTargetLun(), the length of the input device node specified by 'DevicePath' should be compared with the size of 'UFS_DEVICE_PATH' rather than the size of 'SCSI_DEVICE_PATH'.

Cc: Star Zeng <star.zeng@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
---
 MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThru.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThru.c b/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThru.c
index 68a44367b5..e27f4fbab1 100644
--- a/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThru.c
+++ b/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThru.c
@@ -479,10 +479,10 @@ UfsPassThruGetTargetLun (
   }
 
   //
-  // Check whether the DevicePath belongs to SCSI_DEVICE_PATH
+  // Check whether the DevicePath belongs to UFS_DEVICE_PATH
   //
   if ((DevicePath->Type != MESSAGING_DEVICE_PATH) || (DevicePath->SubType != MSG_UFS_DP) ||
-      (DevicePathNodeLength(DevicePath) != sizeof(SCSI_DEVICE_PATH))) {
+      (DevicePathNodeLength(DevicePath) != sizeof(UFS_DEVICE_PATH))) {
     return EFI_UNSUPPORTED;
   }
 
--
2.12.0.windows.1

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel