From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id C55705B04 for ; Tue, 27 Jan 2015 05:56:02 +0100 (CET) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga103.jf.intel.com with ESMTP; 26 Jan 2015 20:51:35 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.09,472,1418112000"; d="scan'208";a="668071209" Received: from pgsmsx103.gar.corp.intel.com ([10.221.44.82]) by fmsmga002.fm.intel.com with ESMTP; 26 Jan 2015 20:55:50 -0800 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by PGSMSX103.gar.corp.intel.com (10.221.44.82) with Microsoft SMTP Server (TLS) id 14.3.195.1; Tue, 27 Jan 2015 12:55:46 +0800 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.238]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.64]) with mapi id 14.03.0195.001; Tue, 27 Jan 2015 12:55:44 +0800 From: "Liang, Cunming" To: Stephen Hemminger Thread-Topic: [dpdk-dev] [PATCH v1 09/15] malloc: fix the issue of SOCKET_ID_ANY Thread-Index: AQHQNhvmtreipyfcvE2yj6RbnCeYrZzQ9E+AgAJ5vYA= Date: Tue, 27 Jan 2015 04:55:44 +0000 Message-ID: References: <1417589628-43666-1-git-send-email-cunming.liang@intel.com> <1421914598-2747-1-git-send-email-cunming.liang@intel.com> <1421914598-2747-10-git-send-email-cunming.liang@intel.com> <20150125230449.3dbf4306@uryu.home.lan> In-Reply-To: <20150125230449.3dbf4306@uryu.home.lan> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] [PATCH v1 09/15] malloc: fix the issue of SOCKET_ID_ANY 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: Tue, 27 Jan 2015 04:56:04 -0000 > -----Original Message----- > From: Stephen Hemminger [mailto:stephen@networkplumber.org] > Sent: Sunday, January 25, 2015 4:05 PM > To: Liang, Cunming > Cc: dev@dpdk.org > Subject: Re: [dpdk-dev] [PATCH v1 09/15] malloc: fix the issue of SOCKET_= ID_ANY >=20 > On Thu, 22 Jan 2015 16:16:32 +0800 > Cunming Liang wrote: >=20 > > - return rte_socket_id(); > > + unsigned socket_id =3D rte_socket_id(); > > + > > + if (socket_id =3D=3D (unsigned)SOCKET_ID_ANY) >=20 > I prefer not casting -1 to unsigned it will cause warnings. > It is better to make socket_id an integer and then have > the implicit cast in the return. [Liang, Cunming] I didn't got warning about it, in which version of compile= r complain it ?