From c9325700d0ef25eaf45077928af3f93b15ac5fe0 Mon Sep 17 00:00:00 2001 From: ydong10 Date: Wed, 15 Sep 2010 07:48:11 +0000 Subject: Refine soma code to make code run safely. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10877 6f19259b-4bc3-4df7-8a09-765794883524 --- MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.c | 2 +- MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDisk.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'MdeModulePkg/Bus/Scsi') diff --git a/MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.c b/MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.c index 3e510a65a7..e6d963672e 100644 --- a/MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.c +++ b/MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.c @@ -1165,7 +1165,7 @@ DiscoverScsiDevice ( // Using Inquiry command to scan for the device // InquiryDataLength = sizeof (EFI_SCSI_INQUIRY_DATA); - SenseDataLength = sizeof (EFI_SCSI_SENSE_DATA); + SenseDataLength = (UINT8) sizeof (EFI_SCSI_SENSE_DATA); Status = ScsiInquiryCommand ( &ScsiIoDevice->ScsiIo, diff --git a/MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDisk.c b/MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDisk.c index 72c9f9d0b5..c1d96b936e 100644 --- a/MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDisk.c +++ b/MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDisk.c @@ -1429,7 +1429,7 @@ ScsiDiskRequestSenseKeys ( UINT8 TargetStatus; FallStatus = EFI_SUCCESS; - SenseDataLength = sizeof (EFI_SCSI_SENSE_DATA); + SenseDataLength = (UINT8) sizeof (EFI_SCSI_SENSE_DATA); ZeroMem ( ScsiDiskDevice->SenseData, @@ -2694,7 +2694,7 @@ AtapiIdentifyDevice ( Cdb[0] = ATA_CMD_IDENTIFY_DEVICE; CommandPacket.Timeout = EFI_TIMER_PERIOD_SECONDS (1); CommandPacket.Cdb = Cdb; - CommandPacket.CdbLength = sizeof (Cdb); + CommandPacket.CdbLength = (UINT8) sizeof (Cdb); CommandPacket.InDataBuffer = &ScsiDiskDevice->IdentifyData; CommandPacket.InTransferLength = sizeof (ScsiDiskDevice->IdentifyData); -- cgit v1.2.3