From: Andrew Morton net/wireless/wext-common.c: In function 'rtnetlink_fill_iwinfo': net/wireless/wext-common.c:481: warning: initialization makes pointer from integer without a cast net/wireless/wext-common.c:495: error: invalid operands to binary - Cc: "John W. Linville" Cc: "David S. Miller" Signed-off-by: Andrew Morton --- net/wireless/wext-common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff -puN net/wireless/wext-common.c~git-wireless-vs-git-net-2 net/wireless/wext-common.c --- a/net/wireless/wext-common.c~git-wireless-vs-git-net-2 +++ a/net/wireless/wext-common.c @@ -478,7 +478,7 @@ static inline int rtnetlink_fill_iwinfo( { struct ifinfomsg *r; struct nlmsghdr *nlh; - unsigned char *b = skb->tail; + unsigned char *b = skb_tail_pointer(skb); nlh = NLMSG_PUT(skb, 0, 0, type, sizeof(*r)); r = NLMSG_DATA(nlh); @@ -492,7 +492,7 @@ static inline int rtnetlink_fill_iwinfo( /* Add the wireless events in the netlink packet */ RTA_PUT(skb, IFLA_WIRELESS, event_len, event); - nlh->nlmsg_len = skb->tail - b; + nlh->nlmsg_len = skb_tail_pointer(skb) - b; return skb->len; nlmsg_failure: _