diff mbox

[v2,net-next] netlink: fix the warning introduced by netlink API replacement

Message ID 1364569775-4419-1-git-send-email-honkiko@gmail.com
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

Hong zhi guo March 29, 2013, 3:09 p.m. UTC
Signed-off-by: Hong Zhiguo <honkiko@gmail.com>
---
 net/ieee802154/netlink.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Comments

David Miller March 29, 2013, 6:45 p.m. UTC | #1
From: Hong Zhiguo <honkiko@gmail.com>
Date: Fri, 29 Mar 2013 23:09:35 +0800

> Signed-off-by: Hong Zhiguo <honkiko@gmail.com>

Applied, thanks.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

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;