From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.droids-corp.org (zoll.droids-corp.org [94.23.50.67]) by dpdk.org (Postfix) with ESMTP id 406CF3989 for ; Mon, 8 Sep 2014 09:50:39 +0200 (CEST) Received: from was59-1-82-226-113-214.fbx.proxad.net ([82.226.113.214] helo=[192.168.0.10]) by mail.droids-corp.org with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1XQtpy-0007dy-LS; Mon, 08 Sep 2014 09:58:13 +0200 Message-ID: <540D60F0.2050403@6wind.com> Date: Mon, 08 Sep 2014 09:55:28 +0200 From: Olivier MATZ User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Icedove/24.5.0 MIME-Version: 1.0 To: Bruce Richardson , dev@dpdk.org 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> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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: Mon, 08 Sep 2014 07:50:39 -0000 Hello Bruce, On 08/28/2014 05:42 PM, Bruce Richardson wrote: > 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 = 1. This makes things > shorter and means that the structure doesn't need as many updates for > other fields being renamed or moved. > > 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. > > Changes in v2: > * None > > Signed-off-by: Bruce Richardson Acked-by: Olivier Matz