All of lore.kernel.org
 help / color / mirror / Atom feed
From: Brian Haley <brian.haley@hp.com>
To: Hong Zhiguo <honkiko@gmail.com>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	davem@davemloft.net, stephen@networkplumber.org, tgraf@suug.ch
Subject: Re: [PATCH 1/6] net-next: replace obsolete NLMSG_* with type safe nlmsg_*
Date: Thu, 28 Mar 2013 22:57:41 -0400	[thread overview]
Message-ID: <51550325.6040000@hp.com> (raw)
In-Reply-To: <1364402824-32680-1-git-send-email-honkiko@gmail.com>

On 03/27/2013 12:47 PM, Hong Zhiguo wrote:
> Signed-off-by: Hong Zhiguo <honkiko@gmail.com>

> diff --git a/net/ieee802154/netlink.c b/net/ieee802154/netlink.c
> index 97351e1..9247252 100644
> --- a/net/ieee802154/netlink.c
> +++ b/net/ieee802154/netlink.c
> @@ -65,7 +65,7 @@ struct sk_buff *ieee802154_nl_create(int flags, u8 req)
>  int ieee802154_nl_mcast(struct sk_buff *msg, unsigned int group)
>  {
>  	/* XXX: nlh is right at the start of msg */
> -	void *hdr = genlmsg_data(NLMSG_DATA(msg->data));
> +	void *hdr = genlmsg_data(nlmsg_data(msg->data));
>  
>  	if (genlmsg_end(msg, hdr) < 0)
>  		goto out;
> @@ -98,7 +98,7 @@ struct sk_buff *ieee802154_nl_new_reply(struct genl_info *info,
>  int ieee802154_nl_reply(struct sk_buff *msg, struct genl_info *info)
>  {
>  	/* XXX: nlh is right at the start of msg */
> -	void *hdr = genlmsg_data(NLMSG_DATA(msg->data));
> +	void *hdr = genlmsg_data(nlmsg_data(msg->data));
>  
>  	if (genlmsg_end(msg, hdr) < 0)
>  		goto out;

  CC [M]  net/ieee802154/netlink.o
net/ieee802154/netlink.c: In function ‘ieee802154_nl_mcast’:
net/ieee802154/netlink.c:68: warning: passing argument 1 of ‘nlmsg_data’ from
incompatible pointer type
include/net/netlink.h:302: note: expected ‘const struct nlmsghdr *’ but argument
is of type ‘unsigned char *’
net/ieee802154/netlink.c: In function ‘ieee802154_nl_reply’:
net/ieee802154/netlink.c:101: warning: passing argument 1 of ‘nlmsg_data’ from
incompatible pointer type
include/net/netlink.h:302: note: expected ‘const struct nlmsghdr *’ but argument
is of type ‘unsigned char *’

-Brian

  parent reply	other threads:[~2013-03-29  2:57 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-27 16:47 [PATCH 1/6] net-next: replace obsolete NLMSG_* with type safe nlmsg_* Hong Zhiguo
2013-03-28 14:32 ` Thomas Graf
2013-03-28 16:08   ` Hong zhi guo
2013-03-28 18:01     ` Thomas Graf
2013-03-28 18:00   ` David Miller
2013-03-28 18:28 ` David Miller
2013-03-29  2:57 ` Brian Haley [this message]
2013-03-29 13:22 ` [PATCH] netlink: fix the warning introduced by netlink API replacement Hong Zhiguo
2013-03-29 13:58   ` Thomas Graf
2013-03-29 15:09 ` [PATCH v2 net-next] " Hong Zhiguo
2013-03-29 18:45   ` 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=51550325.6040000@hp.com \
    --to=brian.haley@hp.com \
    --cc=davem@davemloft.net \
    --cc=honkiko@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=stephen@networkplumber.org \
    --cc=tgraf@suug.ch \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.