From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.88; helo=mga01.intel.com; envelope-from=star.zeng@intel.com; receiver=edk2-devel@lists.01.org Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) (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 327A8210E38D9 for ; Thu, 9 Aug 2018 03:15:38 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 Aug 2018 03:15:37 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.53,214,1531810800"; d="scan'208";a="223232369" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by orsmga004.jf.intel.com with ESMTP; 09 Aug 2018 03:15:37 -0700 Received: from fmsmsx121.amr.corp.intel.com (10.18.125.36) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 9 Aug 2018 03:15:37 -0700 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by fmsmsx121.amr.corp.intel.com (10.18.125.36) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 9 Aug 2018 03:15:37 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.226]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.205]) with mapi id 14.03.0319.002; Thu, 9 Aug 2018 18:15:34 +0800 From: "Zeng, Star" To: Laszlo Ersek , "Zhang, Shenglei" , "edk2-devel@lists.01.org" CC: "Dong, Eric" , "Zeng, Star" Thread-Topic: [edk2] [PATCH 03/26] MdeModulePkg AtaAtapiPassThru: Remove redundant functions Thread-Index: AQHULvR3JGafxPb80E6leZP17vk7I6S1oogAgAGTHWA= Date: Thu, 9 Aug 2018 10:15:34 +0000 Message-ID: <0C09AFA07DD0434D9E2A0C6AEB0483103BBAA445@shsmsx102.ccr.corp.intel.com> References: <20180808084712.34696-1-shenglei.zhang@intel.com> <20180808084712.34696-4-shenglei.zhang@intel.com> In-Reply-To: Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [PATCH 03/26] MdeModulePkg AtaAtapiPassThru: Remove redundant functions X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Aug 2018 10:15:38 -0000 Content-Language: en-US Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 SSBhZ3JlZSB3aXRoIExhc3psby4gUmV2aWV3ZWQtYnk6IFN0YXIgWmVuZyA8c3Rhci56ZW5nQGlu dGVsLmNvbT4uDQpUaGUgY29tbWl0IGxvZyBvbmx5IG1lbnRpb25zIHRoZSBjaGFuZ2VzIGluIEFo Y2lNb2RlLmMsIGJ1dCBub3QgSWRlTW9kZS5jLg0KDQoNClRoYW5rcywNClN0YXINCi0tLS0tT3Jp Z2luYWwgTWVzc2FnZS0tLS0tDQpGcm9tOiBMYXN6bG8gRXJzZWsgW21haWx0bzpsZXJzZWtAcmVk aGF0LmNvbV0gDQpTZW50OiBUaHVyc2RheSwgQXVndXN0IDksIDIwMTggMjoxMiBBTQ0KVG86IFpo YW5nLCBTaGVuZ2xlaSA8c2hlbmdsZWkuemhhbmdAaW50ZWwuY29tPjsgZWRrMi1kZXZlbEBsaXN0 cy4wMS5vcmcNCkNjOiBEb25nLCBFcmljIDxlcmljLmRvbmdAaW50ZWwuY29tPjsgWmVuZywgU3Rh ciA8c3Rhci56ZW5nQGludGVsLmNvbT4NClN1YmplY3Q6IFJlOiBbZWRrMl0gW1BBVENIIDAzLzI2 X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