mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
net: cleanup unsigned to unsigned int
Use of "unsigned int" is preferred to bare "unsigned" in net tree. Signed-off-by: Eric Dumazet <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
5e73ea1a31
commit
95c9617472
167 changed files with 461 additions and 455 deletions
|
|
@ -26,7 +26,7 @@ MODULE_AUTHOR("Red Hat, Inc.");
|
|||
MODULE_LICENSE("GPL");
|
||||
MODULE_ALIAS_NETPROTO(PF_RXRPC);
|
||||
|
||||
unsigned rxrpc_debug; // = RXRPC_DEBUG_KPROTO;
|
||||
unsigned int rxrpc_debug; // = RXRPC_DEBUG_KPROTO;
|
||||
module_param_named(debug, rxrpc_debug, uint, S_IWUSR | S_IRUGO);
|
||||
MODULE_PARM_DESC(debug, "RxRPC debugging mask");
|
||||
|
||||
|
|
@ -513,7 +513,7 @@ static int rxrpc_setsockopt(struct socket *sock, int level, int optname,
|
|||
char __user *optval, unsigned int optlen)
|
||||
{
|
||||
struct rxrpc_sock *rx = rxrpc_sk(sock->sk);
|
||||
unsigned min_sec_level;
|
||||
unsigned int min_sec_level;
|
||||
int ret;
|
||||
|
||||
_enter(",%d,%d,,%d", level, optname, optlen);
|
||||
|
|
@ -555,13 +555,13 @@ static int rxrpc_setsockopt(struct socket *sock, int level, int optname,
|
|||
|
||||
case RXRPC_MIN_SECURITY_LEVEL:
|
||||
ret = -EINVAL;
|
||||
if (optlen != sizeof(unsigned))
|
||||
if (optlen != sizeof(unsigned int))
|
||||
goto error;
|
||||
ret = -EISCONN;
|
||||
if (rx->sk.sk_state != RXRPC_UNCONNECTED)
|
||||
goto error;
|
||||
ret = get_user(min_sec_level,
|
||||
(unsigned __user *) optval);
|
||||
(unsigned int __user *) optval);
|
||||
if (ret < 0)
|
||||
goto error;
|
||||
ret = -EINVAL;
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
#include <net/af_rxrpc.h>
|
||||
#include "ar-internal.h"
|
||||
|
||||
static unsigned rxrpc_ack_defer = 1;
|
||||
static unsigned int rxrpc_ack_defer = 1;
|
||||
|
||||
static const char *const rxrpc_acks[] = {
|
||||
"---", "REQ", "DUP", "OOS", "WIN", "MEM", "PNG", "PNR", "DLY", "IDL",
|
||||
|
|
@ -548,11 +548,11 @@ static void rxrpc_zap_tx_window(struct rxrpc_call *call)
|
|||
* process the extra information that may be appended to an ACK packet
|
||||
*/
|
||||
static void rxrpc_extract_ackinfo(struct rxrpc_call *call, struct sk_buff *skb,
|
||||
unsigned latest, int nAcks)
|
||||
unsigned int latest, int nAcks)
|
||||
{
|
||||
struct rxrpc_ackinfo ackinfo;
|
||||
struct rxrpc_peer *peer;
|
||||
unsigned mtu;
|
||||
unsigned int mtu;
|
||||
|
||||
if (skb_copy_bits(skb, nAcks + 3, &ackinfo, sizeof(ackinfo)) < 0) {
|
||||
_leave(" [no ackinfo]");
|
||||
|
|
|
|||
|
|
@ -38,8 +38,8 @@ const char *const rxrpc_call_states[] = {
|
|||
struct kmem_cache *rxrpc_call_jar;
|
||||
LIST_HEAD(rxrpc_calls);
|
||||
DEFINE_RWLOCK(rxrpc_call_lock);
|
||||
static unsigned rxrpc_call_max_lifetime = 60;
|
||||
static unsigned rxrpc_dead_call_timeout = 2;
|
||||
static unsigned int rxrpc_call_max_lifetime = 60;
|
||||
static unsigned int rxrpc_dead_call_timeout = 2;
|
||||
|
||||
static void rxrpc_destroy_call(struct work_struct *work);
|
||||
static void rxrpc_call_life_expired(unsigned long _call);
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ int rxrpc_queue_rcv_skb(struct rxrpc_call *call, struct sk_buff *skb,
|
|||
* --ANK */
|
||||
// ret = -ENOBUFS;
|
||||
// if (atomic_read(&sk->sk_rmem_alloc) + skb->truesize >=
|
||||
// (unsigned) sk->sk_rcvbuf)
|
||||
// (unsigned int) sk->sk_rcvbuf)
|
||||
// goto out;
|
||||
|
||||
ret = sk_filter(sk, skb);
|
||||
|
|
|
|||
|
|
@ -83,7 +83,7 @@ struct rxrpc_skb_priv {
|
|||
struct rxrpc_call *call; /* call with which associated */
|
||||
unsigned long resend_at; /* time in jiffies at which to resend */
|
||||
union {
|
||||
unsigned offset; /* offset into buffer of next read */
|
||||
unsigned int offset; /* offset into buffer of next read */
|
||||
int remain; /* amount of space remaining for next write */
|
||||
u32 error; /* network error code */
|
||||
bool need_resend; /* T if needs resending */
|
||||
|
|
@ -176,9 +176,9 @@ struct rxrpc_peer {
|
|||
struct list_head error_targets; /* targets for net error distribution */
|
||||
spinlock_t lock; /* access lock */
|
||||
atomic_t usage;
|
||||
unsigned if_mtu; /* interface MTU for this peer */
|
||||
unsigned mtu; /* network MTU for this peer */
|
||||
unsigned maxdata; /* data size (MTU - hdrsize) */
|
||||
unsigned int if_mtu; /* interface MTU for this peer */
|
||||
unsigned int mtu; /* network MTU for this peer */
|
||||
unsigned int maxdata; /* data size (MTU - hdrsize) */
|
||||
unsigned short hdrsize; /* header size (IP + UDP + RxRPC) */
|
||||
int debug_id; /* debug ID for printks */
|
||||
int net_error; /* network error distributed */
|
||||
|
|
@ -187,8 +187,8 @@ struct rxrpc_peer {
|
|||
/* calculated RTT cache */
|
||||
#define RXRPC_RTT_CACHE_SIZE 32
|
||||
suseconds_t rtt; /* current RTT estimate (in uS) */
|
||||
unsigned rtt_point; /* next entry at which to insert */
|
||||
unsigned rtt_usage; /* amount of cache actually used */
|
||||
unsigned int rtt_point; /* next entry at which to insert */
|
||||
unsigned int rtt_usage; /* amount of cache actually used */
|
||||
suseconds_t rtt_cache[RXRPC_RTT_CACHE_SIZE]; /* calculated RTT cache */
|
||||
};
|
||||
|
||||
|
|
@ -271,7 +271,7 @@ struct rxrpc_connection {
|
|||
} state;
|
||||
int error; /* error code for local abort */
|
||||
int debug_id; /* debug ID for printks */
|
||||
unsigned call_counter; /* call ID counter */
|
||||
unsigned int call_counter; /* call ID counter */
|
||||
atomic_t serial; /* packet serial number counter */
|
||||
atomic_t hi_serial; /* highest serial number received */
|
||||
u8 avail_calls; /* number of calls available */
|
||||
|
|
@ -592,7 +592,7 @@ extern struct rxrpc_transport *rxrpc_find_transport(struct rxrpc_local *,
|
|||
/*
|
||||
* debug tracing
|
||||
*/
|
||||
extern unsigned rxrpc_debug;
|
||||
extern unsigned int rxrpc_debug;
|
||||
|
||||
#define dbgprintk(FMT,...) \
|
||||
printk("[%-6.6s] "FMT"\n", current->comm ,##__VA_ARGS__)
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@ static int rxrpc_vet_description_s(const char *desc)
|
|||
* - the caller guarantees we have at least 4 words
|
||||
*/
|
||||
static int rxrpc_instantiate_xdr_rxkad(struct key *key, const __be32 *xdr,
|
||||
unsigned toklen)
|
||||
unsigned int toklen)
|
||||
{
|
||||
struct rxrpc_key_token *token, **pptoken;
|
||||
size_t plen;
|
||||
|
|
@ -210,10 +210,10 @@ static void rxrpc_rxk5_free(struct rxk5_key *rxk5)
|
|||
*/
|
||||
static int rxrpc_krb5_decode_principal(struct krb5_principal *princ,
|
||||
const __be32 **_xdr,
|
||||
unsigned *_toklen)
|
||||
unsigned int *_toklen)
|
||||
{
|
||||
const __be32 *xdr = *_xdr;
|
||||
unsigned toklen = *_toklen, n_parts, loop, tmp;
|
||||
unsigned int toklen = *_toklen, n_parts, loop, tmp;
|
||||
|
||||
/* there must be at least one name, and at least #names+1 length
|
||||
* words */
|
||||
|
|
@ -286,10 +286,10 @@ static int rxrpc_krb5_decode_principal(struct krb5_principal *princ,
|
|||
static int rxrpc_krb5_decode_tagged_data(struct krb5_tagged_data *td,
|
||||
size_t max_data_size,
|
||||
const __be32 **_xdr,
|
||||
unsigned *_toklen)
|
||||
unsigned int *_toklen)
|
||||
{
|
||||
const __be32 *xdr = *_xdr;
|
||||
unsigned toklen = *_toklen, len;
|
||||
unsigned int toklen = *_toklen, len;
|
||||
|
||||
/* there must be at least one tag and one length word */
|
||||
if (toklen <= 8)
|
||||
|
|
@ -330,11 +330,11 @@ static int rxrpc_krb5_decode_tagged_array(struct krb5_tagged_data **_td,
|
|||
u8 max_n_elem,
|
||||
size_t max_elem_size,
|
||||
const __be32 **_xdr,
|
||||
unsigned *_toklen)
|
||||
unsigned int *_toklen)
|
||||
{
|
||||
struct krb5_tagged_data *td;
|
||||
const __be32 *xdr = *_xdr;
|
||||
unsigned toklen = *_toklen, n_elem, loop;
|
||||
unsigned int toklen = *_toklen, n_elem, loop;
|
||||
int ret;
|
||||
|
||||
/* there must be at least one count */
|
||||
|
|
@ -380,10 +380,10 @@ static int rxrpc_krb5_decode_tagged_array(struct krb5_tagged_data **_td,
|
|||
* extract a krb5 ticket
|
||||
*/
|
||||
static int rxrpc_krb5_decode_ticket(u8 **_ticket, u16 *_tktlen,
|
||||
const __be32 **_xdr, unsigned *_toklen)
|
||||
const __be32 **_xdr, unsigned int *_toklen)
|
||||
{
|
||||
const __be32 *xdr = *_xdr;
|
||||
unsigned toklen = *_toklen, len;
|
||||
unsigned int toklen = *_toklen, len;
|
||||
|
||||
/* there must be at least one length word */
|
||||
if (toklen <= 4)
|
||||
|
|
@ -419,7 +419,7 @@ static int rxrpc_krb5_decode_ticket(u8 **_ticket, u16 *_tktlen,
|
|||
* - the caller guarantees we have at least 4 words
|
||||
*/
|
||||
static int rxrpc_instantiate_xdr_rxk5(struct key *key, const __be32 *xdr,
|
||||
unsigned toklen)
|
||||
unsigned int toklen)
|
||||
{
|
||||
struct rxrpc_key_token *token, **pptoken;
|
||||
struct rxk5_key *rxk5;
|
||||
|
|
@ -549,7 +549,7 @@ static int rxrpc_instantiate_xdr(struct key *key, const void *data, size_t datal
|
|||
{
|
||||
const __be32 *xdr = data, *token;
|
||||
const char *cp;
|
||||
unsigned len, tmp, loop, ntoken, toklen, sec_ix;
|
||||
unsigned int len, tmp, loop, ntoken, toklen, sec_ix;
|
||||
int ret;
|
||||
|
||||
_enter(",{%x,%x,%x,%x},%zu",
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@
|
|||
#define REALM_SZ 40 /* size of principal's auth domain */
|
||||
#define SNAME_SZ 40 /* size of service name */
|
||||
|
||||
unsigned rxrpc_debug;
|
||||
unsigned int rxrpc_debug;
|
||||
module_param_named(debug, rxrpc_debug, uint, S_IWUSR | S_IRUGO);
|
||||
MODULE_PARM_DESC(debug, "rxkad debugging mask");
|
||||
|
||||
|
|
@ -207,7 +207,7 @@ static int rxkad_secure_packet_encrypt(const struct rxrpc_call *call,
|
|||
struct rxrpc_crypt iv;
|
||||
struct scatterlist sg[16];
|
||||
struct sk_buff *trailer;
|
||||
unsigned len;
|
||||
unsigned int len;
|
||||
u16 check;
|
||||
int nsg;
|
||||
|
||||
|
|
@ -826,7 +826,7 @@ static int rxkad_decrypt_ticket(struct rxrpc_connection *conn,
|
|||
struct rxrpc_crypt iv, key;
|
||||
struct scatterlist sg[1];
|
||||
struct in_addr addr;
|
||||
unsigned life;
|
||||
unsigned int life;
|
||||
time_t issue, now;
|
||||
bool little_endian;
|
||||
int ret;
|
||||
|
|
|
|||
Loading…
Reference in a new issue