Commit b4f1342f authored by David Howells's avatar David Howells

rxrpc: Adjust some whitespace and comments

Remove some excess whitespace, insert some missing spaces and adjust a
couple of comments.
Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
parent 351c1e64
...@@ -121,7 +121,7 @@ static int rxrpc_validate_address(struct rxrpc_sock *rx, ...@@ -121,7 +121,7 @@ static int rxrpc_validate_address(struct rxrpc_sock *rx,
*/ */
static int rxrpc_bind(struct socket *sock, struct sockaddr *saddr, int len) static int rxrpc_bind(struct socket *sock, struct sockaddr *saddr, int len)
{ {
struct sockaddr_rxrpc *srx = (struct sockaddr_rxrpc *) saddr; struct sockaddr_rxrpc *srx = (struct sockaddr_rxrpc *)saddr;
struct sock *sk = sock->sk; struct sock *sk = sock->sk;
struct rxrpc_local *local; struct rxrpc_local *local;
struct rxrpc_sock *rx = rxrpc_sk(sk), *prx; struct rxrpc_sock *rx = rxrpc_sk(sk), *prx;
...@@ -142,7 +142,7 @@ static int rxrpc_bind(struct socket *sock, struct sockaddr *saddr, int len) ...@@ -142,7 +142,7 @@ static int rxrpc_bind(struct socket *sock, struct sockaddr *saddr, int len)
memcpy(&rx->srx, srx, sizeof(rx->srx)); memcpy(&rx->srx, srx, sizeof(rx->srx));
/* find a local transport endpoint if we don't have one already */ /* Find or create a local transport endpoint to use */
local = rxrpc_lookup_local(&rx->srx); local = rxrpc_lookup_local(&rx->srx);
if (IS_ERR(local)) { if (IS_ERR(local)) {
ret = PTR_ERR(local); ret = PTR_ERR(local);
...@@ -297,7 +297,6 @@ struct rxrpc_call *rxrpc_kernel_begin_call(struct socket *sock, ...@@ -297,7 +297,6 @@ struct rxrpc_call *rxrpc_kernel_begin_call(struct socket *sock,
if (!srx) if (!srx)
srx = &rx->srx; srx = &rx->srx;
if (!key) if (!key)
key = rx->key; key = rx->key;
if (key && !key->payload.data[0]) if (key && !key->payload.data[0])
...@@ -319,7 +318,6 @@ struct rxrpc_call *rxrpc_kernel_begin_call(struct socket *sock, ...@@ -319,7 +318,6 @@ struct rxrpc_call *rxrpc_kernel_begin_call(struct socket *sock,
_leave(" = %p", call); _leave(" = %p", call);
return call; return call;
} }
EXPORT_SYMBOL(rxrpc_kernel_begin_call); EXPORT_SYMBOL(rxrpc_kernel_begin_call);
/** /**
...@@ -335,7 +333,6 @@ void rxrpc_kernel_end_call(struct rxrpc_call *call) ...@@ -335,7 +333,6 @@ void rxrpc_kernel_end_call(struct rxrpc_call *call)
rxrpc_remove_user_ID(call->socket, call); rxrpc_remove_user_ID(call->socket, call);
rxrpc_put_call(call); rxrpc_put_call(call);
} }
EXPORT_SYMBOL(rxrpc_kernel_end_call); EXPORT_SYMBOL(rxrpc_kernel_end_call);
/** /**
...@@ -616,7 +613,7 @@ static int rxrpc_create(struct net *net, struct socket *sock, int protocol, ...@@ -616,7 +613,7 @@ static int rxrpc_create(struct net *net, struct socket *sock, int protocol,
if (!net_eq(net, &init_net)) if (!net_eq(net, &init_net))
return -EAFNOSUPPORT; return -EAFNOSUPPORT;
/* we support transport protocol UDP only */ /* we support transport protocol UDP/UDP6 only */
if (protocol != PF_INET) if (protocol != PF_INET)
return -EPROTONOSUPPORT; return -EPROTONOSUPPORT;
......
...@@ -415,7 +415,7 @@ struct rxrpc_call *rxrpc_accept_call(struct rxrpc_sock *rx, ...@@ -415,7 +415,7 @@ struct rxrpc_call *rxrpc_accept_call(struct rxrpc_sock *rx,
} }
/* /*
* handle rejectance of a call by userspace * Handle rejection of a call by userspace
* - reject the call at the front of the queue * - reject the call at the front of the queue
*/ */
int rxrpc_reject_call(struct rxrpc_sock *rx) int rxrpc_reject_call(struct rxrpc_sock *rx)
...@@ -495,7 +495,6 @@ struct rxrpc_call *rxrpc_kernel_accept_call(struct socket *sock, ...@@ -495,7 +495,6 @@ struct rxrpc_call *rxrpc_kernel_accept_call(struct socket *sock,
_leave(" = %p", call); _leave(" = %p", call);
return call; return call;
} }
EXPORT_SYMBOL(rxrpc_kernel_accept_call); EXPORT_SYMBOL(rxrpc_kernel_accept_call);
/** /**
...@@ -514,5 +513,4 @@ int rxrpc_kernel_reject_call(struct socket *sock) ...@@ -514,5 +513,4 @@ int rxrpc_kernel_reject_call(struct socket *sock)
_leave(" = %d", ret); _leave(" = %d", ret);
return ret; return ret;
} }
EXPORT_SYMBOL(rxrpc_kernel_reject_call); EXPORT_SYMBOL(rxrpc_kernel_reject_call);
...@@ -115,7 +115,6 @@ void rxrpc_UDP_error_report(struct sock *sk) ...@@ -115,7 +115,6 @@ void rxrpc_UDP_error_report(struct sock *sk)
/* pass the transport ref to error_handler to release */ /* pass the transport ref to error_handler to release */
skb_queue_tail(&trans->error_queue, skb); skb_queue_tail(&trans->error_queue, skb);
rxrpc_queue_work(&trans->error_handler); rxrpc_queue_work(&trans->error_handler);
_leave(""); _leave("");
} }
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
BUG_ON(atomic_read((X)) >> (sizeof(atomic_t) - 2) == \ BUG_ON(atomic_read((X)) >> (sizeof(atomic_t) - 2) == \
(POISON_FREE << 8 | POISON_FREE)) (POISON_FREE << 8 | POISON_FREE))
#else #else
#define CHECK_SLAB_OKAY(X) do {} while(0) #define CHECK_SLAB_OKAY(X) do {} while (0)
#endif #endif
#define FCRYPT_BSIZE 8 #define FCRYPT_BSIZE 8
...@@ -726,7 +726,7 @@ do { \ ...@@ -726,7 +726,7 @@ do { \
printk(KERN_ERR "RxRPC: Assertion failed\n"); \ printk(KERN_ERR "RxRPC: Assertion failed\n"); \
BUG(); \ BUG(); \
} \ } \
} while(0) } while (0)
#define ASSERTCMP(X, OP, Y) \ #define ASSERTCMP(X, OP, Y) \
do { \ do { \
...@@ -739,7 +739,7 @@ do { \ ...@@ -739,7 +739,7 @@ do { \
(unsigned long)(X), (unsigned long)(Y)); \ (unsigned long)(X), (unsigned long)(Y)); \
BUG(); \ BUG(); \
} \ } \
} while(0) } while (0)
#define ASSERTIF(C, X) \ #define ASSERTIF(C, X) \
do { \ do { \
...@@ -748,7 +748,7 @@ do { \ ...@@ -748,7 +748,7 @@ do { \
printk(KERN_ERR "RxRPC: Assertion failed\n"); \ printk(KERN_ERR "RxRPC: Assertion failed\n"); \
BUG(); \ BUG(); \
} \ } \
} while(0) } while (0)
#define ASSERTIFCMP(C, X, OP, Y) \ #define ASSERTIFCMP(C, X, OP, Y) \
do { \ do { \
...@@ -761,25 +761,25 @@ do { \ ...@@ -761,25 +761,25 @@ do { \
(unsigned long)(X), (unsigned long)(Y)); \ (unsigned long)(X), (unsigned long)(Y)); \
BUG(); \ BUG(); \
} \ } \
} while(0) } while (0)
#else #else
#define ASSERT(X) \ #define ASSERT(X) \
do { \ do { \
} while(0) } while (0)
#define ASSERTCMP(X, OP, Y) \ #define ASSERTCMP(X, OP, Y) \
do { \ do { \
} while(0) } while (0)
#define ASSERTIF(C, X) \ #define ASSERTIF(C, X) \
do { \ do { \
} while(0) } while (0)
#define ASSERTIFCMP(C, X, OP, Y) \ #define ASSERTIFCMP(C, X, OP, Y) \
do { \ do { \
} while(0) } while (0)
#endif /* __KDEBUGALL */ #endif /* __KDEBUGALL */
...@@ -836,9 +836,9 @@ do { \ ...@@ -836,9 +836,9 @@ do { \
CHECK_SLAB_OKAY(&(CALL)->usage); \ CHECK_SLAB_OKAY(&(CALL)->usage); \
if (atomic_inc_return(&(CALL)->usage) == 1) \ if (atomic_inc_return(&(CALL)->usage) == 1) \
BUG(); \ BUG(); \
} while(0) } while (0)
#define rxrpc_put_call(CALL) \ #define rxrpc_put_call(CALL) \
do { \ do { \
__rxrpc_put_call(CALL); \ __rxrpc_put_call(CALL); \
} while(0) } while (0)
...@@ -167,7 +167,7 @@ int rxrpc_init_server_conn_security(struct rxrpc_connection *conn) ...@@ -167,7 +167,7 @@ int rxrpc_init_server_conn_security(struct rxrpc_connection *conn)
struct rxrpc_sock *rx; struct rxrpc_sock *rx;
struct key *key; struct key *key;
key_ref_t kref; key_ref_t kref;
char kdesc[5+1+3+1]; char kdesc[5 + 1 + 3 + 1];
_enter(""); _enter("");
......
...@@ -133,5 +133,4 @@ void rxrpc_kernel_free_skb(struct sk_buff *skb) ...@@ -133,5 +133,4 @@ void rxrpc_kernel_free_skb(struct sk_buff *skb)
{ {
rxrpc_free_skb(skb); rxrpc_free_skb(skb);
} }
EXPORT_SYMBOL(rxrpc_kernel_free_skb); EXPORT_SYMBOL(rxrpc_kernel_free_skb);
...@@ -195,9 +195,9 @@ static int rxkad_secure_packet_auth(const struct rxrpc_call *call, ...@@ -195,9 +195,9 @@ static int rxkad_secure_packet_auth(const struct rxrpc_call *call,
* wholly encrypt a packet (level 2 security) * wholly encrypt a packet (level 2 security)
*/ */
static int rxkad_secure_packet_encrypt(const struct rxrpc_call *call, static int rxkad_secure_packet_encrypt(const struct rxrpc_call *call,
struct sk_buff *skb, struct sk_buff *skb,
u32 data_size, u32 data_size,
void *sechdr) void *sechdr)
{ {
const struct rxrpc_key_token *token; const struct rxrpc_key_token *token;
struct rxkad_level2_hdr rxkhdr struct rxkad_level2_hdr rxkhdr
...@@ -251,9 +251,9 @@ static int rxkad_secure_packet_encrypt(const struct rxrpc_call *call, ...@@ -251,9 +251,9 @@ static int rxkad_secure_packet_encrypt(const struct rxrpc_call *call,
* checksum an RxRPC packet header * checksum an RxRPC packet header
*/ */
static int rxkad_secure_packet(const struct rxrpc_call *call, static int rxkad_secure_packet(const struct rxrpc_call *call,
struct sk_buff *skb, struct sk_buff *skb,
size_t data_size, size_t data_size,
void *sechdr) void *sechdr)
{ {
struct rxrpc_skb_priv *sp; struct rxrpc_skb_priv *sp;
struct blkcipher_desc desc; struct blkcipher_desc desc;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment