diff options
author | Victor Fusco <victor@cetuc.puc-rio.br> | 2005-07-08 17:57:47 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2005-07-08 17:57:47 -0400 |
commit | 86a76caf8705e3524e15f343f3c4806939a06dc8 (patch) | |
tree | ac2022a6073b5af228e009178048bdab070d2230 /include/net/sock.h | |
parent | b03efcfb2180289718991bb984044ce6c5b7d1b0 (diff) |
[NET]: Fix sparse warnings
From: Victor Fusco <victor@cetuc.puc-rio.br>
Fix the sparse warning "implicit cast to nocast type"
Signed-off-by: Victor Fusco <victor@cetuc.puc-rio.br>
Signed-off-by: Domen Puncer <domen@coderock.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/sock.h')
-rw-r--r-- | include/net/sock.h | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/include/net/sock.h b/include/net/sock.h index 7b76f891ae2d..a1042d08becd 100644 --- a/include/net/sock.h +++ b/include/net/sock.h | |||
@@ -684,16 +684,17 @@ extern void FASTCALL(release_sock(struct sock *sk)); | |||
684 | #define bh_lock_sock(__sk) spin_lock(&((__sk)->sk_lock.slock)) | 684 | #define bh_lock_sock(__sk) spin_lock(&((__sk)->sk_lock.slock)) |
685 | #define bh_unlock_sock(__sk) spin_unlock(&((__sk)->sk_lock.slock)) | 685 | #define bh_unlock_sock(__sk) spin_unlock(&((__sk)->sk_lock.slock)) |
686 | 686 | ||
687 | extern struct sock *sk_alloc(int family, int priority, | 687 | extern struct sock *sk_alloc(int family, |
688 | unsigned int __nocast priority, | ||
688 | struct proto *prot, int zero_it); | 689 | struct proto *prot, int zero_it); |
689 | extern void sk_free(struct sock *sk); | 690 | extern void sk_free(struct sock *sk); |
690 | 691 | ||
691 | extern struct sk_buff *sock_wmalloc(struct sock *sk, | 692 | extern struct sk_buff *sock_wmalloc(struct sock *sk, |
692 | unsigned long size, int force, | 693 | unsigned long size, int force, |
693 | int priority); | 694 | unsigned int __nocast priority); |
694 | extern struct sk_buff *sock_rmalloc(struct sock *sk, | 695 | extern struct sk_buff *sock_rmalloc(struct sock *sk, |
695 | unsigned long size, int force, | 696 | unsigned long size, int force, |
696 | int priority); | 697 | unsigned int __nocast priority); |
697 | extern void sock_wfree(struct sk_buff *skb); | 698 | extern void sock_wfree(struct sk_buff *skb); |
698 | extern void sock_rfree(struct sk_buff *skb); | 699 | extern void sock_rfree(struct sk_buff *skb); |
699 | 700 | ||
@@ -708,7 +709,8 @@ extern struct sk_buff *sock_alloc_send_skb(struct sock *sk, | |||
708 | unsigned long size, | 709 | unsigned long size, |
709 | int noblock, | 710 | int noblock, |
710 | int *errcode); | 711 | int *errcode); |
711 | extern void *sock_kmalloc(struct sock *sk, int size, int priority); | 712 | extern void *sock_kmalloc(struct sock *sk, int size, |
713 | unsigned int __nocast priority); | ||
712 | extern void sock_kfree_s(struct sock *sk, void *mem, int size); | 714 | extern void sock_kfree_s(struct sock *sk, void *mem, int size); |
713 | extern void sk_send_sigurg(struct sock *sk); | 715 | extern void sk_send_sigurg(struct sock *sk); |
714 | 716 | ||
@@ -1132,7 +1134,8 @@ static inline void sk_stream_moderate_sndbuf(struct sock *sk) | |||
1132 | } | 1134 | } |
1133 | 1135 | ||
1134 | static inline struct sk_buff *sk_stream_alloc_pskb(struct sock *sk, | 1136 | static inline struct sk_buff *sk_stream_alloc_pskb(struct sock *sk, |
1135 | int size, int mem, int gfp) | 1137 | int size, int mem, |
1138 | unsigned int __nocast gfp) | ||
1136 | { | 1139 | { |
1137 | struct sk_buff *skb; | 1140 | struct sk_buff *skb; |
1138 | int hdr_len; | 1141 | int hdr_len; |
@@ -1155,7 +1158,8 @@ static inline struct sk_buff *sk_stream_alloc_pskb(struct sock *sk, | |||
1155 | } | 1158 | } |
1156 | 1159 | ||
1157 | static inline struct sk_buff *sk_stream_alloc_skb(struct sock *sk, | 1160 | static inline struct sk_buff *sk_stream_alloc_skb(struct sock *sk, |
1158 | int size, int gfp) | 1161 | int size, |
1162 | unsigned int __nocast gfp) | ||
1159 | { | 1163 | { |
1160 | return sk_stream_alloc_pskb(sk, size, 0, gfp); | 1164 | return sk_stream_alloc_pskb(sk, size, 0, gfp); |
1161 | } | 1165 | } |
@@ -1188,7 +1192,7 @@ static inline int sock_writeable(const struct sock *sk) | |||
1188 | return atomic_read(&sk->sk_wmem_alloc) < (sk->sk_sndbuf / 2); | 1192 | return atomic_read(&sk->sk_wmem_alloc) < (sk->sk_sndbuf / 2); |
1189 | } | 1193 | } |
1190 | 1194 | ||
1191 | static inline int gfp_any(void) | 1195 | static inline unsigned int __nocast gfp_any(void) |
1192 | { | 1196 | { |
1193 | return in_softirq() ? GFP_ATOMIC : GFP_KERNEL; | 1197 | return in_softirq() ? GFP_ATOMIC : GFP_KERNEL; |
1194 | } | 1198 | } |