Commit ef87b7ea authored by Zach Brown's avatar Zach Brown Committed by Andy Grover

RDS: remove __init and __exit annotation

The trivial amount of memory saved isn't worth the cost of dealing with section
mismatches.
Signed-off-by: default avatarZach Brown <zach.brown@oracle.com>
parent c20f5b96
...@@ -521,7 +521,7 @@ static void rds_sock_info(struct socket *sock, unsigned int len, ...@@ -521,7 +521,7 @@ static void rds_sock_info(struct socket *sock, unsigned int len,
spin_unlock_irqrestore(&rds_sock_lock, flags); spin_unlock_irqrestore(&rds_sock_lock, flags);
} }
static void __exit rds_exit(void) static void rds_exit(void)
{ {
sock_unregister(rds_family_ops.family); sock_unregister(rds_family_ops.family);
proto_unregister(&rds_proto); proto_unregister(&rds_proto);
...@@ -536,7 +536,7 @@ static void __exit rds_exit(void) ...@@ -536,7 +536,7 @@ static void __exit rds_exit(void)
} }
module_exit(rds_exit); module_exit(rds_exit);
static int __init rds_init(void) static int rds_init(void)
{ {
int ret; int ret;
......
...@@ -488,7 +488,7 @@ static void rds_conn_info(struct socket *sock, unsigned int len, ...@@ -488,7 +488,7 @@ static void rds_conn_info(struct socket *sock, unsigned int len,
sizeof(struct rds_info_connection)); sizeof(struct rds_info_connection));
} }
int __init rds_conn_init(void) int rds_conn_init(void)
{ {
rds_conn_slab = kmem_cache_create("rds_connection", rds_conn_slab = kmem_cache_create("rds_connection",
sizeof(struct rds_connection), sizeof(struct rds_connection),
......
...@@ -381,7 +381,7 @@ struct rds_transport rds_ib_transport = { ...@@ -381,7 +381,7 @@ struct rds_transport rds_ib_transport = {
.t_type = RDS_TRANS_IB .t_type = RDS_TRANS_IB
}; };
int __init rds_ib_init(void) int rds_ib_init(void)
{ {
int ret; int ret;
......
...@@ -282,7 +282,7 @@ void rds_ib_conn_free(void *arg); ...@@ -282,7 +282,7 @@ void rds_ib_conn_free(void *arg);
int rds_ib_conn_connect(struct rds_connection *conn); int rds_ib_conn_connect(struct rds_connection *conn);
void rds_ib_conn_shutdown(struct rds_connection *conn); void rds_ib_conn_shutdown(struct rds_connection *conn);
void rds_ib_state_change(struct sock *sk); void rds_ib_state_change(struct sock *sk);
int __init rds_ib_listen_init(void); int rds_ib_listen_init(void);
void rds_ib_listen_stop(void); void rds_ib_listen_stop(void);
void __rds_ib_conn_error(struct rds_connection *conn, const char *, ...); void __rds_ib_conn_error(struct rds_connection *conn, const char *, ...);
int rds_ib_cm_handle_connect(struct rdma_cm_id *cm_id, int rds_ib_cm_handle_connect(struct rdma_cm_id *cm_id,
...@@ -308,11 +308,11 @@ void *rds_ib_get_mr(struct scatterlist *sg, unsigned long nents, ...@@ -308,11 +308,11 @@ void *rds_ib_get_mr(struct scatterlist *sg, unsigned long nents,
void rds_ib_sync_mr(void *trans_private, int dir); void rds_ib_sync_mr(void *trans_private, int dir);
void rds_ib_free_mr(void *trans_private, int invalidate); void rds_ib_free_mr(void *trans_private, int invalidate);
void rds_ib_flush_mrs(void); void rds_ib_flush_mrs(void);
int __init rds_ib_fmr_init(void); int rds_ib_fmr_init(void);
void __exit rds_ib_fmr_exit(void); void rds_ib_fmr_exit(void);
/* ib_recv.c */ /* ib_recv.c */
int __init rds_ib_recv_init(void); int rds_ib_recv_init(void);
void rds_ib_recv_exit(void); void rds_ib_recv_exit(void);
int rds_ib_recv(struct rds_connection *conn); int rds_ib_recv(struct rds_connection *conn);
int rds_ib_recv_alloc_caches(struct rds_ib_connection *ic); int rds_ib_recv_alloc_caches(struct rds_ib_connection *ic);
...@@ -363,7 +363,7 @@ unsigned int rds_ib_stats_info_copy(struct rds_info_iterator *iter, ...@@ -363,7 +363,7 @@ unsigned int rds_ib_stats_info_copy(struct rds_info_iterator *iter,
unsigned int avail); unsigned int avail);
/* ib_sysctl.c */ /* ib_sysctl.c */
int __init rds_ib_sysctl_init(void); int rds_ib_sysctl_init(void);
void rds_ib_sysctl_exit(void); void rds_ib_sysctl_exit(void);
extern unsigned long rds_ib_sysctl_max_send_wr; extern unsigned long rds_ib_sysctl_max_send_wr;
extern unsigned long rds_ib_sysctl_max_recv_wr; extern unsigned long rds_ib_sysctl_max_recv_wr;
......
...@@ -693,7 +693,7 @@ static int rds_ib_flush_mr_pool(struct rds_ib_mr_pool *pool, ...@@ -693,7 +693,7 @@ static int rds_ib_flush_mr_pool(struct rds_ib_mr_pool *pool,
struct workqueue_struct *rds_ib_fmr_wq; struct workqueue_struct *rds_ib_fmr_wq;
int __init rds_ib_fmr_init(void) int rds_ib_fmr_init(void)
{ {
rds_ib_fmr_wq = create_workqueue("rds_fmr_flushd"); rds_ib_fmr_wq = create_workqueue("rds_fmr_flushd");
if (!rds_ib_fmr_wq) if (!rds_ib_fmr_wq)
...@@ -706,7 +706,7 @@ int __init rds_ib_fmr_init(void) ...@@ -706,7 +706,7 @@ int __init rds_ib_fmr_init(void)
* had their pools freed. As each pool is freed its work struct is waited on, * had their pools freed. As each pool is freed its work struct is waited on,
* so the pool flushing work queue should be idle by the time we get here. * so the pool flushing work queue should be idle by the time we get here.
*/ */
void __exit rds_ib_fmr_exit(void) void rds_ib_fmr_exit(void)
{ {
destroy_workqueue(rds_ib_fmr_wq); destroy_workqueue(rds_ib_fmr_wq);
} }
......
...@@ -1040,7 +1040,7 @@ int rds_ib_recv(struct rds_connection *conn) ...@@ -1040,7 +1040,7 @@ int rds_ib_recv(struct rds_connection *conn)
return ret; return ret;
} }
int __init rds_ib_recv_init(void) int rds_ib_recv_init(void)
{ {
struct sysinfo si; struct sysinfo si;
int ret = -ENOMEM; int ret = -ENOMEM;
......
...@@ -119,7 +119,7 @@ void rds_ib_sysctl_exit(void) ...@@ -119,7 +119,7 @@ void rds_ib_sysctl_exit(void)
unregister_sysctl_table(rds_ib_sysctl_hdr); unregister_sysctl_table(rds_ib_sysctl_hdr);
} }
int __init rds_ib_sysctl_init(void) int rds_ib_sysctl_init(void)
{ {
rds_ib_sysctl_hdr = register_sysctl_paths(rds_ib_sysctl_path, rds_ib_sysctl_table); rds_ib_sysctl_hdr = register_sysctl_paths(rds_ib_sysctl_path, rds_ib_sysctl_table);
if (!rds_ib_sysctl_hdr) if (!rds_ib_sysctl_hdr)
......
...@@ -287,7 +287,7 @@ struct rds_transport rds_iw_transport = { ...@@ -287,7 +287,7 @@ struct rds_transport rds_iw_transport = {
.t_prefer_loopback = 1, .t_prefer_loopback = 1,
}; };
int __init rds_iw_init(void) int rds_iw_init(void)
{ {
int ret; int ret;
......
...@@ -284,7 +284,7 @@ void rds_iw_conn_free(void *arg); ...@@ -284,7 +284,7 @@ void rds_iw_conn_free(void *arg);
int rds_iw_conn_connect(struct rds_connection *conn); int rds_iw_conn_connect(struct rds_connection *conn);
void rds_iw_conn_shutdown(struct rds_connection *conn); void rds_iw_conn_shutdown(struct rds_connection *conn);
void rds_iw_state_change(struct sock *sk); void rds_iw_state_change(struct sock *sk);
int __init rds_iw_listen_init(void); int rds_iw_listen_init(void);
void rds_iw_listen_stop(void); void rds_iw_listen_stop(void);
void __rds_iw_conn_error(struct rds_connection *conn, const char *, ...); void __rds_iw_conn_error(struct rds_connection *conn, const char *, ...);
int rds_iw_cm_handle_connect(struct rdma_cm_id *cm_id, int rds_iw_cm_handle_connect(struct rdma_cm_id *cm_id,
...@@ -321,7 +321,7 @@ void rds_iw_flush_mrs(void); ...@@ -321,7 +321,7 @@ void rds_iw_flush_mrs(void);
void rds_iw_remove_cm_id(struct rds_iw_device *rds_iwdev, struct rdma_cm_id *cm_id); void rds_iw_remove_cm_id(struct rds_iw_device *rds_iwdev, struct rdma_cm_id *cm_id);
/* ib_recv.c */ /* ib_recv.c */
int __init rds_iw_recv_init(void); int rds_iw_recv_init(void);
void rds_iw_recv_exit(void); void rds_iw_recv_exit(void);
int rds_iw_recv(struct rds_connection *conn); int rds_iw_recv(struct rds_connection *conn);
int rds_iw_recv_refill(struct rds_connection *conn, gfp_t kptr_gfp, int rds_iw_recv_refill(struct rds_connection *conn, gfp_t kptr_gfp,
...@@ -370,7 +370,7 @@ unsigned int rds_iw_stats_info_copy(struct rds_info_iterator *iter, ...@@ -370,7 +370,7 @@ unsigned int rds_iw_stats_info_copy(struct rds_info_iterator *iter,
unsigned int avail); unsigned int avail);
/* ib_sysctl.c */ /* ib_sysctl.c */
int __init rds_iw_sysctl_init(void); int rds_iw_sysctl_init(void);
void rds_iw_sysctl_exit(void); void rds_iw_sysctl_exit(void);
extern unsigned long rds_iw_sysctl_max_send_wr; extern unsigned long rds_iw_sysctl_max_send_wr;
extern unsigned long rds_iw_sysctl_max_recv_wr; extern unsigned long rds_iw_sysctl_max_recv_wr;
......
...@@ -887,7 +887,7 @@ int rds_iw_recv(struct rds_connection *conn) ...@@ -887,7 +887,7 @@ int rds_iw_recv(struct rds_connection *conn)
return ret; return ret;
} }
int __init rds_iw_recv_init(void) int rds_iw_recv_init(void)
{ {
struct sysinfo si; struct sysinfo si;
int ret = -ENOMEM; int ret = -ENOMEM;
......
...@@ -122,7 +122,7 @@ void rds_iw_sysctl_exit(void) ...@@ -122,7 +122,7 @@ void rds_iw_sysctl_exit(void)
unregister_sysctl_table(rds_iw_sysctl_hdr); unregister_sysctl_table(rds_iw_sysctl_hdr);
} }
int __init rds_iw_sysctl_init(void) int rds_iw_sysctl_init(void)
{ {
rds_iw_sysctl_hdr = register_sysctl_paths(rds_iw_sysctl_path, rds_iw_sysctl_table); rds_iw_sysctl_hdr = register_sysctl_paths(rds_iw_sysctl_path, rds_iw_sysctl_table);
if (!rds_iw_sysctl_hdr) if (!rds_iw_sysctl_hdr)
......
...@@ -122,7 +122,7 @@ int rds_rdma_cm_event_handler(struct rdma_cm_id *cm_id, ...@@ -122,7 +122,7 @@ int rds_rdma_cm_event_handler(struct rdma_cm_id *cm_id,
return ret; return ret;
} }
static int __init rds_rdma_listen_init(void) static int rds_rdma_listen_init(void)
{ {
struct sockaddr_in sin; struct sockaddr_in sin;
struct rdma_cm_id *cm_id; struct rdma_cm_id *cm_id;
...@@ -177,7 +177,7 @@ static void rds_rdma_listen_stop(void) ...@@ -177,7 +177,7 @@ static void rds_rdma_listen_stop(void)
} }
} }
int __init rds_rdma_init(void) int rds_rdma_init(void)
{ {
int ret; int ret;
......
...@@ -606,7 +606,7 @@ void rds_cong_exit(void); ...@@ -606,7 +606,7 @@ void rds_cong_exit(void);
struct rds_message *rds_cong_update_alloc(struct rds_connection *conn); struct rds_message *rds_cong_update_alloc(struct rds_connection *conn);
/* conn.c */ /* conn.c */
int __init rds_conn_init(void); int rds_conn_init(void);
void rds_conn_exit(void); void rds_conn_exit(void);
struct rds_connection *rds_conn_create(__be32 laddr, __be32 faddr, struct rds_connection *rds_conn_create(__be32 laddr, __be32 faddr,
struct rds_transport *trans, gfp_t gfp); struct rds_transport *trans, gfp_t gfp);
...@@ -769,14 +769,14 @@ DECLARE_PER_CPU_SHARED_ALIGNED(struct rds_statistics, rds_stats); ...@@ -769,14 +769,14 @@ DECLARE_PER_CPU_SHARED_ALIGNED(struct rds_statistics, rds_stats);
put_cpu(); \ put_cpu(); \
} while (0) } while (0)
#define rds_stats_add(member, count) rds_stats_add_which(rds_stats, member, count) #define rds_stats_add(member, count) rds_stats_add_which(rds_stats, member, count)
int __init rds_stats_init(void); int rds_stats_init(void);
void rds_stats_exit(void); void rds_stats_exit(void);
void rds_stats_info_copy(struct rds_info_iterator *iter, void rds_stats_info_copy(struct rds_info_iterator *iter,
uint64_t *values, const char *const *names, uint64_t *values, const char *const *names,
size_t nr); size_t nr);
/* sysctl.c */ /* sysctl.c */
int __init rds_sysctl_init(void); int rds_sysctl_init(void);
void rds_sysctl_exit(void); void rds_sysctl_exit(void);
extern unsigned long rds_sysctl_sndbuf_min; extern unsigned long rds_sysctl_sndbuf_min;
extern unsigned long rds_sysctl_sndbuf_default; extern unsigned long rds_sysctl_sndbuf_default;
...@@ -790,7 +790,7 @@ extern unsigned long rds_sysctl_trace_flags; ...@@ -790,7 +790,7 @@ extern unsigned long rds_sysctl_trace_flags;
extern unsigned int rds_sysctl_trace_level; extern unsigned int rds_sysctl_trace_level;
/* threads.c */ /* threads.c */
int __init rds_threads_init(void); int rds_threads_init(void);
void rds_threads_exit(void); void rds_threads_exit(void);
extern struct workqueue_struct *rds_wq; extern struct workqueue_struct *rds_wq;
void rds_queue_reconnect(struct rds_connection *conn); void rds_queue_reconnect(struct rds_connection *conn);
...@@ -806,7 +806,7 @@ void rds_trans_unregister(struct rds_transport *trans); ...@@ -806,7 +806,7 @@ void rds_trans_unregister(struct rds_transport *trans);
struct rds_transport *rds_trans_get_preferred(__be32 addr); struct rds_transport *rds_trans_get_preferred(__be32 addr);
unsigned int rds_trans_stats_info_copy(struct rds_info_iterator *iter, unsigned int rds_trans_stats_info_copy(struct rds_info_iterator *iter,
unsigned int avail); unsigned int avail);
int __init rds_trans_init(void); int rds_trans_init(void);
void rds_trans_exit(void); void rds_trans_exit(void);
#endif #endif
...@@ -143,7 +143,7 @@ void rds_stats_exit(void) ...@@ -143,7 +143,7 @@ void rds_stats_exit(void)
rds_info_deregister_func(RDS_INFO_COUNTERS, rds_stats_info); rds_info_deregister_func(RDS_INFO_COUNTERS, rds_stats_info);
} }
int __init rds_stats_init(void) int rds_stats_init(void)
{ {
rds_info_register_func(RDS_INFO_COUNTERS, rds_stats_info); rds_info_register_func(RDS_INFO_COUNTERS, rds_stats_info);
return 0; return 0;
......
...@@ -105,7 +105,7 @@ void rds_sysctl_exit(void) ...@@ -105,7 +105,7 @@ void rds_sysctl_exit(void)
unregister_sysctl_table(rds_sysctl_reg_table); unregister_sysctl_table(rds_sysctl_reg_table);
} }
int __init rds_sysctl_init(void) int rds_sysctl_init(void)
{ {
rds_sysctl_reconnect_min = msecs_to_jiffies(1); rds_sysctl_reconnect_min = msecs_to_jiffies(1);
rds_sysctl_reconnect_min_jiffies = rds_sysctl_reconnect_min; rds_sysctl_reconnect_min_jiffies = rds_sysctl_reconnect_min;
......
...@@ -274,7 +274,7 @@ struct rds_transport rds_tcp_transport = { ...@@ -274,7 +274,7 @@ struct rds_transport rds_tcp_transport = {
.t_prefer_loopback = 1, .t_prefer_loopback = 1,
}; };
int __init rds_tcp_init(void) int rds_tcp_init(void)
{ {
int ret; int ret;
......
...@@ -43,7 +43,7 @@ struct rds_tcp_statistics { ...@@ -43,7 +43,7 @@ struct rds_tcp_statistics {
}; };
/* tcp.c */ /* tcp.c */
int __init rds_tcp_init(void); int rds_tcp_init(void);
void rds_tcp_exit(void); void rds_tcp_exit(void);
void rds_tcp_tune(struct socket *sock); void rds_tcp_tune(struct socket *sock);
void rds_tcp_nonagle(struct socket *sock); void rds_tcp_nonagle(struct socket *sock);
...@@ -61,12 +61,12 @@ void rds_tcp_conn_shutdown(struct rds_connection *conn); ...@@ -61,12 +61,12 @@ void rds_tcp_conn_shutdown(struct rds_connection *conn);
void rds_tcp_state_change(struct sock *sk); void rds_tcp_state_change(struct sock *sk);
/* tcp_listen.c */ /* tcp_listen.c */
int __init rds_tcp_listen_init(void); int rds_tcp_listen_init(void);
void rds_tcp_listen_stop(void); void rds_tcp_listen_stop(void);
void rds_tcp_listen_data_ready(struct sock *sk, int bytes); void rds_tcp_listen_data_ready(struct sock *sk, int bytes);
/* tcp_recv.c */ /* tcp_recv.c */
int __init rds_tcp_recv_init(void); int rds_tcp_recv_init(void);
void rds_tcp_recv_exit(void); void rds_tcp_recv_exit(void);
void rds_tcp_data_ready(struct sock *sk, int bytes); void rds_tcp_data_ready(struct sock *sk, int bytes);
int rds_tcp_recv(struct rds_connection *conn); int rds_tcp_recv(struct rds_connection *conn);
......
...@@ -135,7 +135,7 @@ void rds_tcp_listen_data_ready(struct sock *sk, int bytes) ...@@ -135,7 +135,7 @@ void rds_tcp_listen_data_ready(struct sock *sk, int bytes)
ready(sk, bytes); ready(sk, bytes);
} }
int __init rds_tcp_listen_init(void) int rds_tcp_listen_init(void)
{ {
struct sockaddr_in sin; struct sockaddr_in sin;
struct socket *sock = NULL; struct socket *sock = NULL;
......
...@@ -342,7 +342,7 @@ void rds_tcp_data_ready(struct sock *sk, int bytes) ...@@ -342,7 +342,7 @@ void rds_tcp_data_ready(struct sock *sk, int bytes)
ready(sk, bytes); ready(sk, bytes);
} }
int __init rds_tcp_recv_init(void) int rds_tcp_recv_init(void)
{ {
rds_tcp_incoming_slab = kmem_cache_create("rds_tcp_incoming", rds_tcp_incoming_slab = kmem_cache_create("rds_tcp_incoming",
sizeof(struct rds_tcp_incoming), sizeof(struct rds_tcp_incoming),
......
...@@ -212,7 +212,7 @@ void rds_threads_exit(void) ...@@ -212,7 +212,7 @@ void rds_threads_exit(void)
destroy_workqueue(rds_wq); destroy_workqueue(rds_wq);
} }
int __init rds_threads_init(void) int rds_threads_init(void)
{ {
rds_wq = create_singlethread_workqueue("krdsd"); rds_wq = create_singlethread_workqueue("krdsd");
if (!rds_wq) if (!rds_wq)
......
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