Skip to content

Commit

Permalink
ipvs: Annotate init functions with __init
Browse files Browse the repository at this point in the history
Being able to discard these functions saves a couple of bytes at runtime. The
cleanup functions can't be annotated with __exit as they are also called from
init functions.

Signed-off-by: Sven Wegener <sven.wegener@stealer.net>
Acked-by: Simon Horman <horms@verge.net.au>
  • Loading branch information
Sven Wegener committed Aug 11, 2008
1 parent d149ccc commit 048cf48
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion net/ipv4/ipvs/ip_vs_app.c
Original file line number Diff line number Diff line change
Expand Up @@ -608,7 +608,7 @@ int ip_vs_skb_replace(struct sk_buff *skb, gfp_t pri,
}


int ip_vs_app_init(void)
int __init ip_vs_app_init(void)
{
/* we will replace it with proc_net_ipvs_create() soon */
proc_net_fops_create(&init_net, "ip_vs_app", 0, &ip_vs_app_fops);
Expand Down
2 changes: 1 addition & 1 deletion net/ipv4/ipvs/ip_vs_conn.c
Original file line number Diff line number Diff line change
Expand Up @@ -965,7 +965,7 @@ static void ip_vs_conn_flush(void)
}


int ip_vs_conn_init(void)
int __init ip_vs_conn_init(void)
{
int idx;

Expand Down
2 changes: 1 addition & 1 deletion net/ipv4/ipvs/ip_vs_ctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -2306,7 +2306,7 @@ static struct nf_sockopt_ops ip_vs_sockopts = {
};


int ip_vs_control_init(void)
int __init ip_vs_control_init(void)
{
int ret;
int idx;
Expand Down
4 changes: 2 additions & 2 deletions net/ipv4/ipvs/ip_vs_proto.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ static struct ip_vs_protocol *ip_vs_proto_table[IP_VS_PROTO_TAB_SIZE];
/*
* register an ipvs protocol
*/
static int __used register_ip_vs_protocol(struct ip_vs_protocol *pp)
static int __used __init register_ip_vs_protocol(struct ip_vs_protocol *pp)
{
unsigned hash = IP_VS_PROTO_HASH(pp->protocol);

Expand Down Expand Up @@ -190,7 +190,7 @@ ip_vs_tcpudp_debug_packet(struct ip_vs_protocol *pp,
}


int ip_vs_protocol_init(void)
int __init ip_vs_protocol_init(void)
{
char protocols[64];
#define REGISTER_PROTOCOL(p) \
Expand Down

0 comments on commit 048cf48

Please sign in to comment.