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/rxrpc | |
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/rxrpc')
-rw-r--r-- | net/rxrpc/af_rxrpc.c | 8 | ||||
-rw-r--r-- | net/rxrpc/ar-ack.c | 6 | ||||
-rw-r--r-- | net/rxrpc/ar-call.c | 4 | ||||
-rw-r--r-- | net/rxrpc/ar-input.c | 2 | ||||
-rw-r--r-- | net/rxrpc/ar-internal.h | 16 | ||||
-rw-r--r-- | net/rxrpc/ar-key.c | 22 | ||||
-rw-r--r-- | net/rxrpc/rxkad.c | 6 |
7 files changed, 32 insertions, 32 deletions
diff --git a/net/rxrpc/af_rxrpc.c b/net/rxrpc/af_rxrpc.c index 74c064c0dfdd..05996d0dd828 100644 --- a/net/rxrpc/af_rxrpc.c +++ b/net/rxrpc/af_rxrpc.c | |||
@@ -26,7 +26,7 @@ MODULE_AUTHOR("Red Hat, Inc."); | |||
26 | MODULE_LICENSE("GPL"); | 26 | MODULE_LICENSE("GPL"); |
27 | MODULE_ALIAS_NETPROTO(PF_RXRPC); | 27 | MODULE_ALIAS_NETPROTO(PF_RXRPC); |
28 | 28 | ||
29 | unsigned rxrpc_debug; // = RXRPC_DEBUG_KPROTO; | 29 | unsigned int rxrpc_debug; // = RXRPC_DEBUG_KPROTO; |
30 | module_param_named(debug, rxrpc_debug, uint, S_IWUSR | S_IRUGO); | 30 | module_param_named(debug, rxrpc_debug, uint, S_IWUSR | S_IRUGO); |
31 | MODULE_PARM_DESC(debug, "RxRPC debugging mask"); | 31 | MODULE_PARM_DESC(debug, "RxRPC debugging mask"); |
32 | 32 | ||
@@ -513,7 +513,7 @@ static int rxrpc_setsockopt(struct socket *sock, int level, int optname, | |||
513 | char __user *optval, unsigned int optlen) | 513 | char __user *optval, unsigned int optlen) |
514 | { | 514 | { |
515 | struct rxrpc_sock *rx = rxrpc_sk(sock->sk); | 515 | struct rxrpc_sock *rx = rxrpc_sk(sock->sk); |
516 | unsigned min_sec_level; | 516 | unsigned int min_sec_level; |
517 | int ret; | 517 | int ret; |
518 | 518 | ||
519 | _enter(",%d,%d,,%d", level, optname, optlen); | 519 | _enter(",%d,%d,,%d", level, optname, optlen); |
@@ -555,13 +555,13 @@ static int rxrpc_setsockopt(struct socket *sock, int level, int optname, | |||
555 | 555 | ||
556 | case RXRPC_MIN_SECURITY_LEVEL: | 556 | case RXRPC_MIN_SECURITY_LEVEL: |
557 | ret = -EINVAL; | 557 | ret = -EINVAL; |
558 | if (optlen != sizeof(unsigned)) | 558 | if (optlen != sizeof(unsigned int)) |
559 | goto error; | 559 | goto error; |
560 | ret = -EISCONN; | 560 | ret = -EISCONN; |
561 | if (rx->sk.sk_state != RXRPC_UNCONNECTED) | 561 | if (rx->sk.sk_state != RXRPC_UNCONNECTED) |
562 | goto error; | 562 | goto error; |
563 | ret = get_user(min_sec_level, | 563 | ret = get_user(min_sec_level, |
564 | (unsigned __user *) optval); | 564 | (unsigned int __user *) optval); |
565 | if (ret < 0) | 565 | if (ret < 0) |
566 | goto error; | 566 | goto error; |
567 | ret = -EINVAL; | 567 | ret = -EINVAL; |
diff --git a/net/rxrpc/ar-ack.c b/net/rxrpc/ar-ack.c index c3126e864f3c..e4d9cbcff402 100644 --- a/net/rxrpc/ar-ack.c +++ b/net/rxrpc/ar-ack.c | |||
@@ -19,7 +19,7 @@ | |||
19 | #include <net/af_rxrpc.h> | 19 | #include <net/af_rxrpc.h> |
20 | #include "ar-internal.h" | 20 | #include "ar-internal.h" |
21 | 21 | ||
22 | static unsigned rxrpc_ack_defer = 1; | 22 | static unsigned int rxrpc_ack_defer = 1; |
23 | 23 | ||
24 | static const char *const rxrpc_acks[] = { | 24 | static const char *const rxrpc_acks[] = { |
25 | "---", "REQ", "DUP", "OOS", "WIN", "MEM", "PNG", "PNR", "DLY", "IDL", | 25 | "---", "REQ", "DUP", "OOS", "WIN", "MEM", "PNG", "PNR", "DLY", "IDL", |
@@ -548,11 +548,11 @@ static void rxrpc_zap_tx_window(struct rxrpc_call *call) | |||
548 | * process the extra information that may be appended to an ACK packet | 548 | * process the extra information that may be appended to an ACK packet |
549 | */ | 549 | */ |
550 | static void rxrpc_extract_ackinfo(struct rxrpc_call *call, struct sk_buff *skb, | 550 | static void rxrpc_extract_ackinfo(struct rxrpc_call *call, struct sk_buff *skb, |
551 | unsigned latest, int nAcks) | 551 | unsigned int latest, int nAcks) |
552 | { | 552 | { |
553 | struct rxrpc_ackinfo ackinfo; | 553 | struct rxrpc_ackinfo ackinfo; |
554 | struct rxrpc_peer *peer; | 554 | struct rxrpc_peer *peer; |
555 | unsigned mtu; | 555 | unsigned int mtu; |
556 | 556 | ||
557 | if (skb_copy_bits(skb, nAcks + 3, &ackinfo, sizeof(ackinfo)) < 0) { | 557 | if (skb_copy_bits(skb, nAcks + 3, &ackinfo, sizeof(ackinfo)) < 0) { |
558 | _leave(" [no ackinfo]"); | 558 | _leave(" [no ackinfo]"); |
diff --git a/net/rxrpc/ar-call.c b/net/rxrpc/ar-call.c index bf656c230ba9..a3bbb360a3f9 100644 --- a/net/rxrpc/ar-call.c +++ b/net/rxrpc/ar-call.c | |||
@@ -38,8 +38,8 @@ const char *const rxrpc_call_states[] = { | |||
38 | struct kmem_cache *rxrpc_call_jar; | 38 | struct kmem_cache *rxrpc_call_jar; |
39 | LIST_HEAD(rxrpc_calls); | 39 | LIST_HEAD(rxrpc_calls); |
40 | DEFINE_RWLOCK(rxrpc_call_lock); | 40 | DEFINE_RWLOCK(rxrpc_call_lock); |
41 | static unsigned rxrpc_call_max_lifetime = 60; | 41 | static unsigned int rxrpc_call_max_lifetime = 60; |
42 | static unsigned rxrpc_dead_call_timeout = 2; | 42 | static unsigned int rxrpc_dead_call_timeout = 2; |
43 | 43 | ||
44 | static void rxrpc_destroy_call(struct work_struct *work); | 44 | static void rxrpc_destroy_call(struct work_struct *work); |
45 | static void rxrpc_call_life_expired(unsigned long _call); | 45 | static void rxrpc_call_life_expired(unsigned long _call); |
diff --git a/net/rxrpc/ar-input.c b/net/rxrpc/ar-input.c index 1a2b0633fece..529572f18d1f 100644 --- a/net/rxrpc/ar-input.c +++ b/net/rxrpc/ar-input.c | |||
@@ -76,7 +76,7 @@ int rxrpc_queue_rcv_skb(struct rxrpc_call *call, struct sk_buff *skb, | |||
76 | * --ANK */ | 76 | * --ANK */ |
77 | // ret = -ENOBUFS; | 77 | // ret = -ENOBUFS; |
78 | // if (atomic_read(&sk->sk_rmem_alloc) + skb->truesize >= | 78 | // if (atomic_read(&sk->sk_rmem_alloc) + skb->truesize >= |
79 | // (unsigned) sk->sk_rcvbuf) | 79 | // (unsigned int) sk->sk_rcvbuf) |
80 | // goto out; | 80 | // goto out; |
81 | 81 | ||
82 | ret = sk_filter(sk, skb); | 82 | ret = sk_filter(sk, skb); |
diff --git a/net/rxrpc/ar-internal.h b/net/rxrpc/ar-internal.h index 8e22bd345e71..a693aca2ae2e 100644 --- a/net/rxrpc/ar-internal.h +++ b/net/rxrpc/ar-internal.h | |||
@@ -83,7 +83,7 @@ struct rxrpc_skb_priv { | |||
83 | struct rxrpc_call *call; /* call with which associated */ | 83 | struct rxrpc_call *call; /* call with which associated */ |
84 | unsigned long resend_at; /* time in jiffies at which to resend */ | 84 | unsigned long resend_at; /* time in jiffies at which to resend */ |
85 | union { | 85 | union { |
86 | unsigned offset; /* offset into buffer of next read */ | 86 | unsigned int offset; /* offset into buffer of next read */ |
87 | int remain; /* amount of space remaining for next write */ | 87 | int remain; /* amount of space remaining for next write */ |
88 | u32 error; /* network error code */ | 88 | u32 error; /* network error code */ |
89 | bool need_resend; /* T if needs resending */ | 89 | bool need_resend; /* T if needs resending */ |
@@ -176,9 +176,9 @@ struct rxrpc_peer { | |||
176 | struct list_head error_targets; /* targets for net error distribution */ | 176 | struct list_head error_targets; /* targets for net error distribution */ |
177 | spinlock_t lock; /* access lock */ | 177 | spinlock_t lock; /* access lock */ |
178 | atomic_t usage; | 178 | atomic_t usage; |
179 | unsigned if_mtu; /* interface MTU for this peer */ | 179 | unsigned int if_mtu; /* interface MTU for this peer */ |
180 | unsigned mtu; /* network MTU for this peer */ | 180 | unsigned int mtu; /* network MTU for this peer */ |
181 | unsigned maxdata; /* data size (MTU - hdrsize) */ | 181 | unsigned int maxdata; /* data size (MTU - hdrsize) */ |
182 | unsigned short hdrsize; /* header size (IP + UDP + RxRPC) */ | 182 | unsigned short hdrsize; /* header size (IP + UDP + RxRPC) */ |
183 | int debug_id; /* debug ID for printks */ | 183 | int debug_id; /* debug ID for printks */ |
184 | int net_error; /* network error distributed */ | 184 | int net_error; /* network error distributed */ |
@@ -187,8 +187,8 @@ struct rxrpc_peer { | |||
187 | /* calculated RTT cache */ | 187 | /* calculated RTT cache */ |
188 | #define RXRPC_RTT_CACHE_SIZE 32 | 188 | #define RXRPC_RTT_CACHE_SIZE 32 |
189 | suseconds_t rtt; /* current RTT estimate (in uS) */ | 189 | suseconds_t rtt; /* current RTT estimate (in uS) */ |
190 | unsigned rtt_point; /* next entry at which to insert */ | 190 | unsigned int rtt_point; /* next entry at which to insert */ |
191 | unsigned rtt_usage; /* amount of cache actually used */ | 191 | unsigned int rtt_usage; /* amount of cache actually used */ |
192 | suseconds_t rtt_cache[RXRPC_RTT_CACHE_SIZE]; /* calculated RTT cache */ | 192 | suseconds_t rtt_cache[RXRPC_RTT_CACHE_SIZE]; /* calculated RTT cache */ |
193 | }; | 193 | }; |
194 | 194 | ||
@@ -271,7 +271,7 @@ struct rxrpc_connection { | |||
271 | } state; | 271 | } state; |
272 | int error; /* error code for local abort */ | 272 | int error; /* error code for local abort */ |
273 | int debug_id; /* debug ID for printks */ | 273 | int debug_id; /* debug ID for printks */ |
274 | unsigned call_counter; /* call ID counter */ | 274 | unsigned int call_counter; /* call ID counter */ |
275 | atomic_t serial; /* packet serial number counter */ | 275 | atomic_t serial; /* packet serial number counter */ |
276 | atomic_t hi_serial; /* highest serial number received */ | 276 | atomic_t hi_serial; /* highest serial number received */ |
277 | u8 avail_calls; /* number of calls available */ | 277 | u8 avail_calls; /* number of calls available */ |
@@ -592,7 +592,7 @@ extern struct rxrpc_transport *rxrpc_find_transport(struct rxrpc_local *, | |||
592 | /* | 592 | /* |
593 | * debug tracing | 593 | * debug tracing |
594 | */ | 594 | */ |
595 | extern unsigned rxrpc_debug; | 595 | extern unsigned int rxrpc_debug; |
596 | 596 | ||
597 | #define dbgprintk(FMT,...) \ | 597 | #define dbgprintk(FMT,...) \ |
598 | printk("[%-6.6s] "FMT"\n", current->comm ,##__VA_ARGS__) | 598 | printk("[%-6.6s] "FMT"\n", current->comm ,##__VA_ARGS__) |
diff --git a/net/rxrpc/ar-key.c b/net/rxrpc/ar-key.c index ae3a035f5390..8b1f9f49960f 100644 --- a/net/rxrpc/ar-key.c +++ b/net/rxrpc/ar-key.c | |||
@@ -82,7 +82,7 @@ static int rxrpc_vet_description_s(const char *desc) | |||
82 | * - the caller guarantees we have at least 4 words | 82 | * - the caller guarantees we have at least 4 words |
83 | */ | 83 | */ |
84 | static int rxrpc_instantiate_xdr_rxkad(struct key *key, const __be32 *xdr, | 84 | static int rxrpc_instantiate_xdr_rxkad(struct key *key, const __be32 *xdr, |
85 | unsigned toklen) | 85 | unsigned int toklen) |
86 | { | 86 | { |
87 | struct rxrpc_key_token *token, **pptoken; | 87 | struct rxrpc_key_token *token, **pptoken; |
88 | size_t plen; | 88 | size_t plen; |
@@ -210,10 +210,10 @@ static void rxrpc_rxk5_free(struct rxk5_key *rxk5) | |||
210 | */ | 210 | */ |
211 | static int rxrpc_krb5_decode_principal(struct krb5_principal *princ, | 211 | static int rxrpc_krb5_decode_principal(struct krb5_principal *princ, |
212 | const __be32 **_xdr, | 212 | const __be32 **_xdr, |
213 | unsigned *_toklen) | 213 | unsigned int *_toklen) |
214 | { | 214 | { |
215 | const __be32 *xdr = *_xdr; | 215 | const __be32 *xdr = *_xdr; |
216 | unsigned toklen = *_toklen, n_parts, loop, tmp; | 216 | unsigned int toklen = *_toklen, n_parts, loop, tmp; |
217 | 217 | ||
218 | /* there must be at least one name, and at least #names+1 length | 218 | /* there must be at least one name, and at least #names+1 length |
219 | * words */ | 219 | * words */ |
@@ -286,10 +286,10 @@ static int rxrpc_krb5_decode_principal(struct krb5_principal *princ, | |||
286 | static int rxrpc_krb5_decode_tagged_data(struct krb5_tagged_data *td, | 286 | static int rxrpc_krb5_decode_tagged_data(struct krb5_tagged_data *td, |
287 | size_t max_data_size, | 287 | size_t max_data_size, |
288 | const __be32 **_xdr, | 288 | const __be32 **_xdr, |
289 | unsigned *_toklen) | 289 | unsigned int *_toklen) |
290 | { | 290 | { |
291 | const __be32 *xdr = *_xdr; | 291 | const __be32 *xdr = *_xdr; |
292 | unsigned toklen = *_toklen, len; | 292 | unsigned int toklen = *_toklen, len; |
293 | 293 | ||
294 | /* there must be at least one tag and one length word */ | 294 | /* there must be at least one tag and one length word */ |
295 | if (toklen <= 8) | 295 | if (toklen <= 8) |
@@ -330,11 +330,11 @@ static int rxrpc_krb5_decode_tagged_array(struct krb5_tagged_data **_td, | |||
330 | u8 max_n_elem, | 330 | u8 max_n_elem, |
331 | size_t max_elem_size, | 331 | size_t max_elem_size, |
332 | const __be32 **_xdr, | 332 | const __be32 **_xdr, |
333 | unsigned *_toklen) | 333 | unsigned int *_toklen) |
334 | { | 334 | { |
335 | struct krb5_tagged_data *td; | 335 | struct krb5_tagged_data *td; |
336 | const __be32 *xdr = *_xdr; | 336 | const __be32 *xdr = *_xdr; |
337 | unsigned toklen = *_toklen, n_elem, loop; | 337 | unsigned int toklen = *_toklen, n_elem, loop; |
338 | int ret; | 338 | int ret; |
339 | 339 | ||
340 | /* there must be at least one count */ | 340 | /* there must be at least one count */ |
@@ -380,10 +380,10 @@ static int rxrpc_krb5_decode_tagged_array(struct krb5_tagged_data **_td, | |||
380 | * extract a krb5 ticket | 380 | * extract a krb5 ticket |
381 | */ | 381 | */ |
382 | static int rxrpc_krb5_decode_ticket(u8 **_ticket, u16 *_tktlen, | 382 | static int rxrpc_krb5_decode_ticket(u8 **_ticket, u16 *_tktlen, |
383 | const __be32 **_xdr, unsigned *_toklen) | 383 | const __be32 **_xdr, unsigned int *_toklen) |
384 | { | 384 | { |
385 | const __be32 *xdr = *_xdr; | 385 | const __be32 *xdr = *_xdr; |
386 | unsigned toklen = *_toklen, len; | 386 | unsigned int toklen = *_toklen, len; |
387 | 387 | ||
388 | /* there must be at least one length word */ | 388 | /* there must be at least one length word */ |
389 | if (toklen <= 4) | 389 | if (toklen <= 4) |
@@ -419,7 +419,7 @@ static int rxrpc_krb5_decode_ticket(u8 **_ticket, u16 *_tktlen, | |||
419 | * - the caller guarantees we have at least 4 words | 419 | * - the caller guarantees we have at least 4 words |
420 | */ | 420 | */ |
421 | static int rxrpc_instantiate_xdr_rxk5(struct key *key, const __be32 *xdr, | 421 | static int rxrpc_instantiate_xdr_rxk5(struct key *key, const __be32 *xdr, |
422 | unsigned toklen) | 422 | unsigned int toklen) |
423 | { | 423 | { |
424 | struct rxrpc_key_token *token, **pptoken; | 424 | struct rxrpc_key_token *token, **pptoken; |
425 | struct rxk5_key *rxk5; | 425 | struct rxk5_key *rxk5; |
@@ -549,7 +549,7 @@ static int rxrpc_instantiate_xdr(struct key *key, const void *data, size_t datal | |||
549 | { | 549 | { |
550 | const __be32 *xdr = data, *token; | 550 | const __be32 *xdr = data, *token; |
551 | const char *cp; | 551 | const char *cp; |
552 | unsigned len, tmp, loop, ntoken, toklen, sec_ix; | 552 | unsigned int len, tmp, loop, ntoken, toklen, sec_ix; |
553 | int ret; | 553 | int ret; |
554 | 554 | ||
555 | _enter(",{%x,%x,%x,%x},%zu", | 555 | _enter(",{%x,%x,%x,%x},%zu", |
diff --git a/net/rxrpc/rxkad.c b/net/rxrpc/rxkad.c index 7635107726ce..f226709ebd8f 100644 --- a/net/rxrpc/rxkad.c +++ b/net/rxrpc/rxkad.c | |||
@@ -31,7 +31,7 @@ | |||
31 | #define REALM_SZ 40 /* size of principal's auth domain */ | 31 | #define REALM_SZ 40 /* size of principal's auth domain */ |
32 | #define SNAME_SZ 40 /* size of service name */ | 32 | #define SNAME_SZ 40 /* size of service name */ |
33 | 33 | ||
34 | unsigned rxrpc_debug; | 34 | unsigned int rxrpc_debug; |
35 | module_param_named(debug, rxrpc_debug, uint, S_IWUSR | S_IRUGO); | 35 | module_param_named(debug, rxrpc_debug, uint, S_IWUSR | S_IRUGO); |
36 | MODULE_PARM_DESC(debug, "rxkad debugging mask"); | 36 | MODULE_PARM_DESC(debug, "rxkad debugging mask"); |
37 | 37 | ||
@@ -207,7 +207,7 @@ static int rxkad_secure_packet_encrypt(const struct rxrpc_call *call, | |||
207 | struct rxrpc_crypt iv; | 207 | struct rxrpc_crypt iv; |
208 | struct scatterlist sg[16]; | 208 | struct scatterlist sg[16]; |
209 | struct sk_buff *trailer; | 209 | struct sk_buff *trailer; |
210 | unsigned len; | 210 | unsigned int len; |
211 | u16 check; | 211 | u16 check; |
212 | int nsg; | 212 | int nsg; |
213 | 213 | ||
@@ -826,7 +826,7 @@ static int rxkad_decrypt_ticket(struct rxrpc_connection *conn, | |||
826 | struct rxrpc_crypt iv, key; | 826 | struct rxrpc_crypt iv, key; |
827 | struct scatterlist sg[1]; | 827 | struct scatterlist sg[1]; |
828 | struct in_addr addr; | 828 | struct in_addr addr; |
829 | unsigned life; | 829 | unsigned int life; |
830 | time_t issue, now; | 830 | time_t issue, now; |
831 | bool little_endian; | 831 | bool little_endian; |
832 | int ret; | 832 | int ret; |