]> Pileus Git - ~andy/linux/commitdiff
netlink: fix the warning introduced by netlink API replacement
authorHong zhi guo <honkiko@gmail.com>
Fri, 29 Mar 2013 05:09:35 +0000 (05:09 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 29 Mar 2013 18:44:37 +0000 (14:44 -0400)
Signed-off-by: Hong Zhiguo <honkiko@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ieee802154/netlink.c

index 92472528106b5f7fb5d29f5d9c6eb734d4804c4f..7e49bbcc6967ebfaac72ee9e6b3e3b9032f1f88a 100644 (file)
@@ -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;