From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mailout4.samsung.com (mailout4.samsung.com [203.254.224.34]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id A493B2095D217 for ; Wed, 28 Jun 2017 06:41:32 -0700 (PDT) Received: from epcas5p1.samsung.com (unknown [182.195.41.39]) by mailout4.samsung.com (KnoxPortal) with ESMTP id 20170628134301epoutp04307065f6e975a6a4852c5de15aac520d~MTPLW_bLQ1270912709epoutp04u for ; Wed, 28 Jun 2017 13:43:01 +0000 (GMT) Received: from epsmges5p2.samsung.com (unknown [182.195.42.45]) by epcas5p1.samsung.com (KnoxPortal) with ESMTP id 20170628134300epcas5p1a26bce8befcf2e111efab1ac03911251~MTPKLM57w2715527155epcas5p1A; Wed, 28 Jun 2017 13:43:00 +0000 (GMT) X-AuditID: b6c32a2d-f79866d0000012d5-86-5953b2649df6 Received: from epcas5p2.samsung.com ( [182.195.41.40]) by epsmges5p2.samsung.com (EPCPMTA) with SMTP id DF.8F.04821.462B3595; Wed, 28 Jun 2017 22:43:00 +0900 (KST) Mime-Version: 1.0 Reply-To: amit.ak@samsung.com Sender: Amit Kumar From: Amit Kumar To: "edk2-devel@lists.01.org" CC: Laszlo Ersek , Michael D Kinney , Liming Gao , Gabriel Somlo , Star Zeng X-Priority: 3 X-Content-Kind-Code: NORMAL In-Reply-To: <1498656170-184428-1-git-send-email-star.zeng@intel.com> X-Drm-Type: N,general X-EPLocale: en_US.EUC-KR X-EPWebmail-Msg-Type: personal X-Msg-Generator: Mail X-Msg-Type: PERSONAL X-Reply-Demand: N X-Sender: =?utf-8?B?7IK87ISx7KCE7J6QG1NTSVItSG9zdCBTb2x1?= =?utf-8?B?dGlvbnMbTGVhZCBFbmdpbmVlcg==?= X-Sender-IP: 107.108.214.91 X-Local-Sender: =?UTF-8?B?QW1pdCBLdW1hchtTU0lSLUhvc3QgU29sdXRpb25zG+yCvOyEseyghOyekA==?= =?UTF-8?B?G0xlYWQgRW5naW5lZXI=?= X-Global-Sender: =?UTF-8?B?QW1pdCBLdW1hchtTU0lSLUhvc3QgU29sdXRpb25zG1NhbXN1bmcgRWxl?= =?UTF-8?B?Y3Ryb25pY3MbTGVhZCBFbmdpbmVlcg==?= X-Sender-Code: =?UTF-8?B?QzEwGxtDMTBJRDA3SUQwMTEwMTM=?= Message-ID: <20170628134300epcms5p7b15b05be45cbfd47e40d787e7cdc699b@epcms5p7> Date: Wed, 28 Jun 2017 13:43:00 +0000 X-CMS-MailID: 20170628134300epcms5p7b15b05be45cbfd47e40d787e7cdc699b X-MTR: 20170628134300epcms5p7b15b05be45cbfd47e40d787e7cdc699b CMS-TYPE: 105P X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFuplleLIzCtJLcpLzFFi42LZdlhTQzdlU3CkwY2vShZ7Dh1ltviwTdVi 2bEdLBYr7m1gt+jo+Mdksa/X2oHNY+esu+wei/e8ZPLonv2PxeP9vqtsASxRXDYpqTmZZalF +nYJXBl7+tezFbw3rehrP8HewLjbpIuRk0NCwETiye1zLBC2mMSFe+vZuhi5OIQEljJKvH+3 ASjBwcErICjxd4cwiCksECNxeYkZSLmQgKzE32nH2UFsYQENiYfTVrOC2GwCahJTWxaB2SIC 5hKt868wgYxkFtjLKPHi6XtmiF28EjPan0LtlZbYvnwrI4jNKeAqsWbTdVaIuKjEzdVv2SFs CYnVC5+zQdhyEtO+rmGGqXl/bD4jhC0i0XrvLFRcUOLBz91Q8VSJlZPWMsHsWnh7J9Teaom+ HWcYQY6TEGhhlHh9oxOqyFxi7r3vYIt5BXwlfm27CWazCKhKbHjyHGqBi0T7rdlgg5gFtCWW LXzNDAogZgFNifW79EFMCQFbiXs/HCEq+CR6fz+Bmq4o8eLfD/YJjCqzEIE7C8mcWQhzFjAy r2IUSy0ozk1PLTYtMNIrTswtLs1L10vOz93ECE4kWro7GL8s8D7EKMDBqMTDu2FjcKQQa2JZ cWXuIUYJDmYlEd7WhUAh3pTEyqrUovz4otKc1OJDjNIcLErivOorr0UICaQnlqRmp6YWpBbB ZJk4OKUaGDNVVl9aaeisUCWnfqNZSc1I5V2bV1qqzaqVDNlVVcaWz9583Dop3P7jwyVnYmaI CFpxO3Hdr76xJvzgr1U68iJnvGuOWCV9izjr8n3ajpQjEVzr2Ffuczj2Vf6Mmq72PN1JjHd4 6769amBbnZwuqOOj13p7ecvCH1HuLoXnfr66JvAx1oprrhJLcUaioRZzUXEiAJwF+XsgAwAA X-CMS-RootMailID: 20170628132257epcas2p179c316d36aced662ceb27feef4d4d48a X-RootMTR: 20170628132257epcas2p179c316d36aced662ceb27feef4d4d48a References: <1498656170-184428-1-git-send-email-star.zeng@intel.com> Subject: Re: [PATCH V5] MdeModulePkg/DxeCore: Fixed Interface returned by CoreOpenProtocol X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jun 2017 13:41:33 -0000 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" =C2=A0Spec=20+=20Pach=20Looks=20fine=20to=20me.=0D=0A=C2=A0=0D=0A---------= =20Original=20Message=20---------=0D=0ASender=20:=20Star=20Zeng=C2=A0=0D=0ADate=20=20=20:=202017-06-28=2018:52=20(GMT+5:30)=0D= =0ATitle=20=20:=20=5BPATCH=20V5=5D=20MdeModulePkg/DxeCore:=20Fixed=20Interf= ace=20returned=20by=20CoreOpenProtocol=0D=0ATo=20:=20edk2-devel=40lists.01.= org=0D=0ACC=20:=20Amit=20Kumar,=20null,=20null,=20null,=20null,=20null=0D=0A=C2=A0= =0D=0AFrom:=C2=A0Amit=C2=A0Kumar=C2=A0=0D=0A=C2=A0= =0D=0AChange=C2=A0since=C2=A0v4:=C2=A0Revise=C2=A0the=C2=A0patch=C2=A0based= =C2=A0on=C2=A0V4=C2=A0sent=C2=A0by=C2=A0Amit=C2=A0Kumar=0D=0A1)=C2=A0Only= =C2=A0return=C2=A0the=C2=A0corresponding=C2=A0protocol=C2=A0interface=C2=A0= in=C2=A0*Interface=0D=0Aif=C2=A0the=C2=A0return=C2=A0status=C2=A0is=C2=A0EF= I_SUCCESS=C2=A0or=C2=A0EFI_ALREADY_STARTED.=0D=0A2)=C2=A0Interface=C2=A0is= =C2=A0returned=C2=A0unmodified=C2=A0for=C2=A0all=C2=A0error=C2=A0conditions= =C2=A0except=0D=0AEFI_UNSUPPORTED=C2=A0and=C2=A0EFI_ALREADY_STARTED,=C2=A0N= ULL=C2=A0will=C2=A0be=C2=A0returned=C2=A0in=0D=0A*Interface=C2=A0when=C2=A0= EFI_UNSUPPORTED=C2=A0and=C2=A0Attributes=C2=A0is=C2=A0not=0D=0AEFI_OPEN_PRO= TOCOL_TEST_PROTOCOL,=C2=A0the=C2=A0protocol=C2=A0interface=C2=A0will=C2=A0b= e=0D=0Areturned=C2=A0in=C2=A0*Interface=C2=A0when=C2=A0EFI_ALREADY_STARTED.= =0D=0A=C2=A0=0D=0AChange=C2=A0since=C2=A0v3:=0D=0A1)=C2=A0Fixed=C2=A0issue= =C2=A0when=C2=A0Attributes=C2=A0=3D=C2=A0EFI_OPEN_PROTOCOL_TEST_PROTOCOL=0D= =0Aand=C2=A0Inteface=C2=A0=3D=C2=A0NULL=C2=A0case.=C2=A0=5BReported=C2=A0by= :star.zeng=C2=A0at=C2=A0intel.com=5D=0D=0A=C2=A0=0D=0AChange=C2=A0Since=C2= =A0v2:=0D=0A1)=C2=A0Modified=C2=A0to=C2=A0use=C2=A0EFI_ERROR=C2=A0to=C2=A0g= et=C2=A0status=C2=A0code=0D=0A=C2=A0=0D=0AChange=C2=A0since=C2=A0v1:=0D=0A1= )=C2=A0Fixed=C2=A0typo=C2=A0protocal=C2=A0to=C2=A0protocol=0D=0A2)=C2=A0Fix= ed=C2=A0coding=C2=A0style=0D=0A=C2=A0=0D=0ACc:=C2=A0Laszlo=C2=A0Ersek=C2=A0= =0D=0ACc:=C2=A0Amit=C2=A0Kumar=C2=A0=0D=0ACc:=C2=A0Michael=C2=A0D=C2=A0Kinney=C2=A0=0D=0ACc:=C2=A0Liming=C2=A0Gao=C2=A0=0D=0ACc= :=C2=A0Gabriel=C2=A0Somlo=C2=A0=0D=0AContributed-under:= =C2=A0TianoCore=C2=A0Contribution=C2=A0Agreement=C2=A01.0=0D=0ASigned-off-b= y:=C2=A0Amit=C2=A0Kumar=C2=A0=0D=0ASigned-off-by:=C2= =A0Star=C2=A0Zeng=C2=A0=0D=0A---=0D=0A=C2=A0MdeModul= ePkg/Core/Dxe/Hand/Handle.c=C2=A0=7C=C2=A036=C2=A0+++++++++++++++++++++++--= -----------=0D=0A=C2=A01=C2=A0file=C2=A0changed,=C2=A023=C2=A0insertions(+)= ,=C2=A013=C2=A0deletions(-)=0D=0A=C2=A0=0D=0Adiff=C2=A0--git=C2=A0a/MdeModu= lePkg/Core/Dxe/Hand/Handle.c=C2=A0b/MdeModulePkg/Core/Dxe/Hand/Handle.c=0D= =0Aindex=C2=A059b89148c8f0..3862a3876f4a=C2=A0100644=0D=0A---=C2=A0a/MdeMod= ulePkg/Core/Dxe/Hand/Handle.c=0D=0A+++=C2=A0b/MdeModulePkg/Core/Dxe/Hand/Ha= ndle.c=0D=0A=40=40=C2=A0-1006,12=C2=A0+1006,8=C2=A0=40=40=C2=A0CoreOpenProt= ocol=C2=A0(=0D=0A=C2=A0=C2=A0=C2=A0//=0D=0A=C2=A0=C2=A0=C2=A0//=C2=A0Check= =C2=A0for=C2=A0invalid=C2=A0Interface=0D=0A=C2=A0=C2=A0=C2=A0//=0D=0A-=C2= =A0=C2=A0if=C2=A0(Attributes=C2=A0=21=3D=C2=A0EFI_OPEN_PROTOCOL_TEST_PROTOC= OL)=C2=A0=7B=0D=0A-=C2=A0=C2=A0=C2=A0=C2=A0if=C2=A0(Interface=C2=A0=3D=3D= =C2=A0NULL)=C2=A0=7B=0D=0A-=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0return=C2=A0= EFI_INVALID_PARAMETER;=0D=0A-=C2=A0=C2=A0=C2=A0=C2=A0=7D=C2=A0else=C2=A0=7B= =0D=0A-=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0*Interface=C2=A0=3D=C2=A0NULL;= =0D=0A-=C2=A0=C2=A0=C2=A0=C2=A0=7D=0D=0A+=C2=A0=C2=A0if=C2=A0((Attributes= =C2=A0=21=3D=C2=A0EFI_OPEN_PROTOCOL_TEST_PROTOCOL)=C2=A0&&=C2=A0(Interface= =C2=A0=3D=3D=C2=A0NULL))=C2=A0=7B=0D=0A+=C2=A0=C2=A0=C2=A0=C2=A0return=C2= =A0EFI_INVALID_PARAMETER;=0D=0A=C2=A0=C2=A0=C2=A0=7D=0D=0A=C2=A0=0D=0A=C2= =A0=C2=A0=C2=A0//=0D=0A=40=40=C2=A0-1078,12=C2=A0+1074,6=C2=A0=40=40=C2=A0C= oreOpenProtocol=C2=A0(=0D=0A=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0goto=C2=A0Done;= =0D=0A=C2=A0=C2=A0=C2=A0=7D=0D=0A=C2=A0=0D=0A-=C2=A0=C2=A0//=0D=0A-=C2=A0= =C2=A0//=C2=A0This=C2=A0is=C2=A0the=C2=A0protocol=C2=A0interface=C2=A0entry= =C2=A0for=C2=A0this=C2=A0protocol=0D=0A-=C2=A0=C2=A0//=0D=0A-=C2=A0=C2=A0if= =C2=A0(Attributes=C2=A0=21=3D=C2=A0EFI_OPEN_PROTOCOL_TEST_PROTOCOL)=C2=A0= =7B=0D=0A-=C2=A0=C2=A0=C2=A0=C2=A0*Interface=C2=A0=3D=C2=A0Prot->Interface;= =0D=0A-=C2=A0=C2=A0=7D=0D=0A=C2=A0=C2=A0=C2=A0Status=C2=A0=3D=C2=A0EFI_SUCC= ESS;=0D=0A=C2=A0=0D=0A=C2=A0=C2=A0=C2=A0ByDriver=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=3D=C2=A0FALSE;=0D=0A=40=40=C2=A0-1177,8=C2=A0+1167,28= =C2=A0=40=40=C2=A0CoreOpenProtocol=C2=A0(=0D=0A=C2=A0=C2=A0=C2=A0=7D=0D=0A= =C2=A0=0D=0A=C2=A0Done:=0D=0A+=0D=0A+=C2=A0=C2=A0if=C2=A0(Attributes=C2=A0= =21=3D=C2=A0EFI_OPEN_PROTOCOL_TEST_PROTOCOL)=C2=A0=7B=0D=0A+=C2=A0=C2=A0=C2= =A0=C2=A0//=0D=0A+=C2=A0=C2=A0=C2=A0=C2=A0//=C2=A0Keep=C2=A0Interface=C2=A0= unmodified=C2=A0in=C2=A0case=C2=A0of=C2=A0any=C2=A0Error=0D=0A+=C2=A0=C2=A0= =C2=A0=C2=A0//=C2=A0except=C2=A0EFI_ALREADY_STARTED=C2=A0and=C2=A0EFI_UNSUP= PORTED.=0D=0A+=C2=A0=C2=A0=C2=A0=C2=A0//=0D=0A+=C2=A0=C2=A0=C2=A0=C2=A0if= =C2=A0(=21EFI_ERROR=C2=A0(Status)=C2=A0=7C=7C=C2=A0Status=C2=A0=3D=3D=C2=A0= EFI_ALREADY_STARTED)=C2=A0=7B=0D=0A+=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0//= =0D=0A+=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0//=C2=A0EFI_ALREADY_STARTED=C2= =A0is=C2=A0not=C2=A0an=C2=A0error=C2=A0for=C2=A0bus=C2=A0driver.=0D=0A+=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0//=C2=A0Return=C2=A0the=C2=A0corresponding= =C2=A0protocol=C2=A0interface.=C2=A0=0D=0A+=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0//=0D=0A+=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0*Interface=C2=A0=3D=C2= =A0Prot->Interface;=0D=0A+=C2=A0=C2=A0=C2=A0=C2=A0=7D=C2=A0else=C2=A0if=C2= =A0(Status=C2=A0=3D=3D=C2=A0EFI_UNSUPPORTED)=C2=A0=7B=0D=0A+=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0//=0D=0A+=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0//=C2=A0R= eturn=C2=A0NULL=C2=A0Interface=C2=A0if=C2=A0Unsupported=C2=A0Protocol.=0D= =0A+=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0//=0D=0A+=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0*Interface=C2=A0=3D=C2=A0NULL;=0D=0A+=C2=A0=C2=A0=C2=A0=C2=A0= =7D=0D=0A+=C2=A0=C2=A0=7D=0D=0A+=0D=0A=C2=A0=C2=A0=C2=A0//=0D=0A-=C2=A0=C2= =A0//=C2=A0Done.=C2=A0Release=C2=A0the=C2=A0database=C2=A0lock=C2=A0are=C2= =A0return=0D=0A+=C2=A0=C2=A0//=C2=A0Done.=C2=A0Release=C2=A0the=C2=A0databa= se=C2=A0lock=C2=A0and=C2=A0return=0D=0A=C2=A0=C2=A0=C2=A0//=0D=0A=C2=A0=C2= =A0=C2=A0CoreReleaseProtocolLock=C2=A0();=0D=0A=C2=A0=C2=A0=C2=A0return=C2= =A0Status;=0D=0A--=C2=A0=0D=0A2.7.0.windows.1=0D=0A=C2=A0=0D=0A=C2=A0=0D=0A= =C2=A0