netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Graf <tgraf@suug.ch>
To: Hong Zhiguo <honkiko@gmail.com>
Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
	davem@davemloft.net
Subject: Re: [PATCH 4/6] gdm72xx: replace obsolete NLMSG_* with type safe nlmsg_*
Date: Thu, 28 Mar 2013 14:37:09 +0000	[thread overview]
Message-ID: <20130328143709.GE23043@casper.infradead.org> (raw)
In-Reply-To: <1364403137-32806-1-git-send-email-honkiko@gmail.com>

On 03/28/13 at 12:52am, Hong Zhiguo wrote:
> Signed-off-by: Hong Zhiguo <honkiko@gmail.com>
> ---
>  drivers/staging/gdm72xx/netlink_k.c |   12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/staging/gdm72xx/netlink_k.c b/drivers/staging/gdm72xx/netlink_k.c
> index 52c25ba..c1239aa 100644
> --- a/drivers/staging/gdm72xx/netlink_k.c
> +++ b/drivers/staging/gdm72xx/netlink_k.c
> @@ -25,12 +25,12 @@
>  
>  #define ND_MAX_GROUP			30
>  #define ND_IFINDEX_LEN			sizeof(int)
> -#define ND_NLMSG_SPACE(len)		(NLMSG_SPACE(len) + ND_IFINDEX_LEN)
> +#define ND_NLMSG_SPACE(len)		(nlmsg_total_size(len) + ND_IFINDEX_LEN)
>  #define ND_NLMSG_DATA(nlh) \
> -	((void *)((char *)NLMSG_DATA(nlh) + ND_IFINDEX_LEN))
> +	((void *)((char *)nlmsg_data(nlh) + ND_IFINDEX_LEN))
>  #define ND_NLMSG_S_LEN(len)		(len+ND_IFINDEX_LEN)
>  #define ND_NLMSG_R_LEN(nlh)		(nlh->nlmsg_len-ND_IFINDEX_LEN)
> -#define ND_NLMSG_IFIDX(nlh)		NLMSG_DATA(nlh)
> +#define ND_NLMSG_IFIDX(nlh)		nlmsg_data(nlh)
>  #define ND_MAX_MSG_LEN			8096

This is not pretty at all but outside of the context of your patch.

Acked-by: Thomas Graf <tgraf@suug.ch>

  reply	other threads:[~2013-03-28 14:37 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-27 16:52 [PATCH 4/6] gdm72xx: replace obsolete NLMSG_* with type safe nlmsg_* Hong Zhiguo
2013-03-28 14:37 ` Thomas Graf [this message]
2013-03-28 18:28 ` David Miller

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=20130328143709.GE23043@casper.infradead.org \
    --to=tgraf@suug.ch \
    --cc=davem@davemloft.net \
    --cc=honkiko@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --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).