Re: [PATCH 1/6] net-next: replace obsolete NLMSG_* with type safe nlmsg_*

From
Brian Haley <hidden>
Date
2013-03-29 02:57:48
Also in
lkml
Reply to
Hong Zhiguo, 2013-03-27
On 03/27/2013 12:47 PM, Hong Zhiguo wrote:
Signed-off-by: Hong Zhiguo <redacted>
quoted hunk ↗ jump to hunk
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
Thread (11 messages) 11 messages, 4 authors, last reply 2013-03-29
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help