From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id B45A82BB8 for ; Fri, 4 Mar 2016 14:17:44 +0100 (CET) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga104.fm.intel.com with ESMTP; 04 Mar 2016 05:17:44 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,535,1449561600"; d="scan'208";a="929590858" Received: from irsmsx108.ger.corp.intel.com ([163.33.3.3]) by fmsmga002.fm.intel.com with ESMTP; 04 Mar 2016 05:17:43 -0800 Received: from irsmsx105.ger.corp.intel.com ([169.254.7.35]) by IRSMSX108.ger.corp.intel.com ([169.254.11.13]) with mapi id 14.03.0248.002; Fri, 4 Mar 2016 13:17:42 +0000 From: "Ananyev, Konstantin" To: "Yigit, Ferruh" , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH] igb_uio: cast private data to correct struct type Thread-Index: AQHRdW9rhx2mIhLpsEm+n/sL65+7MJ9JRTzQ Date: Fri, 4 Mar 2016 13:17:41 +0000 Message-ID: <2601191342CEEE43887BDE71AB97725836B163EF@irsmsx105.ger.corp.intel.com> References: <1457024900-18245-1-git-send-email-ferruh.yigit@intel.com> In-Reply-To: <1457024900-18245-1-git-send-email-ferruh.yigit@intel.com> Accept-Language: en-IE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiM2VjMjA3MjUtMWYzMS00MzYzLWEwMTUtZDBjMjkzZWMyYjY4IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6Ino0SjVsWkZuTCtPTzhuNDNheCtVVlpiUGZWTGJ6WllsWktXclU5UVdVb1k9In0= x-ctpclassification: CTP_IC x-originating-ip: [163.33.239.182] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] igb_uio: cast private data to correct struct type X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Mar 2016 13:17:45 -0000 > Subject: [dpdk-dev] [PATCH] igb_uio: cast private data to correct struct = type >=20 > Fixes: af75078fece3 ("first public release") >=20 > This was working fine because addresses of two structs are same: >=20 > struct A { > struct B b; > } a; >=20 > As above sample "a" and "b" has same address. >=20 > Now casting private data back to the correct struct type, to the one > stored. >=20 > Signed-off-by: Ferruh Yigit > --- Acked-by: Konstantin Ananyev > -- > 2.5.0