From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-f172.google.com (mail-wi0-f172.google.com [209.85.212.172]) by dpdk.org (Postfix) with ESMTP id 00EDC593A for ; Wed, 22 Oct 2014 10:42:13 +0200 (CEST) Received: by mail-wi0-f172.google.com with SMTP id bs8so693444wib.5 for ; Wed, 22 Oct 2014 01:50:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:organization :user-agent:in-reply-to:references:mime-version :content-transfer-encoding:content-type; bh=vU2w31lW3rLEOMN4SvElshJqacxzDZYdoS+9iiDN+M0=; b=PBK8WMZI20GU8DxYBnKcywVYNH2VxyXytE2tfKFo9RfPW9gyg9STCCdi617mJvxDKq CH+vAX+a5yl6Or0Vl+v11d/8VxC83SDlPeTkBrNKoRU7LRmr6tKicR0/I+FkV4Ud278F 5ATW9o5kZ0oP0eQXBxRVlsHfrIuZsuPA0TTK/2ozDKuA6Co9nm5vOMW8YXedKxKqzTlX qa6Z5QW9eH+ZQHAb3PG4QZMH2l3r8qbsQg+ld88eEMPPaFXlNK3ob8hown98J00q892v lI+7QQxjr+7mUAbx6qpXXm53OnFRzJjFrxVSPRRDKZO2iDuTC48/tRzcCk5TxMloyCYO 0Jkw== X-Gm-Message-State: ALoCoQmXynrP0ELJ2E7DdN4St2GC62w9CSiAJhcRjKhUCLYUrXTs2D2x9XH/pBpunBcKa4Z1nMi7 X-Received: by 10.180.87.73 with SMTP id v9mr36288396wiz.22.1413967833608; Wed, 22 Oct 2014 01:50:33 -0700 (PDT) Received: from xps13.localnet (136-92-190-109.dsl.ovh.fr. [109.190.92.136]) by mx.google.com with ESMTPSA id bc5sm18096716wjb.14.2014.10.22.01.50.32 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 22 Oct 2014 01:50:33 -0700 (PDT) From: Thomas Monjalon To: Marc Sune Date: Wed, 22 Oct 2014 10:50:17 +0200 Message-ID: <4364683.dn9JoP4MXp@xps13> Organization: 6WIND User-Agent: KMail/4.14.1 (Linux/3.16.4-1-ARCH; KDE/4.14.1; x86_64; ; ) In-Reply-To: <54476DF9.6060906@bisdn.de> References: <1ED644BD7E0A5F4091CF203DAFB8E4CC01D8288F@SHSMSX101.ccr.corp.intel.com> <2234340.4n5qb1rBlX@xps13> <54476DF9.6060906@bisdn.de> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH] KNI: fix compilation warning 'missing-field-initializers' 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: Wed, 22 Oct 2014 08:42:14 -0000 2014-10-22 10:42, Marc Sune: > The mutex needs to be initialized to RTE_SPINLOCK_INITIALIZER(0) too, or > move the initialization of the mutex to rte_kni_init(). RTE_SPINLOCK_INITIALIZER is { 0 } By initializing one field, all other fields are set to 0, so spinlock also. Just choose one field and it's OK. It should be tested with ICC also but I think it's OK. > I can prepare a second patch with one or the other option, if you want. Yes please. > On 22/10/14 10:37, Thomas Monjalon wrote: > > 2014-10-22 09:10, Marc Sune: > >> Fix for compilation warning 'missing-field-initializers' for some > >> GCC and clang versions introduced in commit 0c6bc8e > >> > >> Signed-off-by: Marc Sune > > It's not needed to initialize all fields. > > This should be sufficient: > > +static struct rte_kni_memzone_pool kni_memzone_pool = {.initialized = 0}; Please Marc, don't top post. Thanks -- Thomas