From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id 5457C5585 for ; Fri, 2 Dec 2016 17:17:01 +0100 (CET) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga105.fm.intel.com with ESMTP; 02 Dec 2016 08:17:00 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,287,1477983600"; d="scan'208";a="1067141160" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by orsmga001.jf.intel.com with ESMTP; 02 Dec 2016 08:16:59 -0800 Received: from fmsmsx116.amr.corp.intel.com (10.18.116.20) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.248.2; Fri, 2 Dec 2016 08:16:59 -0800 Received: from fmsmsx105.amr.corp.intel.com ([169.254.4.166]) by fmsmsx116.amr.corp.intel.com ([169.254.2.124]) with mapi id 14.03.0248.002; Fri, 2 Dec 2016 08:16:59 -0800 From: "Walker, Benjamin" To: "shreyansh.jain@nxp.com" CC: "dev@dpdk.org" Thread-Topic: [PATCH v2 3/7] pci: Pass rte_pci_addr to functions instead of separate args Thread-Index: AQHSRcVJI1Vfb/ZIuEqGwaiTMjq3jKDzMlyAgAI3N4A= Date: Fri, 2 Dec 2016 16:16:58 +0000 Message-ID: <1480695417.4630.45.camel@intel.com> References: <1479929804-19614-1-git-send-email-benjamin.walker@intel.com> <1479931644-78960-1-git-send-email-benjamin.walker@intel.com> <1479931644-78960-3-git-send-email-benjamin.walker@intel.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [143.182.136.82] Content-Type: text/plain; charset="utf-8" Content-ID: Content-Transfer-Encoding: base64 MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v2 3/7] pci: Pass rte_pci_addr to functions instead of separate args X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Dec 2016 16:17:01 -0000 T24gVGh1LCAyMDE2LTEyLTAxIGF0IDExOjU2ICswNTMwLCBTaHJleWFuc2ggSmFpbiB3cm90ZToN Cj4gSGVsbG8gQmVuLA0KPiANCj4gT24gVGh1cnNkYXkgMjQgTm92ZW1iZXIgMjAxNiAwMTozNyBB TSwgQmVuIFdhbGtlciB3cm90ZToNCj4gPiANCj4gPiBJbnN0ZWFkIG9mIHBhc3NpbmcgZG9tYWlu LCBidXMsIGRldmlkLCBmdW5jLCBqdXN0IHBhc3MNCj4gPiBhbiBydGVfcGNpX2FkZHIuDQo+ID4g DQo+ID4gU2lnbmVkLW9mZi1ieTogQmVuIFdhbGtlciA8YmVuamFtaW4ud2Fsa2VyQGludGVsLmNv bT4NCj4gPiAtLS0NCj4gPiDCoGxpYi9saWJydGVfZWFsL2xpbnV4YXBwL2VhbC9lYWxfcGNpLmMg fCAzMiArKysrKysrKysrKysrLS0tLS0tLS0tLS0tLS0tLS0tLQ0KPiA+IMKgMSBmaWxlIGNoYW5n ZWQsIDEzIGluc2VydGlvbnMoKyksIDE5IGRlbGV0aW9ucygtKQ0KPiA+IA0KPiA+IGRpZmYgLS1n aXQgYS9saWIvbGlicnRlX2VhbC9saW51eGFwcC9lYWwvZWFsX3BjaS5jDQo+ID4gYi9saWIvbGli cnRlX2VhbC9saW51eGFwcC9lYWwvZWFsX3BjaS5jDQo+ID4gaW5kZXggODc2YmEzOC4uMDczYWY1 ZiAxMDA2NDQNCj4gPiAtLS0gYS9saWIvbGlicnRlX2VhbC9saW51eGFwcC9lYWwvZWFsX3BjaS5j DQo+ID4gKysrIGIvbGliL2xpYnJ0ZV9lYWwvbGludXhhcHAvZWFsL2VhbF9wY2kuYw0KPiA+IEBA IC0yNjcsOCArMjY3LDcgQEAgcGNpX3BhcnNlX3N5c2ZzX3Jlc291cmNl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