From: Harvey Harrison Date: Thu, 20 Nov 2008 09:54:27 +0000 (-0800) Subject: net: ip_sockglue.c add static, annotate ports' endianness X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=21d1a161f6b1fff154e3614a6b5a2111fa7a4191;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git net: ip_sockglue.c add static, annotate ports' endianness Fixes sparse warnings: net/ipv4/ip_sockglue.c:146:15: warning: incorrect type in assignment (different base types) net/ipv4/ip_sockglue.c:146:15: expected restricted __be16 [assigned] [usertype] sin_port net/ipv4/ip_sockglue.c:146:15: got unsigned short [unsigned] [short] [usertype] net/ipv4/ip_sockglue.c:130:6: warning: symbol 'ip_cmsg_recv_dstaddr' was not declared. Should it be static? Signed-off-by: Harvey Harrison Signed-off-by: David S. Miller --- diff --git a/net/ipv4/ip_sockglue.c b/net/ipv4/ip_sockglue.c index 624b534201e2..43c05854d752 100644 --- a/net/ipv4/ip_sockglue.c +++ b/net/ipv4/ip_sockglue.c @@ -127,11 +127,11 @@ static void ip_cmsg_recv_security(struct msghdr *msg, struct sk_buff *skb) security_release_secctx(secdata, seclen); } -void ip_cmsg_recv_dstaddr(struct msghdr *msg, struct sk_buff *skb) +static void ip_cmsg_recv_dstaddr(struct msghdr *msg, struct sk_buff *skb) { struct sockaddr_in sin; struct iphdr *iph = ip_hdr(skb); - u16 *ports = (u16 *) skb_transport_header(skb); + __be16 *ports = (__be16 *)skb_transport_header(skb); if (skb_transport_offset(skb) + 4 > skb->len) return;