Skip to content

Commit

Permalink
sctp: Fix compiler warning when CONFIG_DEBUG_SECTION_MISMATCH=y
Browse files Browse the repository at this point in the history
WARNING: net/sctp/sctp.o(.text+0x72f1): Section mismatch in reference
from the function sctp_net_init() to the function
.init.text:sctp_proc_init()
The function sctp_net_init() references
the function __init sctp_proc_init().
This is often because sctp_net_init lacks a __init
annotation or the annotation of sctp_proc_init is wrong.

And put __net_init after 'int' for sctp_proc_init - as it is done
everywhere else in the sctp-stack.

Signed-off-by: Christoph Paasch <christoph.paasch@uclouvain.be>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Acked-by: Vlad Yasevich <vyasevich@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Christoph Paasch authored and David S. Miller committed Dec 7, 2012
1 parent fd3065b commit f5f417c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions net/sctp/protocol.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ int sysctl_sctp_rmem[3];
int sysctl_sctp_wmem[3];

/* Set up the proc fs entry for the SCTP protocol. */
static __net_init int sctp_proc_init(struct net *net)
static int __net_init sctp_proc_init(struct net *net)
{
#ifdef CONFIG_PROC_FS
net->sctp.proc_net_sctp = proc_net_mkdir(net, "sctp", net->proc_net);
Expand Down Expand Up @@ -1165,7 +1165,7 @@ static void sctp_v4_del_protocol(void)
unregister_inetaddr_notifier(&sctp_inetaddr_notifier);
}

static int sctp_net_init(struct net *net)
static int __net_init sctp_net_init(struct net *net)
{
int status;

Expand Down Expand Up @@ -1290,7 +1290,7 @@ static int sctp_net_init(struct net *net)
return status;
}

static void sctp_net_exit(struct net *net)
static void __net_exit sctp_net_exit(struct net *net)
{
/* Free the local address list */
sctp_free_addr_wq(net);
Expand Down

0 comments on commit f5f417c

Please sign in to comment.