From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from walk.intel-email.com (walk.intel-email.com [101.227.64.242]) by mx.groups.io with SMTP id smtpd.web10.3969.1659678541372523301 for ; Thu, 04 Aug 2022 22:49:03 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@byosoft.com.cn header.s=cloud-union header.b=ZZciRLIE; spf=pass (domain: byosoft.com.cn, ip: 101.227.64.242, mailfrom: gaoliming@byosoft.com.cn) Received: from walk.intel-email.com (localhost [127.0.0.1]) by walk.intel-email.com (Postfix) with ESMTP id 57C6ECD1F72C for ; Fri, 5 Aug 2022 13:48:58 +0800 (CST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=byosoft.com.cn; s=cloud-union; t=1659678538; bh=RvL2HCTxgdBgtFXTq1CFgBMFFVuvWv+wUJf/yDWbO8Q=; h=From:To:Cc:References:In-Reply-To:Subject:Date; b=ZZciRLIEPNL4fgHXujMNnyQL8mbdvbrXXdwBp/dJeuy+bD21tNSSlGhBKoQwtfR23 Cv7sXRtPCcqPye8KkJm306wxs0TSTzuU6x+7ZntcH/dZTAJDh9uYvRosOCj15c0MgA dXVsGXx9+mC9oQhrj+LeiPHL/sVpZ6A6VtoUN6WY= Received: from localhost (localhost [127.0.0.1]) by walk.intel-email.com (Postfix) with ESMTP id 5385FCD1F719 for ; Fri, 5 Aug 2022 13:48:58 +0800 (CST) X-Virus-Scanned: by SpamTitan at intel-email.com Received: from walk.intel-email.com (localhost [127.0.0.1]) by walk.intel-email.com (Postfix) with ESMTP id 1E292CD1F669 for ; Fri, 5 Aug 2022 13:48:58 +0800 (CST) Authentication-Results: walk.intel-email.com; none Received: from mail.byosoft.com.cn (mail.byosoft.com.cn [58.240.74.242]) by walk.intel-email.com (Postfix) with SMTP id 9DE53CD1F721 for ; Fri, 5 Aug 2022 13:48:55 +0800 (CST) Received: from DESKTOPS6D0PVI ([58.246.60.130]) (envelope-sender ) by 192.168.6.13 with ESMTP for ; Fri, 05 Aug 2022 13:48:49 +0800 X-WM-Sender: gaoliming@byosoft.com.cn X-Originating-IP: 58.246.60.130 X-WM-AuthFlag: YES X-WM-AuthUser: gaoliming@byosoft.com.cn From: "gaoliming" To: , Cc: "'Vasudevan Sambandan'" , "'Sundaresan S'" References: <20220802045922.791-1-sivaparvathic@ami.com> In-Reply-To: <20220802045922.791-1-sivaparvathic@ami.com> Subject: =?UTF-8?B?5Zue5aSNOiBbZWRrMi1kZXZlbF0gW2VkazJdIFtQQVRDSF1NZGVNb2R1bGVQa2dcc2NzaTogQ292ZXJpdHkgc2NhbiBmbGFncyBtdWx0aXBsZSBpc3N1ZXMgaW4gZWRrMi1zdGFibGUyMDIyMDU=?= Date: Fri, 5 Aug 2022 13:48:53 +0800 Message-ID: <02fb01d8a88f$0b6b22f0$224168d0$@byosoft.com.cn> MIME-Version: 1.0 X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQHOWswXLgX/Hh7M4yWcFcREkZhreK20aG8w Sender: "gaoliming" Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: quoted-printable Content-Language: zh-cn This change is good to me. Reviewed-by: Liming Gao > -----=D3=CA=BC=FE=D4=AD=BC=FE----- > =B7=A2=BC=FE=C8=CB: devel@edk2.groups.io =B4=FA=B1= =ED sivaparvathi > C via groups.io > =B7=A2=CB=CD=CA=B1=BC=E4: 2022=C4=EA8=D4=C22=C8=D5 13:00 > =CA=D5=BC=FE=C8=CB: devel@edk2.groups.io > =B3=AD=CB=CD: Vasudevan Sambandan ; Sundaresan S > ; Sivaparvathi Chellaiah > =D6=F7=CC=E2: [edk2-devel] [edk2] [PATCH]MdeModulePkg\scsi: Coverity scan= flags > multiple issues in edk2-stable202205 >=20 > Attached changes to resolve the coverity Issues >=20 > Signed-off-by: sivaparvathic@ami.com > To: sivaparvathic@ami.com >=20 > --- > MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.c | 3 +++ > MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDisk.c | 10 +++++----- > 2 files changed, 8 insertions(+), 5 deletions(-) >=20 > diff --git a/MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.c > b/MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.c > index 9ea69ee740..2cc61bb942 100644 > --- a/MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.c > +++ b/MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.c > @@ -531,6 +531,9 @@ SCSIBusDriverBindingStart ( > // then create handle and install scsi i/o protocol. >=20 > // >=20 > Status =3D ScsiScanCreateDevice (This, Controller, &ScsiTargetId, Lu= n, > ScsiBusDev); >=20 > + if (Status =3D=3D EFI_OUT_OF_RESOURCES) { >=20 > + goto ErrorExit; >=20 > + } >=20 > } >=20 >=20 >=20 > return EFI_SUCCESS; >=20 > diff --git a/MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDisk.c > b/MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDisk.c > index 98e84b4ea8..5f4ead7669 100644 > --- a/MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDisk.c > +++ b/MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDisk.c > @@ -4247,7 +4247,7 @@ BackOff: >=20 >=20 > if ((TargetStatus =3D=3D EFI_EXT_SCSI_STATUS_TARGET_CHECK_CONDITION) > || (EFI_ERROR (ReturnStatus))) { >=20 > DEBUG ((DEBUG_ERROR, "ScsiDiskRead10: Check Condition > happened!\n")); >=20 > - Status =3D DetectMediaParsingSenseKeys (ScsiDiskDevice, > ScsiDiskDevice->SenseData, SenseDataLength / sizeof > (EFI_SCSI_SENSE_DATA), &Action); >=20 > + DetectMediaParsingSenseKeys (ScsiDiskDevice, > ScsiDiskDevice->SenseData, SenseDataLength / sizeof > (EFI_SCSI_SENSE_DATA), &Action); >=20 > if (Action =3D=3D ACTION_RETRY_COMMAND_LATER) { >=20 > *NeedRetry =3D TRUE; >=20 > return EFI_DEVICE_ERROR; >=20 > @@ -4371,7 +4371,7 @@ BackOff: >=20 >=20 > if ((TargetStatus =3D=3D EFI_EXT_SCSI_STATUS_TARGET_CHECK_CONDITION) > || (EFI_ERROR (ReturnStatus))) { >=20 > DEBUG ((DEBUG_ERROR, "ScsiDiskWrite10: Check Condition > happened!\n")); >=20 > - Status =3D DetectMediaParsingSenseKeys (ScsiDiskDevice, > ScsiDiskDevice->SenseData, SenseDataLength / sizeof > (EFI_SCSI_SENSE_DATA), &Action); >=20 > + DetectMediaParsingSenseKeys (ScsiDiskDevice, > ScsiDiskDevice->SenseData, SenseDataLength / sizeof > (EFI_SCSI_SENSE_DATA), &Action); >=20 > if (Action =3D=3D ACTION_RETRY_COMMAND_LATER) { >=20 > *NeedRetry =3D TRUE; >=20 > return EFI_DEVICE_ERROR; >=20 > @@ -4494,7 +4494,7 @@ BackOff: >=20 >=20 > if ((TargetStatus =3D=3D EFI_EXT_SCSI_STATUS_TARGET_CHECK_CONDITION) > || (EFI_ERROR (ReturnStatus))) { >=20 > DEBUG ((DEBUG_ERROR, "ScsiDiskRead16: Check Condition > happened!\n")); >=20 > - Status =3D DetectMediaParsingSenseKeys (ScsiDiskDevice, > ScsiDiskDevice->SenseData, SenseDataLength / sizeof > (EFI_SCSI_SENSE_DATA), &Action); >=20 > + DetectMediaParsingSenseKeys (ScsiDiskDevice, > ScsiDiskDevice->SenseData, SenseDataLength / sizeof > (EFI_SCSI_SENSE_DATA), &Action); >=20 > if (Action =3D=3D ACTION_RETRY_COMMAND_LATER) { >=20 > *NeedRetry =3D TRUE; >=20 > return EFI_DEVICE_ERROR; >=20 > @@ -4618,7 +4618,7 @@ BackOff: >=20 >=20 > if ((TargetStatus =3D=3D EFI_EXT_SCSI_STATUS_TARGET_CHECK_CONDITION) > || (EFI_ERROR (ReturnStatus))) { >=20 > DEBUG ((DEBUG_ERROR, "ScsiDiskWrite16: Check Condition > happened!\n")); >=20 > - Status =3D DetectMediaParsingSenseKeys (ScsiDiskDevice, > ScsiDiskDevice->SenseData, SenseDataLength / sizeof > (EFI_SCSI_SENSE_DATA), &Action); >=20 > + DetectMediaParsingSenseKeys (ScsiDiskDevice, > ScsiDiskDevice->SenseData, SenseDataLength / sizeof > (EFI_SCSI_SENSE_DATA), &Action); >=20 > if (Action =3D=3D ACTION_RETRY_COMMAND_LATER) { >=20 > *NeedRetry =3D TRUE; >=20 > return EFI_DEVICE_ERROR; >=20 > @@ -4728,7 +4728,7 @@ ScsiDiskNotify ( > if (Request->TargetStatus =3D=3D > EFI_EXT_SCSI_STATUS_TARGET_CHECK_CONDITION) { >=20 > DEBUG ((DEBUG_ERROR, "ScsiDiskNotify: Check Condition > happened!\n")); >=20 >=20 >=20 > - Status =3D DetectMediaParsingSenseKeys ( >=20 > + DetectMediaParsingSenseKeys ( >=20 > ScsiDiskDevice, >=20 > Request->SenseData, >=20 > Request->SenseDataLength / sizeof > (EFI_SCSI_SENSE_DATA), >=20 > -- > 2.31.0.windows.1 > -The information contained in this message may be confidential and > proprietary to American Megatrends (AMI). This communication is intended to > be read only by the individual or entity to whom it is addressed or by their > designee. If the reader of this message is not the intended recipient, yo= u are > on notice that any distribution of this message, in any form, is strictly > prohibited. Please promptly notify the sender by reply e-mail or by telephone > at 770-246-8600, and then delete or destroy all copies of the transmission. >=20 >=20 >=20 >=20