pid: reduce code size by using a pointer to iterate over array
[safe/jmp/linux-2.6] / net / rxrpc / af_rxrpc.c
index bfe493e..287b141 100644 (file)
@@ -507,7 +507,7 @@ out:
  * set RxRPC socket options
  */
 static int rxrpc_setsockopt(struct socket *sock, int level, int optname,
-                           char __user *optval, int optlen)
+                           char __user *optval, unsigned int optlen)
 {
        struct rxrpc_sock *rx = rxrpc_sk(sock->sk);
        unsigned min_sec_level;
@@ -608,14 +608,15 @@ static unsigned int rxrpc_poll(struct file *file, struct socket *sock,
 /*
  * create an RxRPC socket
  */
-static int rxrpc_create(struct net *net, struct socket *sock, int protocol)
+static int rxrpc_create(struct net *net, struct socket *sock, int protocol,
+                       int kern)
 {
        struct rxrpc_sock *rx;
        struct sock *sk;
 
        _enter("%p,%d", sock, protocol);
 
-       if (net != &init_net)
+       if (!net_eq(net, &init_net))
                return -EAFNOSUPPORT;
 
        /* we support transport protocol UDP only */
@@ -777,7 +778,7 @@ static struct proto rxrpc_proto = {
        .max_header     = sizeof(struct rxrpc_header),
 };
 
-static struct net_proto_family rxrpc_family_ops = {
+static const struct net_proto_family rxrpc_family_ops = {
        .family = PF_RXRPC,
        .create = rxrpc_create,
        .owner  = THIS_MODULE,