DPDK patches and discussions
 help / color / mirror / Atom feed
From: Don Provan <dprovan@bivio.net>
To: "Butler, Siobhan A" <siobhan.a.butler@intel.com>,
	Thomas Monjalon <thomas.monjalon@6wind.com>,
	"dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] tools brainstorming
Date: Wed, 8 Apr 2015 21:55:24 +0000	[thread overview]
Message-ID: <CY1PR0101MB0987DB8195D7A2BEFF20BC1BA0FC0@CY1PR0101MB0987.prod.exchangelabs.com> (raw)
In-Reply-To: <0C5AFCA4B3408848ADF2A3073F7D8CC86D58F9C2@IRSMSX109.ger.corp.intel.com>

>NOTE Please avoid, as much as possible, including headers from other headers file. Doing so should be properly explained and justified.

Actually, I think a *failure* to #include other header files that this header file depends on should be what needs explained and justified. It drives me crazy when a header file forces me to figure out what header files it depends on and then forces me to include them in my sources even though my sources don't use them. Especially when #include is such a straightforward way to document the dependency while keeping me out of it.

Or are you only talking about when the header file doesn't depend on the header files its #including? If so, then I'd prefer ruling it out entirely rather than saying it needs to be justified.

>For consistency, getopt(3) should be used to parse options.

I assume this means the getopt() family, and I'd expect getopt_long() to be used normally. (If it were me, I'd *encourage* getopt_long() over getopt().)

>not:: 
> if (!*p)

I'm not sure why you'd bother to rule out this common idiom or the similar NULL pointer check. Are "if (*p)" and "if (p)" also prohibited, or just their negations?

>Values in return statements should be enclosed in parentheses.

Please don't encourage people to have this silly habit. It makes no more sense than insisting variables be set with "x = (-1)".

>static void
> usage()

This has nothing to do with the point being made here in your document, but surely you want to insist on "static void usage(void)", right? In fact, you might mention parameterless functions explicitly in the section on function declarations.

Everything else looks pretty cool. I'm surprised and impressed.
-don provan

  parent reply	other threads:[~2015-04-08 21:55 UTC|newest]

Thread overview: 62+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-20 14:51 Thomas Monjalon
2015-03-20 15:07 ` Butler, Siobhan A
2015-03-23 16:18   ` Thomas Monjalon
2015-03-23 16:50     ` Butler, Siobhan A
2015-03-23 17:35     ` Neil Horman
2015-03-23 23:38     ` Matthew Hall
2015-03-20 15:16 ` Neil Horman
2015-03-23 16:22   ` Jim Thompson
2015-03-23 17:44     ` Neil Horman
2015-03-23 21:56       ` Jim Thompson
2015-03-23 23:01         ` Neil Horman
2015-03-23 16:26   ` Thomas Monjalon
2015-03-20 15:18 ` Simon Kågström
2015-03-23 16:29   ` Thomas Monjalon
2015-03-24  8:31     ` Simon Kågström
2015-03-23  8:41 ` Cao, Waterman
2015-03-23 16:18 ` Mcnamara, John
2015-04-08 10:43 ` Butler, Siobhan A
2015-04-08 11:43   ` Neil Horman
2015-04-08 12:16     ` Butler, Siobhan A
2015-04-08 12:20       ` Butler, Siobhan A
2015-04-08 13:11       ` Neil Horman
2015-04-08 14:40         ` Butler, Siobhan A
2015-04-08 15:39           ` Neil Horman
2015-04-08 22:29           ` Jay Rolette
2015-04-08 22:38             ` Stephen Hemminger
2015-04-09 16:31               ` Jay Rolette
2015-04-09 19:16                 ` Neil Horman
2015-04-09 19:38                   ` Jay Rolette
2015-04-09 20:14                     ` Neil Horman
2015-04-09 21:10                     ` Wiles, Keith
2015-04-09 21:23                       ` Stephen Hemminger
2015-04-09 21:29                         ` Wiles, Keith
2015-04-10  0:16                           ` Neil Horman
2015-04-10  0:26                       ` Neil Horman
2015-04-10  1:49                         ` Wiles, Keith
2015-04-10 11:41                           ` Neil Horman
2015-04-10 14:43                             ` Wiles, Keith
2015-04-08 14:16   ` Wiles, Keith
2015-04-14 14:50     ` Bruce Richardson
2015-04-08 15:21   ` Wiles, Keith
2015-04-08 15:53   ` Wiles, Keith
2015-04-08 16:16     ` Thomas Monjalon
2015-04-08 16:25       ` Wiles, Keith
2015-04-08 19:54       ` Butler, Siobhan A
2015-04-14 14:21         ` Bruce Richardson
2015-04-14 14:38           ` Neil Horman
2015-04-14 14:47             ` Thomas Monjalon
2015-04-14 14:54               ` Bruce Richardson
2015-04-14 14:52       ` Bruce Richardson
2015-04-14 15:24         ` Thomas Monjalon
2015-04-14 16:19           ` Wiles, Keith
2015-04-14 18:52             ` Wiles, Keith
2015-04-08 18:16   ` Stephen Hemminger
2015-04-08 18:58     ` Matthew Hall
2015-04-08 22:12       ` Stephen Hemminger
2015-04-08 19:51     ` Butler, Siobhan A
2015-04-14 15:29     ` Bruce Richardson
2015-04-08 21:55   ` Don Provan [this message]
2015-04-13 15:02   ` Neil Horman
2015-04-13 23:44     ` Stephen Hemminger
2015-04-16 10:49   ` 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=CY1PR0101MB0987DB8195D7A2BEFF20BC1BA0FC0@CY1PR0101MB0987.prod.exchangelabs.com \
    --to=dprovan@bivio.net \
    --cc=dev@dpdk.org \
    --cc=siobhan.a.butler@intel.com \
    --cc=thomas.monjalon@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).