diff options
| author | Eric Dumazet <eric.dumazet@gmail.com> | 2012-04-15 01:58:06 -0400 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2012-04-15 12:44:40 -0400 |
| commit | 95c961747284a6b83a5e2d81240e214b0fa3464d (patch) | |
| tree | c7be86a00db3605a48a03109fafcbe31039ca2e0 /net/unix | |
| parent | 5e73ea1a31c3612aa6dfe44f864ca5b7b6a4cff9 (diff) | |
net: cleanup unsigned to unsigned int
Use of "unsigned int" is preferred to bare "unsigned" in net tree.
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/unix')
| -rw-r--r-- | net/unix/af_unix.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c index eadb9020cd64..641f2e47f165 100644 --- a/net/unix/af_unix.c +++ b/net/unix/af_unix.c | |||
| @@ -149,9 +149,10 @@ static inline void unix_set_secdata(struct scm_cookie *scm, struct sk_buff *skb) | |||
| 149 | * each socket state is protected by separate spin lock. | 149 | * each socket state is protected by separate spin lock. |
| 150 | */ | 150 | */ |
| 151 | 151 | ||
| 152 | static inline unsigned unix_hash_fold(__wsum n) | 152 | static inline unsigned int unix_hash_fold(__wsum n) |
| 153 | { | 153 | { |
| 154 | unsigned hash = (__force unsigned)n; | 154 | unsigned int hash = (__force unsigned int)n; |
| 155 | |||
| 155 | hash ^= hash>>16; | 156 | hash ^= hash>>16; |
| 156 | hash ^= hash>>8; | 157 | hash ^= hash>>8; |
| 157 | return hash&(UNIX_HASH_SIZE-1); | 158 | return hash&(UNIX_HASH_SIZE-1); |
| @@ -200,7 +201,7 @@ static inline void unix_release_addr(struct unix_address *addr) | |||
| 200 | * - if started by zero, it is abstract name. | 201 | * - if started by zero, it is abstract name. |
| 201 | */ | 202 | */ |
| 202 | 203 | ||
| 203 | static int unix_mkname(struct sockaddr_un *sunaddr, int len, unsigned *hashp) | 204 | static int unix_mkname(struct sockaddr_un *sunaddr, int len, unsigned int *hashp) |
| 204 | { | 205 | { |
| 205 | if (len <= sizeof(short) || len > sizeof(*sunaddr)) | 206 | if (len <= sizeof(short) || len > sizeof(*sunaddr)) |
| 206 | return -EINVAL; | 207 | return -EINVAL; |
| @@ -250,7 +251,7 @@ static inline void unix_insert_socket(struct hlist_head *list, struct sock *sk) | |||
| 250 | 251 | ||
| 251 | static struct sock *__unix_find_socket_byname(struct net *net, | 252 | static struct sock *__unix_find_socket_byname(struct net *net, |
| 252 | struct sockaddr_un *sunname, | 253 | struct sockaddr_un *sunname, |
| 253 | int len, int type, unsigned hash) | 254 | int len, int type, unsigned int hash) |
| 254 | { | 255 | { |
| 255 | struct sock *s; | 256 | struct sock *s; |
| 256 | struct hlist_node *node; | 257 | struct hlist_node *node; |
| @@ -273,7 +274,7 @@ found: | |||
| 273 | static inline struct sock *unix_find_socket_byname(struct net *net, | 274 | static inline struct sock *unix_find_socket_byname(struct net *net, |
| 274 | struct sockaddr_un *sunname, | 275 | struct sockaddr_un *sunname, |
| 275 | int len, int type, | 276 | int len, int type, |
| 276 | unsigned hash) | 277 | unsigned int hash) |
| 277 | { | 278 | { |
| 278 | struct sock *s; | 279 | struct sock *s; |
| 279 | 280 | ||
| @@ -760,7 +761,7 @@ out: mutex_unlock(&u->readlock); | |||
| 760 | 761 | ||
| 761 | static struct sock *unix_find_other(struct net *net, | 762 | static struct sock *unix_find_other(struct net *net, |
| 762 | struct sockaddr_un *sunname, int len, | 763 | struct sockaddr_un *sunname, int len, |
| 763 | int type, unsigned hash, int *error) | 764 | int type, unsigned int hash, int *error) |
| 764 | { | 765 | { |
| 765 | struct sock *u; | 766 | struct sock *u; |
| 766 | struct path path; | 767 | struct path path; |
| @@ -824,7 +825,7 @@ static int unix_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len) | |||
| 824 | struct dentry *dentry = NULL; | 825 | struct dentry *dentry = NULL; |
| 825 | struct path path; | 826 | struct path path; |
| 826 | int err; | 827 | int err; |
| 827 | unsigned hash; | 828 | unsigned int hash; |
| 828 | struct unix_address *addr; | 829 | struct unix_address *addr; |
| 829 | struct hlist_head *list; | 830 | struct hlist_head *list; |
| 830 | 831 | ||
| @@ -964,7 +965,7 @@ static int unix_dgram_connect(struct socket *sock, struct sockaddr *addr, | |||
| 964 | struct net *net = sock_net(sk); | 965 | struct net *net = sock_net(sk); |
| 965 | struct sockaddr_un *sunaddr = (struct sockaddr_un *)addr; | 966 | struct sockaddr_un *sunaddr = (struct sockaddr_un *)addr; |
| 966 | struct sock *other; | 967 | struct sock *other; |
| 967 | unsigned hash; | 968 | unsigned int hash; |
| 968 | int err; | 969 | int err; |
| 969 | 970 | ||
| 970 | if (addr->sa_family != AF_UNSPEC) { | 971 | if (addr->sa_family != AF_UNSPEC) { |
| @@ -1062,7 +1063,7 @@ static int unix_stream_connect(struct socket *sock, struct sockaddr *uaddr, | |||
| 1062 | struct sock *newsk = NULL; | 1063 | struct sock *newsk = NULL; |
| 1063 | struct sock *other = NULL; | 1064 | struct sock *other = NULL; |
| 1064 | struct sk_buff *skb = NULL; | 1065 | struct sk_buff *skb = NULL; |
| 1065 | unsigned hash; | 1066 | unsigned int hash; |
| 1066 | int st; | 1067 | int st; |
| 1067 | int err; | 1068 | int err; |
| 1068 | long timeo; | 1069 | long timeo; |
| @@ -1437,7 +1438,7 @@ static int unix_dgram_sendmsg(struct kiocb *kiocb, struct socket *sock, | |||
| 1437 | struct sock *other = NULL; | 1438 | struct sock *other = NULL; |
| 1438 | int namelen = 0; /* fake GCC */ | 1439 | int namelen = 0; /* fake GCC */ |
| 1439 | int err; | 1440 | int err; |
| 1440 | unsigned hash; | 1441 | unsigned int hash; |
| 1441 | struct sk_buff *skb; | 1442 | struct sk_buff *skb; |
| 1442 | long timeo; | 1443 | long timeo; |
| 1443 | struct scm_cookie tmp_scm; | 1444 | struct scm_cookie tmp_scm; |
