From: Hong Zhiguo <honkiko@gmail.com>
To: netdev@vger.kernel.org
Cc: davem@davemloft.net, stephen@networkplumber.org,
brian.haley@hp.com, tgraf@suug.ch
Subject: [PATCH v2 net-next] netlink: fix the warning introduced by netlink API replacement
Date: Fri, 29 Mar 2013 23:09:35 +0800 [thread overview]
Message-ID: <1364569775-4419-1-git-send-email-honkiko@gmail.com> (raw)
In-Reply-To: <1364402824-32680-1-git-send-email-honkiko@gmail.com>
Signed-off-by: Hong Zhiguo <honkiko@gmail.com>
---
net/ieee802154/netlink.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/net/ieee802154/netlink.c b/net/ieee802154/netlink.c
index 9247252..7e49bbc 100644
--- a/net/ieee802154/netlink.c
+++ b/net/ieee802154/netlink.c
@@ -64,8 +64,8 @@ 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));
+ struct nlmsghdr *nlh = nlmsg_hdr(msg);
+ void *hdr = genlmsg_data(nlmsg_data(nlh));
if (genlmsg_end(msg, hdr) < 0)
goto out;
@@ -97,8 +97,8 @@ 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));
+ struct nlmsghdr *nlh = nlmsg_hdr(msg);
+ void *hdr = genlmsg_data(nlmsg_data(nlh));
if (genlmsg_end(msg, hdr) < 0)
goto out;
--
1.7.10.4
next prev parent reply other threads:[~2013-03-29 15:09 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
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 ` Hong Zhiguo [this message]
2013-03-29 18:45 ` [PATCH v2 net-next] " 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=1364569775-4419-1-git-send-email-honkiko@gmail.com \
--to=honkiko@gmail.com \
--cc=brian.haley@hp.com \
--cc=davem@davemloft.net \
--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 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).