netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: brussell@brocade.com
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH net-next 1/2] nsh: encapsulation module
Date: Thu, 11 Feb 2016 11:39:46 -0500 (EST)	[thread overview]
Message-ID: <20160211.113946.1731145198917250643.davem@davemloft.net> (raw)
In-Reply-To: <1455186914-8952-3-git-send-email-brussell@brocade.com>

From: Brian Russell <brussell@brocade.com>
Date: Thu, 11 Feb 2016 10:35:13 +0000

> +++ b/include/net/nsh.h
> +struct nsh_metadata {
> +	u_short class;
> +	u_char crit;
> +	u_char type;
> +	u_int len;  /* 4 byte words */
> +	void *data;

Do not use these shorthands, spell out "unsigned short" etc. explicitly.

But in these cases you should be using fixed sized types like "u16".

Also, in a header file such as this one which is private to the kernel
you should be using the variants of these types without the leading underscores.

  parent reply	other threads:[~2016-02-11 16:39 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-11 10:35 [PATCH net-next 0/2] NSH and VxLAN-GPE Brian Russell
2016-02-11 10:35 ` [PATCH iproute2 net-next] iplink: vxlan: gpe support Brian Russell
2016-02-11 10:35 ` [PATCH net-next 1/2] nsh: encapsulation module Brian Russell
2016-02-11 16:17   ` Robert Shearman
2016-02-11 16:39     ` Brian Russell
2016-02-11 16:39   ` David Miller [this message]
2016-02-11 19:54     ` Brian Russell
2016-02-11 10:35 ` [PATCH net-next 2/2] vxlan: support GPE/NSH Brian Russell

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=20160211.113946.1731145198917250643.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=brussell@brocade.com \
    --cc=netdev@vger.kernel.org \
    /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).