aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorstephen hemminger <shemminger@vyatta.com>2010-10-19 04:08:33 -0400
committerDavid S. Miller <davem@davemloft.net>2010-10-21 07:26:39 -0400
commitff51bf841587c75b58d25ed77263158619784dd3 (patch)
tree85d415536b84c48afe2aea0243f420ac262e1bbd
parentd0c2b0d265a0f1f92922a99a31def9da582197ac (diff)
rds: make local functions/variables static
The RDS protocol has lots of functions that should be declared static. rds_message_get/add_version_extension is removed since it defined but never used. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--net/rds/connection.c2
-rw-r--r--net/rds/ib.c10
-rw-r--r--net/rds/ib.h4
-rw-r--r--net/rds/ib_rdma.c2
-rw-r--r--net/rds/ib_sysctl.c2
-rw-r--r--net/rds/iw.c4
-rw-r--r--net/rds/iw.h4
-rw-r--r--net/rds/iw_rdma.c3
-rw-r--r--net/rds/iw_sysctl.c2
-rw-r--r--net/rds/message.c24
-rw-r--r--net/rds/page.c3
-rw-r--r--net/rds/rdma_transport.c4
-rw-r--r--net/rds/rdma_transport.h4
-rw-r--r--net/rds/rds.h5
-rw-r--r--net/rds/recv.c3
-rw-r--r--net/rds/send.c4
-rw-r--r--net/rds/tcp.c6
-rw-r--r--net/rds/tcp.h2
-rw-r--r--net/rds/tcp_recv.c3
-rw-r--r--net/rds/tcp_send.c2
20 files changed, 29 insertions, 64 deletions
diff --git a/net/rds/connection.c b/net/rds/connection.c
index 870992e08cae..9334d892366e 100644
--- a/net/rds/connection.c
+++ b/net/rds/connection.c
@@ -88,7 +88,7 @@ static struct rds_connection *rds_conn_lookup(struct hlist_head *head,
88 * and receiving over this connection again in the future. It is up to 88 * and receiving over this connection again in the future. It is up to
89 * the transport to have serialized this call with its send and recv. 89 * the transport to have serialized this call with its send and recv.
90 */ 90 */
91void rds_conn_reset(struct rds_connection *conn) 91static void rds_conn_reset(struct rds_connection *conn)
92{ 92{
93 rdsdebug("connection %pI4 to %pI4 reset\n", 93 rdsdebug("connection %pI4 to %pI4 reset\n",
94 &conn->c_laddr, &conn->c_faddr); 94 &conn->c_laddr, &conn->c_faddr);
diff --git a/net/rds/ib.c b/net/rds/ib.c
index b12a3951167d..4123967d4d65 100644
--- a/net/rds/ib.c
+++ b/net/rds/ib.c
@@ -42,7 +42,7 @@
42#include "rds.h" 42#include "rds.h"
43#include "ib.h" 43#include "ib.h"
44 44
45unsigned int fmr_pool_size = RDS_FMR_POOL_SIZE; 45static unsigned int fmr_pool_size = RDS_FMR_POOL_SIZE;
46unsigned int fmr_message_size = RDS_FMR_SIZE + 1; /* +1 allows for unaligned MRs */ 46unsigned int fmr_message_size = RDS_FMR_SIZE + 1; /* +1 allows for unaligned MRs */
47unsigned int rds_ib_retry_count = RDS_IB_DEFAULT_RETRY_COUNT; 47unsigned int rds_ib_retry_count = RDS_IB_DEFAULT_RETRY_COUNT;
48 48
@@ -65,7 +65,7 @@ struct list_head rds_ib_devices;
65DEFINE_SPINLOCK(ib_nodev_conns_lock); 65DEFINE_SPINLOCK(ib_nodev_conns_lock);
66LIST_HEAD(ib_nodev_conns); 66LIST_HEAD(ib_nodev_conns);
67 67
68void rds_ib_nodev_connect(void) 68static void rds_ib_nodev_connect(void)
69{ 69{
70 struct rds_ib_connection *ic; 70 struct rds_ib_connection *ic;
71 71
@@ -75,7 +75,7 @@ void rds_ib_nodev_connect(void)
75 spin_unlock(&ib_nodev_conns_lock); 75 spin_unlock(&ib_nodev_conns_lock);
76} 76}
77 77
78void rds_ib_dev_shutdown(struct rds_ib_device *rds_ibdev) 78static void rds_ib_dev_shutdown(struct rds_ib_device *rds_ibdev)
79{ 79{
80 struct rds_ib_connection *ic; 80 struct rds_ib_connection *ic;
81 unsigned long flags; 81 unsigned long flags;
@@ -118,7 +118,7 @@ void rds_ib_dev_put(struct rds_ib_device *rds_ibdev)
118 queue_work(rds_wq, &rds_ibdev->free_work); 118 queue_work(rds_wq, &rds_ibdev->free_work);
119} 119}
120 120
121void rds_ib_add_one(struct ib_device *device) 121static void rds_ib_add_one(struct ib_device *device)
122{ 122{
123 struct rds_ib_device *rds_ibdev; 123 struct rds_ib_device *rds_ibdev;
124 struct ib_device_attr *dev_attr; 124 struct ib_device_attr *dev_attr;
@@ -229,7 +229,7 @@ struct rds_ib_device *rds_ib_get_client_data(struct ib_device *device)
229 * 229 *
230 * This can be called at any time and can be racing with any other RDS path. 230 * This can be called at any time and can be racing with any other RDS path.
231 */ 231 */
232void rds_ib_remove_one(struct ib_device *device) 232static void rds_ib_remove_one(struct ib_device *device)
233{ 233{
234 struct rds_ib_device *rds_ibdev; 234 struct rds_ib_device *rds_ibdev;
235 235
diff --git a/net/rds/ib.h b/net/rds/ib.h
index 7ad3d57e06a5..e34ad032b66d 100644
--- a/net/rds/ib.h
+++ b/net/rds/ib.h
@@ -265,13 +265,10 @@ static inline void rds_ib_dma_sync_sg_for_device(struct ib_device *dev,
265 265
266/* ib.c */ 266/* ib.c */
267extern struct rds_transport rds_ib_transport; 267extern struct rds_transport rds_ib_transport;
268extern void rds_ib_add_one(struct ib_device *device);
269extern void rds_ib_remove_one(struct ib_device *device);
270struct rds_ib_device *rds_ib_get_client_data(struct ib_device *device); 268struct rds_ib_device *rds_ib_get_client_data(struct ib_device *device);
271void rds_ib_dev_put(struct rds_ib_device *rds_ibdev); 269void rds_ib_dev_put(struct rds_ib_device *rds_ibdev);
272extern struct ib_client rds_ib_client; 270extern struct ib_client rds_ib_client;
273 271
274extern unsigned int fmr_pool_size;
275extern unsigned int fmr_message_size; 272extern unsigned int fmr_message_size;
276extern unsigned int rds_ib_retry_count; 273extern unsigned int rds_ib_retry_count;
277 274
@@ -374,6 +371,5 @@ extern unsigned long rds_ib_sysctl_max_unsig_wrs;
374extern unsigned long rds_ib_sysctl_max_unsig_bytes; 371extern unsigned long rds_ib_sysctl_max_unsig_bytes;
375extern unsigned long rds_ib_sysctl_max_recv_allocation; 372extern unsigned long rds_ib_sysctl_max_recv_allocation;
376extern unsigned int rds_ib_sysctl_flow_control; 373extern unsigned int rds_ib_sysctl_flow_control;
377extern ctl_table rds_ib_sysctl_table[];
378 374
379#endif 375#endif
diff --git a/net/rds/ib_rdma.c b/net/rds/ib_rdma.c
index b5a88415a18e..18a833c450c8 100644
--- a/net/rds/ib_rdma.c
+++ b/net/rds/ib_rdma.c
@@ -38,7 +38,7 @@
38#include "ib.h" 38#include "ib.h"
39#include "xlist.h" 39#include "xlist.h"
40 40
41struct workqueue_struct *rds_ib_fmr_wq; 41static struct workqueue_struct *rds_ib_fmr_wq;
42 42
43static DEFINE_PER_CPU(unsigned long, clean_list_grace); 43static DEFINE_PER_CPU(unsigned long, clean_list_grace);
44#define CLEAN_LIST_BUSY_BIT 0 44#define CLEAN_LIST_BUSY_BIT 0
diff --git a/net/rds/ib_sysctl.c b/net/rds/ib_sysctl.c
index fc3da37220fd..1253b006efdb 100644
--- a/net/rds/ib_sysctl.c
+++ b/net/rds/ib_sysctl.c
@@ -61,7 +61,7 @@ static unsigned long rds_ib_sysctl_max_unsig_wr_max = 64;
61 */ 61 */
62unsigned int rds_ib_sysctl_flow_control = 0; 62unsigned int rds_ib_sysctl_flow_control = 0;
63 63
64ctl_table rds_ib_sysctl_table[] = { 64static ctl_table rds_ib_sysctl_table[] = {
65 { 65 {
66 .procname = "max_send_wr", 66 .procname = "max_send_wr",
67 .data = &rds_ib_sysctl_max_send_wr, 67 .data = &rds_ib_sysctl_max_send_wr,
diff --git a/net/rds/iw.c b/net/rds/iw.c
index 56808cac0fc7..5a9676fe594f 100644
--- a/net/rds/iw.c
+++ b/net/rds/iw.c
@@ -56,7 +56,7 @@ struct list_head rds_iw_devices;
56DEFINE_SPINLOCK(iw_nodev_conns_lock); 56DEFINE_SPINLOCK(iw_nodev_conns_lock);
57LIST_HEAD(iw_nodev_conns); 57LIST_HEAD(iw_nodev_conns);
58 58
59void rds_iw_add_one(struct ib_device *device) 59static void rds_iw_add_one(struct ib_device *device)
60{ 60{
61 struct rds_iw_device *rds_iwdev; 61 struct rds_iw_device *rds_iwdev;
62 struct ib_device_attr *dev_attr; 62 struct ib_device_attr *dev_attr;
@@ -124,7 +124,7 @@ free_attr:
124 kfree(dev_attr); 124 kfree(dev_attr);
125} 125}
126 126
127void rds_iw_remove_one(struct ib_device *device) 127static void rds_iw_remove_one(struct ib_device *device)
128{ 128{
129 struct rds_iw_device *rds_iwdev; 129 struct rds_iw_device *rds_iwdev;
130 struct rds_iw_cm_id *i_cm_id, *next; 130 struct rds_iw_cm_id *i_cm_id, *next;
diff --git a/net/rds/iw.h b/net/rds/iw.h
index 543e665fafe3..90151922178c 100644
--- a/net/rds/iw.h
+++ b/net/rds/iw.h
@@ -268,8 +268,6 @@ static inline u32 rds_iw_local_dma_lkey(struct rds_iw_connection *ic)
268 268
269/* ib.c */ 269/* ib.c */
270extern struct rds_transport rds_iw_transport; 270extern struct rds_transport rds_iw_transport;
271extern void rds_iw_add_one(struct ib_device *device);
272extern void rds_iw_remove_one(struct ib_device *device);
273extern struct ib_client rds_iw_client; 271extern struct ib_client rds_iw_client;
274 272
275extern unsigned int fastreg_pool_size; 273extern unsigned int fastreg_pool_size;
@@ -318,7 +316,6 @@ void *rds_iw_get_mr(struct scatterlist *sg, unsigned long nents,
318void rds_iw_sync_mr(void *trans_private, int dir); 316void rds_iw_sync_mr(void *trans_private, int dir);
319void rds_iw_free_mr(void *trans_private, int invalidate); 317void rds_iw_free_mr(void *trans_private, int invalidate);
320void rds_iw_flush_mrs(void); 318void rds_iw_flush_mrs(void);
321void rds_iw_remove_cm_id(struct rds_iw_device *rds_iwdev, struct rdma_cm_id *cm_id);
322 319
323/* ib_recv.c */ 320/* ib_recv.c */
324int rds_iw_recv_init(void); 321int rds_iw_recv_init(void);
@@ -378,7 +375,6 @@ extern unsigned long rds_iw_sysctl_max_unsig_wrs;
378extern unsigned long rds_iw_sysctl_max_unsig_bytes; 375extern unsigned long rds_iw_sysctl_max_unsig_bytes;
379extern unsigned long rds_iw_sysctl_max_recv_allocation; 376extern unsigned long rds_iw_sysctl_max_recv_allocation;
380extern unsigned int rds_iw_sysctl_flow_control; 377extern unsigned int rds_iw_sysctl_flow_control;
381extern ctl_table rds_iw_sysctl_table[];
382 378
383/* 379/*
384 * Helper functions for getting/setting the header and data SGEs in 380 * Helper functions for getting/setting the header and data SGEs in
diff --git a/net/rds/iw_rdma.c b/net/rds/iw_rdma.c
index 0e7accc23ee2..59509e9a9e72 100644
--- a/net/rds/iw_rdma.c
+++ b/net/rds/iw_rdma.c
@@ -157,7 +157,8 @@ static int rds_iw_add_cm_id(struct rds_iw_device *rds_iwdev, struct rdma_cm_id *
157 return 0; 157 return 0;
158} 158}
159 159
160void rds_iw_remove_cm_id(struct rds_iw_device *rds_iwdev, struct rdma_cm_id *cm_id) 160static void rds_iw_remove_cm_id(struct rds_iw_device *rds_iwdev,
161 struct rdma_cm_id *cm_id)
161{ 162{
162 struct rds_iw_cm_id *i_cm_id; 163 struct rds_iw_cm_id *i_cm_id;
163 164
diff --git a/net/rds/iw_sysctl.c b/net/rds/iw_sysctl.c
index 23e3a9a26aaf..e2e47176e729 100644
--- a/net/rds/iw_sysctl.c
+++ b/net/rds/iw_sysctl.c
@@ -55,7 +55,7 @@ static unsigned long rds_iw_sysctl_max_unsig_bytes_max = ~0UL;
55 55
56unsigned int rds_iw_sysctl_flow_control = 1; 56unsigned int rds_iw_sysctl_flow_control = 1;
57 57
58ctl_table rds_iw_sysctl_table[] = { 58static ctl_table rds_iw_sysctl_table[] = {
59 { 59 {
60 .procname = "max_send_wr", 60 .procname = "max_send_wr",
61 .data = &rds_iw_sysctl_max_send_wr, 61 .data = &rds_iw_sysctl_max_send_wr,
diff --git a/net/rds/message.c b/net/rds/message.c
index 84f937f11d47..a84545dae370 100644
--- a/net/rds/message.c
+++ b/net/rds/message.c
@@ -106,8 +106,8 @@ void rds_message_populate_header(struct rds_header *hdr, __be16 sport,
106} 106}
107EXPORT_SYMBOL_GPL(rds_message_populate_header); 107EXPORT_SYMBOL_GPL(rds_message_populate_header);
108 108
109int rds_message_add_extension(struct rds_header *hdr, 109int rds_message_add_extension(struct rds_header *hdr, unsigned int type,
110 unsigned int type, const void *data, unsigned int len) 110 const void *data, unsigned int len)
111{ 111{
112 unsigned int ext_len = sizeof(u8) + len; 112 unsigned int ext_len = sizeof(u8) + len;
113 unsigned char *dst; 113 unsigned char *dst;
@@ -177,26 +177,6 @@ none:
177 return RDS_EXTHDR_NONE; 177 return RDS_EXTHDR_NONE;
178} 178}
179 179
180int rds_message_add_version_extension(struct rds_header *hdr, unsigned int version)
181{
182 struct rds_ext_header_version ext_hdr;
183
184 ext_hdr.h_version = cpu_to_be32(version);
185 return rds_message_add_extension(hdr, RDS_EXTHDR_VERSION, &ext_hdr, sizeof(ext_hdr));
186}
187
188int rds_message_get_version_extension(struct rds_header *hdr, unsigned int *version)
189{
190 struct rds_ext_header_version ext_hdr;
191 unsigned int pos = 0, len = sizeof(ext_hdr);
192
193 /* We assume the version extension is the only one present */
194 if (rds_message_next_extension(hdr, &pos, &ext_hdr, &len) != RDS_EXTHDR_VERSION)
195 return 0;
196 *version = be32_to_cpu(ext_hdr.h_version);
197 return 1;
198}
199
200int rds_message_add_rdma_dest_extension(struct rds_header *hdr, u32 r_key, u32 offset) 180int rds_message_add_rdma_dest_extension(struct rds_header *hdr, u32 r_key, u32 offset)
201{ 181{
202 struct rds_ext_header_rdma_dest ext_hdr; 182 struct rds_ext_header_rdma_dest ext_hdr;
diff --git a/net/rds/page.c b/net/rds/page.c
index 5e44f5ae7898..a3e2e0ac8a60 100644
--- a/net/rds/page.c
+++ b/net/rds/page.c
@@ -40,7 +40,8 @@ struct rds_page_remainder {
40 unsigned long r_offset; 40 unsigned long r_offset;
41}; 41};
42 42
43DEFINE_PER_CPU_SHARED_ALIGNED(struct rds_page_remainder, rds_page_remainders); 43static DEFINE_PER_CPU_SHARED_ALIGNED(struct rds_page_remainder,
44 rds_page_remainders);
44 45
45/* 46/*
46 * returns 0 on success or -errno on failure. 47 * returns 0 on success or -errno on failure.
diff --git a/net/rds/rdma_transport.c b/net/rds/rdma_transport.c
index e6ed10aee190..4195a0539829 100644
--- a/net/rds/rdma_transport.c
+++ b/net/rds/rdma_transport.c
@@ -207,7 +207,7 @@ static void rds_rdma_listen_stop(void)
207 } 207 }
208} 208}
209 209
210int rds_rdma_init(void) 210static int rds_rdma_init(void)
211{ 211{
212 int ret; 212 int ret;
213 213
@@ -234,7 +234,7 @@ out:
234} 234}
235module_init(rds_rdma_init); 235module_init(rds_rdma_init);
236 236
237void rds_rdma_exit(void) 237static void rds_rdma_exit(void)
238{ 238{
239 /* stop listening first to ensure no new connections are attempted */ 239 /* stop listening first to ensure no new connections are attempted */
240 rds_rdma_listen_stop(); 240 rds_rdma_listen_stop();
diff --git a/net/rds/rdma_transport.h b/net/rds/rdma_transport.h
index 2f2c7d976c21..faba4e382695 100644
--- a/net/rds/rdma_transport.h
+++ b/net/rds/rdma_transport.h
@@ -11,10 +11,6 @@ int rds_rdma_conn_connect(struct rds_connection *conn);
11int rds_rdma_cm_event_handler(struct rdma_cm_id *cm_id, 11int rds_rdma_cm_event_handler(struct rdma_cm_id *cm_id,
12 struct rdma_cm_event *event); 12 struct rdma_cm_event *event);
13 13
14/* from rdma_transport.c */
15int rds_rdma_init(void);
16void rds_rdma_exit(void);
17
18/* from ib.c */ 14/* from ib.c */
19extern struct rds_transport rds_ib_transport; 15extern struct rds_transport rds_ib_transport;
20int rds_ib_init(void); 16int rds_ib_init(void);
diff --git a/net/rds/rds.h b/net/rds/rds.h
index 8103dcf8b976..9542449c0720 100644
--- a/net/rds/rds.h
+++ b/net/rds/rds.h
@@ -619,7 +619,6 @@ struct rds_connection *rds_conn_create_outgoing(__be32 laddr, __be32 faddr,
619 struct rds_transport *trans, gfp_t gfp); 619 struct rds_transport *trans, gfp_t gfp);
620void rds_conn_shutdown(struct rds_connection *conn); 620void rds_conn_shutdown(struct rds_connection *conn);
621void rds_conn_destroy(struct rds_connection *conn); 621void rds_conn_destroy(struct rds_connection *conn);
622void rds_conn_reset(struct rds_connection *conn);
623void rds_conn_drop(struct rds_connection *conn); 622void rds_conn_drop(struct rds_connection *conn);
624void rds_conn_connect_if_down(struct rds_connection *conn); 623void rds_conn_connect_if_down(struct rds_connection *conn);
625void rds_for_each_conn_info(struct socket *sock, unsigned int len, 624void rds_for_each_conn_info(struct socket *sock, unsigned int len,
@@ -668,8 +667,6 @@ int rds_message_add_extension(struct rds_header *hdr,
668 unsigned int type, const void *data, unsigned int len); 667 unsigned int type, const void *data, unsigned int len);
669int rds_message_next_extension(struct rds_header *hdr, 668int rds_message_next_extension(struct rds_header *hdr,
670 unsigned int *pos, void *buf, unsigned int *buflen); 669 unsigned int *pos, void *buf, unsigned int *buflen);
671int rds_message_add_version_extension(struct rds_header *hdr, unsigned int version);
672int rds_message_get_version_extension(struct rds_header *hdr, unsigned int *version);
673int rds_message_add_rdma_dest_extension(struct rds_header *hdr, u32 r_key, u32 offset); 670int rds_message_add_rdma_dest_extension(struct rds_header *hdr, u32 r_key, u32 offset);
674int rds_message_inc_copy_to_user(struct rds_incoming *inc, 671int rds_message_inc_copy_to_user(struct rds_incoming *inc,
675 struct iovec *first_iov, size_t size); 672 struct iovec *first_iov, size_t size);
@@ -706,7 +703,6 @@ void rds_page_exit(void);
706/* recv.c */ 703/* recv.c */
707void rds_inc_init(struct rds_incoming *inc, struct rds_connection *conn, 704void rds_inc_init(struct rds_incoming *inc, struct rds_connection *conn,
708 __be32 saddr); 705 __be32 saddr);
709void rds_inc_addref(struct rds_incoming *inc);
710void rds_inc_put(struct rds_incoming *inc); 706void rds_inc_put(struct rds_incoming *inc);
711void rds_recv_incoming(struct rds_connection *conn, __be32 saddr, __be32 daddr, 707void rds_recv_incoming(struct rds_connection *conn, __be32 saddr, __be32 daddr,
712 struct rds_incoming *inc, gfp_t gfp, enum km_type km); 708 struct rds_incoming *inc, gfp_t gfp, enum km_type km);
@@ -728,7 +724,6 @@ void rds_send_drop_to(struct rds_sock *rs, struct sockaddr_in *dest);
728typedef int (*is_acked_func)(struct rds_message *rm, uint64_t ack); 724typedef int (*is_acked_func)(struct rds_message *rm, uint64_t ack);
729void rds_send_drop_acked(struct rds_connection *conn, u64 ack, 725void rds_send_drop_acked(struct rds_connection *conn, u64 ack,
730 is_acked_func is_acked); 726 is_acked_func is_acked);
731void rds_send_remove_from_sock(struct list_head *messages, int status);
732int rds_send_pong(struct rds_connection *conn, __be16 dport); 727int rds_send_pong(struct rds_connection *conn, __be16 dport);
733struct rds_message *rds_send_get_message(struct rds_connection *, 728struct rds_message *rds_send_get_message(struct rds_connection *,
734 struct rm_rdma_op *); 729 struct rm_rdma_op *);
diff --git a/net/rds/recv.c b/net/rds/recv.c
index 68800f02aa30..596689e59272 100644
--- a/net/rds/recv.c
+++ b/net/rds/recv.c
@@ -48,12 +48,11 @@ void rds_inc_init(struct rds_incoming *inc, struct rds_connection *conn,
48} 48}
49EXPORT_SYMBOL_GPL(rds_inc_init); 49EXPORT_SYMBOL_GPL(rds_inc_init);
50 50
51void rds_inc_addref(struct rds_incoming *inc) 51static void rds_inc_addref(struct rds_incoming *inc)
52{ 52{
53 rdsdebug("addref inc %p ref %d\n", inc, atomic_read(&inc->i_refcount)); 53 rdsdebug("addref inc %p ref %d\n", inc, atomic_read(&inc->i_refcount));
54 atomic_inc(&inc->i_refcount); 54 atomic_inc(&inc->i_refcount);
55} 55}
56EXPORT_SYMBOL_GPL(rds_inc_addref);
57 56
58void rds_inc_put(struct rds_incoming *inc) 57void rds_inc_put(struct rds_incoming *inc)
59{ 58{
diff --git a/net/rds/send.c b/net/rds/send.c
index 9b951a0ab6b7..0bc9db17a87d 100644
--- a/net/rds/send.c
+++ b/net/rds/send.c
@@ -52,6 +52,8 @@ static int send_batch_count = 64;
52module_param(send_batch_count, int, 0444); 52module_param(send_batch_count, int, 0444);
53MODULE_PARM_DESC(send_batch_count, " batch factor when working the send queue"); 53MODULE_PARM_DESC(send_batch_count, " batch factor when working the send queue");
54 54
55static void rds_send_remove_from_sock(struct list_head *messages, int status);
56
55/* 57/*
56 * Reset the send state. Callers must ensure that this doesn't race with 58 * Reset the send state. Callers must ensure that this doesn't race with
57 * rds_send_xmit(). 59 * rds_send_xmit().
@@ -555,7 +557,7 @@ EXPORT_SYMBOL_GPL(rds_send_get_message);
555 * removing the messages from the 'messages' list regardless of if it found 557 * removing the messages from the 'messages' list regardless of if it found
556 * the messages on the socket list or not. 558 * the messages on the socket list or not.
557 */ 559 */
558void rds_send_remove_from_sock(struct list_head *messages, int status) 560static void rds_send_remove_from_sock(struct list_head *messages, int status)
559{ 561{
560 unsigned long flags; 562 unsigned long flags;
561 struct rds_sock *rs = NULL; 563 struct rds_sock *rs = NULL;
diff --git a/net/rds/tcp.c b/net/rds/tcp.c
index eeb08e6ab96b..08a8c6cf2d10 100644
--- a/net/rds/tcp.c
+++ b/net/rds/tcp.c
@@ -41,7 +41,7 @@
41/* only for info exporting */ 41/* only for info exporting */
42static DEFINE_SPINLOCK(rds_tcp_tc_list_lock); 42static DEFINE_SPINLOCK(rds_tcp_tc_list_lock);
43static LIST_HEAD(rds_tcp_tc_list); 43static LIST_HEAD(rds_tcp_tc_list);
44unsigned int rds_tcp_tc_count; 44static unsigned int rds_tcp_tc_count;
45 45
46/* Track rds_tcp_connection structs so they can be cleaned up */ 46/* Track rds_tcp_connection structs so they can be cleaned up */
47static DEFINE_SPINLOCK(rds_tcp_conn_lock); 47static DEFINE_SPINLOCK(rds_tcp_conn_lock);
@@ -243,7 +243,7 @@ static void rds_tcp_destroy_conns(void)
243 } 243 }
244} 244}
245 245
246void rds_tcp_exit(void) 246static void rds_tcp_exit(void)
247{ 247{
248 rds_info_deregister_func(RDS_INFO_TCP_SOCKETS, rds_tcp_tc_info); 248 rds_info_deregister_func(RDS_INFO_TCP_SOCKETS, rds_tcp_tc_info);
249 rds_tcp_listen_stop(); 249 rds_tcp_listen_stop();
@@ -274,7 +274,7 @@ struct rds_transport rds_tcp_transport = {
274 .t_prefer_loopback = 1, 274 .t_prefer_loopback = 1,
275}; 275};
276 276
277int rds_tcp_init(void) 277static int rds_tcp_init(void)
278{ 278{
279 int ret; 279 int ret;
280 280
diff --git a/net/rds/tcp.h b/net/rds/tcp.h
index f5e6f7bebb50..9cf2927d0021 100644
--- a/net/rds/tcp.h
+++ b/net/rds/tcp.h
@@ -43,8 +43,6 @@ struct rds_tcp_statistics {
43}; 43};
44 44
45/* tcp.c */ 45/* tcp.c */
46int rds_tcp_init(void);
47void rds_tcp_exit(void);
48void rds_tcp_tune(struct socket *sock); 46void rds_tcp_tune(struct socket *sock);
49void rds_tcp_nonagle(struct socket *sock); 47void rds_tcp_nonagle(struct socket *sock);
50void rds_tcp_set_callbacks(struct socket *sock, struct rds_connection *conn); 48void rds_tcp_set_callbacks(struct socket *sock, struct rds_connection *conn);
diff --git a/net/rds/tcp_recv.c b/net/rds/tcp_recv.c
index 67263fbee623..78205e25500a 100644
--- a/net/rds/tcp_recv.c
+++ b/net/rds/tcp_recv.c
@@ -272,7 +272,8 @@ out:
272} 272}
273 273
274/* the caller has to hold the sock lock */ 274/* the caller has to hold the sock lock */
275int rds_tcp_read_sock(struct rds_connection *conn, gfp_t gfp, enum km_type km) 275static int rds_tcp_read_sock(struct rds_connection *conn, gfp_t gfp,
276 enum km_type km)
276{ 277{
277 struct rds_tcp_connection *tc = conn->c_transport_data; 278 struct rds_tcp_connection *tc = conn->c_transport_data;
278 struct socket *sock = tc->t_sock; 279 struct socket *sock = tc->t_sock;
diff --git a/net/rds/tcp_send.c b/net/rds/tcp_send.c
index aa16841afbdf..1b4fd68f0c7c 100644
--- a/net/rds/tcp_send.c
+++ b/net/rds/tcp_send.c
@@ -63,7 +63,7 @@ void rds_tcp_xmit_complete(struct rds_connection *conn)
63} 63}
64 64
65/* the core send_sem serializes this with other xmit and shutdown */ 65/* the core send_sem serializes this with other xmit and shutdown */
66int rds_tcp_sendmsg(struct socket *sock, void *data, unsigned int len) 66static int rds_tcp_sendmsg(struct socket *sock, void *data, unsigned int len)
67{ 67{
68 struct kvec vec = { 68 struct kvec vec = {
69 .iov_base = data, 69 .iov_base = data,