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 /net/core/sock.c | |
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 'net/core/sock.c')
-rw-r--r-- | net/core/sock.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/net/core/sock.c b/net/core/sock.c index a6ec3ada7f9e..8b35ccdc2b3b 100644 --- a/net/core/sock.c +++ b/net/core/sock.c | |||
@@ -622,7 +622,8 @@ lenout: | |||
622 | * @prot: struct proto associated with this new sock instance | 622 | * @prot: struct proto associated with this new sock instance |
623 | * @zero_it: if we should zero the newly allocated sock | 623 | * @zero_it: if we should zero the newly allocated sock |
624 | */ | 624 | */ |
625 | struct sock *sk_alloc(int family, int priority, struct proto *prot, int zero_it) | 625 | struct sock *sk_alloc(int family, unsigned int __nocast priority, |
626 | struct proto *prot, int zero_it) | ||
626 | { | 627 | { |
627 | struct sock *sk = NULL; | 628 | struct sock *sk = NULL; |
628 | kmem_cache_t *slab = prot->slab; | 629 | kmem_cache_t *slab = prot->slab; |
@@ -750,7 +751,8 @@ unsigned long sock_i_ino(struct sock *sk) | |||
750 | /* | 751 | /* |
751 | * Allocate a skb from the socket's send buffer. | 752 | * Allocate a skb from the socket's send buffer. |
752 | */ | 753 | */ |
753 | struct sk_buff *sock_wmalloc(struct sock *sk, unsigned long size, int force, int priority) | 754 | struct sk_buff *sock_wmalloc(struct sock *sk, unsigned long size, int force, |
755 | unsigned int __nocast priority) | ||
754 | { | 756 | { |
755 | if (force || atomic_read(&sk->sk_wmem_alloc) < sk->sk_sndbuf) { | 757 | if (force || atomic_read(&sk->sk_wmem_alloc) < sk->sk_sndbuf) { |
756 | struct sk_buff * skb = alloc_skb(size, priority); | 758 | struct sk_buff * skb = alloc_skb(size, priority); |
@@ -765,7 +767,8 @@ struct sk_buff *sock_wmalloc(struct sock *sk, unsigned long size, int force, int | |||
765 | /* | 767 | /* |
766 | * Allocate a skb from the socket's receive buffer. | 768 | * Allocate a skb from the socket's receive buffer. |
767 | */ | 769 | */ |
768 | struct sk_buff *sock_rmalloc(struct sock *sk, unsigned long size, int force, int priority) | 770 | struct sk_buff *sock_rmalloc(struct sock *sk, unsigned long size, int force, |
771 | unsigned int __nocast priority) | ||
769 | { | 772 | { |
770 | if (force || atomic_read(&sk->sk_rmem_alloc) < sk->sk_rcvbuf) { | 773 | if (force || atomic_read(&sk->sk_rmem_alloc) < sk->sk_rcvbuf) { |
771 | struct sk_buff *skb = alloc_skb(size, priority); | 774 | struct sk_buff *skb = alloc_skb(size, priority); |
@@ -780,7 +783,7 @@ struct sk_buff *sock_rmalloc(struct sock *sk, unsigned long size, int force, int | |||
780 | /* | 783 | /* |
781 | * Allocate a memory block from the socket's option memory buffer. | 784 | * Allocate a memory block from the socket's option memory buffer. |
782 | */ | 785 | */ |
783 | void *sock_kmalloc(struct sock *sk, int size, int priority) | 786 | void *sock_kmalloc(struct sock *sk, int size, unsigned int __nocast priority) |
784 | { | 787 | { |
785 | if ((unsigned)size <= sysctl_optmem_max && | 788 | if ((unsigned)size <= sysctl_optmem_max && |
786 | atomic_read(&sk->sk_omem_alloc) + size < sysctl_optmem_max) { | 789 | atomic_read(&sk->sk_omem_alloc) + size < sysctl_optmem_max) { |