DPDK patches and discussions
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas.monjalon@6wind.com>
To: Marc Sune <marc.sune@bisdn.de>
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH] KNI: fix compilation warning 'missing-field-initializers'
Date: Wed, 22 Oct 2014 10:50:17 +0200	[thread overview]
Message-ID: <4364683.dn9JoP4MXp@xps13> (raw)
In-Reply-To: <54476DF9.6060906@bisdn.de>

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 <marc.sune@bisdn.de>
> > 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

  reply	other threads:[~2014-10-22  8:42 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-17 22:51 [dpdk-dev] [PATCH v4] KNI: use a memzone pool for KNI alloc/release Marc Sune
2014-10-21  4:57 ` Zhang, Helin
2014-10-21  8:29 ` Thomas Monjalon
2014-10-21 10:52   ` Marc Sune
2014-10-22  5:51     ` Liu, Jijiang
2014-10-22  7:10       ` [dpdk-dev] [PATCH] KNI: fix compilation warning 'missing-field-initializers' Marc Sune
2014-10-22  7:14         ` Marc Sune
2014-10-22  8:11         ` Liu, Jijiang
2014-10-22  8:37         ` Thomas Monjalon
2014-10-22  8:42           ` Marc Sune
2014-10-22  8:50             ` Thomas Monjalon [this message]
2014-10-22  9:49               ` Marc Sune
2014-10-22  9:59                 ` Richardson, Bruce
2014-10-22 10:00                 ` Thomas Monjalon
2014-10-22 10:23                   ` [dpdk-dev] [PATCH v2] " Marc Sune
2014-10-22 10:35                     ` Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4364683.dn9JoP4MXp@xps13 \
    --to=thomas.monjalon@6wind.com \
    --cc=dev@dpdk.org \
    --cc=marc.sune@bisdn.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).