]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
sdp: fixed sparse warning Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
authorAmir Vadai <amirv@mellanox.co.il>
Mon, 27 Oct 2008 14:45:29 +0000 (16:45 +0200)
committerMukesh Kacker <mukesh.kacker@oracle.com>
Tue, 6 Oct 2015 12:04:19 +0000 (05:04 -0700)
drivers/infiniband/ulp/sdp/sdp_bcopy.c
drivers/infiniband/ulp/sdp/sdp_cma.c
drivers/infiniband/ulp/sdp/sdp_main.c

index d60b25724a42585b10f6c7c88feba8488da8377e..a2472e9bf509f9ecd1f43d709a0e7ebf93b22780 100644 (file)
@@ -303,7 +303,7 @@ static void sdp_post_recv(struct sdp_sock *ssk)
        skb_frag_t *frag;
        struct sdp_bsdh *h;
        int id = ssk->rx_head;
-       unsigned int gfp_page;
+       gfp_t gfp_page;
 
        /* Now, allocate and repost recv */
        /* TODO: allocate from cache */
@@ -496,7 +496,7 @@ void sdp_post_sends(struct sdp_sock *ssk, int nonagle)
        /* TODO: nonagle? */
        struct sk_buff *skb;
        int c;
-       int gfp_page;
+       gfp_t gfp_page;
 
        if (unlikely(!ssk->id)) {
                if (ssk->isk.sk.sk_send_head) {
index 6659d28b6ee1adcf7b59d3d5bfbffbda795ca55c..62068354fadb20925e4d7fb0e504d81127263549 100644 (file)
@@ -93,7 +93,7 @@ static void sdp_qp_event_handler(struct ib_event *event, void *data)
 {
 }
 
-int sdp_init_qp(struct sock *sk, struct rdma_cm_id *id)
+static int sdp_init_qp(struct sock *sk, struct rdma_cm_id *id)
 {
        struct ib_qp_init_attr qp_init_attr = {
                .event_handler = sdp_qp_event_handler,
@@ -193,7 +193,7 @@ err_tx:
        return rc;
 }
 
-int sdp_connect_handler(struct sock *sk, struct rdma_cm_id *id,
+static int sdp_connect_handler(struct sock *sk, struct rdma_cm_id *id,
                        struct rdma_cm_event *event)
 {
        struct sockaddr_in *dst_addr;
@@ -303,7 +303,7 @@ static int sdp_response_handler(struct sock *sk, struct rdma_cm_id *id,
        return 0;
 }
 
-int sdp_connected_handler(struct sock *sk, struct rdma_cm_event *event)
+static int sdp_connected_handler(struct sock *sk, struct rdma_cm_event *event)
 {
        struct sock *parent;
        sdp_dbg(sk, "%s\n", __func__);
@@ -345,7 +345,7 @@ done:
        return 0;
 }
 
-int sdp_disconnected_handler(struct sock *sk)
+static int sdp_disconnected_handler(struct sock *sk)
 {
        struct sdp_sock *ssk = sdp_sk(sk);
 
index 32833cd7e4cf379b8b40c4c945dba9bdc4656625..17e98bb997c3adbe892255fa5bbf7f419e5e812a 100644 (file)
@@ -141,7 +141,7 @@ struct workqueue_struct *sdp_workqueue;
 static struct list_head sock_list;
 static spinlock_t sock_list_lock;
 
-DEFINE_RWLOCK(device_removal_lock);
+static DEFINE_RWLOCK(device_removal_lock);
 
 static inline unsigned int sdp_keepalive_time_when(const struct sdp_sock *ssk)
 {
@@ -1227,7 +1227,7 @@ static inline void skb_entail(struct sock *sk, struct sdp_sock *ssk,
                 ssk->nonagle &= ~TCP_NAGLE_PUSH;
 }
 
-void sdp_push_one(struct sock *sk, unsigned int mss_now)
+static void sdp_push_one(struct sock *sk, unsigned int mss_now)
 {
 }
 
@@ -1593,7 +1593,7 @@ void sdp_bzcopy_write_space(struct sdp_sock *ssk)
 
 /* Like tcp_sendmsg */
 /* TODO: check locking */
-int sdp_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
+static int sdp_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
                size_t size)
 {
        struct iovec *iov;
@@ -1939,7 +1939,6 @@ static int sdp_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
                        }
                }
                if (!(flags & MSG_TRUNC)) {
-                       int err;
                        err = skb_copy_datagram_iovec(skb, offset,
                                                      /* TODO: skip header? */
                                                      msg->msg_iov, used);
@@ -2018,7 +2017,7 @@ static int sdp_listen(struct sock *sk, int backlog)
 /* We almost could use inet_listen, but that calls
    inet_csk_listen_start. Longer term we'll want to add
    a listen callback to struct proto, similiar to bind. */
-int sdp_inet_listen(struct socket *sock, int backlog)
+static int sdp_inet_listen(struct socket *sock, int backlog)
 {
        struct sock *sk = sock->sk;
        unsigned char old_state;
@@ -2453,7 +2452,7 @@ static struct net_proto_family sdp_net_proto = {
        .owner  = THIS_MODULE,
 };
 
-struct ib_client sdp_client = {
+static struct ib_client sdp_client = {
        .name   = "sdp",
        .add    = sdp_add_device,
        .remove = sdp_remove_device