From: Thomas Monjalon <thomas.monjalon@6wind.com>
To: Bruce Richardson <bruce.richardson@intel.com>
Cc: dev@dpdk.org, Olivier Matz <olivier.matz@6wind.com>
Subject: Re: [dpdk-dev] [PATCH] kvargs: make pointers in string arrays const
Date: Fri, 13 Jan 2017 19:29:09 +0100 [thread overview]
Message-ID: <4014355.qTqRYq3TGR@xps13> (raw)
In-Reply-To: <20170113184445.7d719306@platinum>
2017-01-13 18:44, Olivier Matz:
> On Thu, 12 Jan 2017 16:18:27 +0000, Bruce Richardson
> <bruce.richardson@intel.com> wrote:
> > Change the parameters of functions from const char *valid[] to
> > const char * const valid[]. This additional const is needed to
> > allow us to fix some checkpatch warnings, as well as being good
> > programming practice.
> >
> > For the checkpatch warnings, if we have a set of command line
> > args that we want to check defined as:
> > static const char *args[] = { "arg1", "arg2", NULL };
> > kvlist = rte_kvargs_parse(params, args);
> >
> > checkpatch will complain:
> > WARNING:STATIC_CONST_CHAR_ARRAY: static const char *
> > array should probably be static const char * const
> >
> > Adding the additional const to the definition of the args
> > will then trigger a compiler error in the absense of this
> > change to the kvargs library, as we lose the const in the
> > call to kvargs_parse.
> >
> > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
>
> Acked-by: Olivier Matz <olivier.matz@6wind.com>
Applied, thanks
prev parent reply other threads:[~2017-01-13 18:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-12 16:18 Bruce Richardson
2017-01-13 17:44 ` Olivier Matz
2017-01-13 18:29 ` Thomas Monjalon [this message]
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=4014355.qTqRYq3TGR@xps13 \
--to=thomas.monjalon@6wind.com \
--cc=bruce.richardson@intel.com \
--cc=dev@dpdk.org \
--cc=olivier.matz@6wind.com \
/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).