[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20121206141159.GB17192@hmsreliant.think-freely.org>
Date: Thu, 6 Dec 2012 09:11:59 -0500
From: Neil Horman <nhorman@...driver.com>
To: Christoph Paasch <christoph.paasch@...ouvain.be>
Cc: vyasevich@...il.com, linux-sctp@...r.kernel.org,
davem@...emloft.net, sri@...ibm.com, netdev@...r.kernel.org
Subject: Re: [PATCH] sctp: Fix compiler warning when
CONFIG_DEBUG_SECTION_MISMATCH=y
On Thu, Dec 06, 2012 at 02:03:12PM +0100, Christoph Paasch wrote:
> 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@...ouvain.be>
> ---
> net/sctp/protocol.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/net/sctp/protocol.c b/net/sctp/protocol.c
> index 456bc3d..2c7785b 100644
> --- a/net/sctp/protocol.c
> +++ b/net/sctp/protocol.c
> @@ -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);
> @@ -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;
>
> @@ -1290,7 +1290,7 @@ err_sysctl_register:
> 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);
> --
> 1.7.10.4
>
>
Acked-by: Neil Horman <nhorman@...driver.com>
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists