Commit 8e5200f5 authored by Al Viro's avatar Al Viro Committed by David S. Miller

[NET]: Fix assorted misannotations (from md5 and udplite merges).

Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 34bcca28
...@@ -1154,7 +1154,7 @@ extern int tcp_v4_md5_do_add(struct sock *sk, ...@@ -1154,7 +1154,7 @@ extern int tcp_v4_md5_do_add(struct sock *sk,
u8 newkeylen); u8 newkeylen);
extern int tcp_v4_md5_do_del(struct sock *sk, extern int tcp_v4_md5_do_del(struct sock *sk,
u32 addr); __be32 addr);
extern struct tcp_md5sig_pool **tcp_alloc_md5sig_pool(void); extern struct tcp_md5sig_pool **tcp_alloc_md5sig_pool(void);
extern void tcp_free_md5sig_pool(void); extern void tcp_free_md5sig_pool(void);
......
...@@ -77,7 +77,7 @@ static inline __sum16 __udp_lib_checksum_complete(struct sk_buff *skb) ...@@ -77,7 +77,7 @@ static inline __sum16 __udp_lib_checksum_complete(struct sk_buff *skb)
skb->csum)); skb->csum));
} }
static inline __sum16 udp_lib_checksum_complete(struct sk_buff *skb) static inline int udp_lib_checksum_complete(struct sk_buff *skb)
{ {
return skb->ip_summed != CHECKSUM_UNNECESSARY && return skb->ip_summed != CHECKSUM_UNNECESSARY &&
__udp_lib_checksum_complete(skb); __udp_lib_checksum_complete(skb);
......
...@@ -90,9 +90,9 @@ static __inline__ int udplite6_csum_init(struct sk_buff *skb, struct udphdr *uh) ...@@ -90,9 +90,9 @@ static __inline__ int udplite6_csum_init(struct sk_buff *skb, struct udphdr *uh)
int rc = udplite_checksum_init(skb, uh); int rc = udplite_checksum_init(skb, uh);
if (!rc) if (!rc)
skb->csum = ~csum_ipv6_magic(&skb->nh.ipv6h->saddr, skb->csum = ~csum_unfold(csum_ipv6_magic(&skb->nh.ipv6h->saddr,
&skb->nh.ipv6h->daddr, &skb->nh.ipv6h->daddr,
skb->len, IPPROTO_UDPLITE, 0); skb->len, IPPROTO_UDPLITE, 0));
return rc; return rc;
} }
......
...@@ -1020,7 +1020,7 @@ static int tcp_v4_do_calc_md5_hash(char *md5_hash, struct tcp_md5sig_key *key, ...@@ -1020,7 +1020,7 @@ static int tcp_v4_do_calc_md5_hash(char *md5_hash, struct tcp_md5sig_key *key,
#ifdef CONFIG_TCP_MD5SIG_DEBUG #ifdef CONFIG_TCP_MD5SIG_DEBUG
int i; int i;
#endif #endif
__u16 old_checksum; __sum16 old_checksum;
struct tcp_md5sig_pool *hp; struct tcp_md5sig_pool *hp;
struct tcp4_pseudohdr *bp; struct tcp4_pseudohdr *bp;
struct hash_desc *desc; struct hash_desc *desc;
......
...@@ -114,7 +114,7 @@ DEFINE_RWLOCK(udp_hash_lock); ...@@ -114,7 +114,7 @@ DEFINE_RWLOCK(udp_hash_lock);
static int udp_port_rover; static int udp_port_rover;
static inline int __udp_lib_lport_inuse(__be16 num, struct hlist_head udptable[]) static inline int __udp_lib_lport_inuse(__u16 num, struct hlist_head udptable[])
{ {
struct sock *sk; struct sock *sk;
struct hlist_node *node; struct hlist_node *node;
...@@ -455,7 +455,7 @@ static int udp_push_pending_frames(struct sock *sk, struct udp_sock *up) ...@@ -455,7 +455,7 @@ static int udp_push_pending_frames(struct sock *sk, struct udp_sock *up)
struct sk_buff *skb; struct sk_buff *skb;
struct udphdr *uh; struct udphdr *uh;
int err = 0; int err = 0;
u32 csum = 0; __wsum csum = 0;
/* Grab the skbuff where UDP header space exists. */ /* Grab the skbuff where UDP header space exists. */
if ((skb = skb_peek(&sk->sk_write_queue)) == NULL) if ((skb = skb_peek(&sk->sk_write_queue)) == NULL)
......
...@@ -739,7 +739,7 @@ static int tcp_v6_do_calc_md5_hash(char *md5_hash, struct tcp_md5sig_key *key, ...@@ -739,7 +739,7 @@ static int tcp_v6_do_calc_md5_hash(char *md5_hash, struct tcp_md5sig_key *key,
struct scatterlist sg[4]; struct scatterlist sg[4];
__u16 data_len; __u16 data_len;
int block = 0; int block = 0;
__u16 cksum; __sum16 cksum;
struct tcp_md5sig_pool *hp; struct tcp_md5sig_pool *hp;
struct tcp6_pseudohdr *bp; struct tcp6_pseudohdr *bp;
struct hash_desc *desc; struct hash_desc *desc;
...@@ -1032,7 +1032,7 @@ static void tcp_v6_send_reset(struct sock *sk, struct sk_buff *skb) ...@@ -1032,7 +1032,7 @@ static void tcp_v6_send_reset(struct sock *sk, struct sk_buff *skb)
#ifdef CONFIG_TCP_MD5SIG #ifdef CONFIG_TCP_MD5SIG
if (key) { if (key) {
u32 *opt = (u32*)(t1 + 1); __be32 *opt = (__be32*)(t1 + 1);
opt[0] = htonl((TCPOPT_NOP << 24) | opt[0] = htonl((TCPOPT_NOP << 24) |
(TCPOPT_NOP << 16) | (TCPOPT_NOP << 16) |
(TCPOPT_MD5SIG << 8) | (TCPOPT_MD5SIG << 8) |
......
...@@ -248,7 +248,7 @@ void __udp6_lib_err(struct sk_buff *skb, struct inet6_skb_parm *opt, ...@@ -248,7 +248,7 @@ void __udp6_lib_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
static __inline__ void udpv6_err(struct sk_buff *skb, static __inline__ void udpv6_err(struct sk_buff *skb,
struct inet6_skb_parm *opt, int type, struct inet6_skb_parm *opt, int type,
int code, int offset, __u32 info ) int code, int offset, __be32 info )
{ {
return __udp6_lib_err(skb, opt, type, code, offset, info, udp_hash); return __udp6_lib_err(skb, opt, type, code, offset, info, udp_hash);
} }
......
...@@ -24,7 +24,7 @@ static __inline__ int udplitev6_rcv(struct sk_buff **pskb) ...@@ -24,7 +24,7 @@ static __inline__ int udplitev6_rcv(struct sk_buff **pskb)
static __inline__ void udplitev6_err(struct sk_buff *skb, static __inline__ void udplitev6_err(struct sk_buff *skb,
struct inet6_skb_parm *opt, struct inet6_skb_parm *opt,
int type, int code, int offset, __u32 info) int type, int code, int offset, __be32 info)
{ {
return __udp6_lib_err(skb, opt, type, code, offset, info, udplite_hash); return __udp6_lib_err(skb, opt, type, code, offset, info, udplite_hash);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment