From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id E9BAAA547 for ; Fri, 5 Sep 2014 18:09:34 +0200 (CEST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP; 05 Sep 2014 09:14:18 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.04,474,1406617200"; d="scan'208";a="595179401" Received: from irsmsx102.ger.corp.intel.com ([163.33.3.155]) by fmsmga002.fm.intel.com with ESMTP; 05 Sep 2014 09:14:17 -0700 Received: from irsmsx153.ger.corp.intel.com (163.33.192.75) by IRSMSX102.ger.corp.intel.com (163.33.3.155) with Microsoft SMTP Server (TLS) id 14.3.195.1; Fri, 5 Sep 2014 17:14:16 +0100 Received: from irsmsx108.ger.corp.intel.com ([169.254.11.157]) by IRSMSX153.ger.corp.intel.com ([169.254.9.160]) with mapi id 14.03.0195.001; Fri, 5 Sep 2014 17:14:16 +0100 From: "De Lara Guarch, Pablo" To: "Richardson, Bruce" , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH v2 1/6] ixgbe: put only non-zero initializer in definition Thread-Index: AQHPwto+EuISDSUAFUeoAZSpztcD6Zvywx8A Date: Fri, 5 Sep 2014 16:14:15 +0000 Message-ID: References: <1409154628-30825-1-git-send-email-bruce.richardson@intel.com> <1409240559-14447-2-git-send-email-bruce.richardson@intel.com> In-Reply-To: <1409240559-14447-2-git-send-email-bruce.richardson@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [163.33.239.181] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v2 1/6] ixgbe: put only non-zero initializer in definition 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, 05 Sep 2014 16:09:35 -0000 > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Bruce Richardson > Sent: Thursday, August 28, 2014 4:43 PM > To: dev@dpdk.org > Subject: [dpdk-dev] [PATCH v2 1/6] ixgbe: put only non-zero initializer i= n > definition >=20 > Since all unspecified fields in an initializer are assumed to be zero we > can simplify the empty mbuf definition in the vector driver to only use > the fields that are non-zero, i.e. just nb_segs =3D 1. This makes things > shorter and means that the structure doesn't need as many updates for > other fields being renamed or moved. >=20 > The variable itself is never modified and only used by a single function > so it can be made const and local to the using function. >=20 > Changes in v2: > * None >=20 > Signed-off-by: Bruce Richardson Acked-by Pablo de Lara