From: Vlad Yasevich <vyasevich@gmail.com>
To: Christoph Paasch <christoph.paasch@uclouvain.be>
Cc: linux-sctp@vger.kernel.org, davem@davemloft.net, sri@us.ibm.com,
nhorman@tuxdriver.com, netdev@vger.kernel.org
Subject: Re: [PATCH] sctp: Fix compiler warning when CONFIG_DEBUG_SECTION_MISMATCH=y
Date: Thu, 06 Dec 2012 14:40:05 +0000 [thread overview]
Message-ID: <50C0AE45.3030902@gmail.com> (raw)
In-Reply-To: <1354798992-25622-1-git-send-email-christoph.paasch@uclouvain.be>
On 12/06/2012 08:03 AM, 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@uclouvain.be>
Acked-by: Vlad Yasevich <vyasevich@gmail.com>
-vlad
> ---
> 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);
>
WARNING: multiple messages have this Message-ID (diff)
From: Vlad Yasevich <vyasevich@gmail.com>
To: Christoph Paasch <christoph.paasch@uclouvain.be>
Cc: linux-sctp@vger.kernel.org, davem@davemloft.net, sri@us.ibm.com,
nhorman@tuxdriver.com, netdev@vger.kernel.org
Subject: Re: [PATCH] sctp: Fix compiler warning when CONFIG_DEBUG_SECTION_MISMATCH=y
Date: Thu, 06 Dec 2012 09:40:05 -0500 [thread overview]
Message-ID: <50C0AE45.3030902@gmail.com> (raw)
In-Reply-To: <1354798992-25622-1-git-send-email-christoph.paasch@uclouvain.be>
On 12/06/2012 08:03 AM, 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@uclouvain.be>
Acked-by: Vlad Yasevich <vyasevich@gmail.com>
-vlad
> ---
> 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);
>
next prev parent reply other threads:[~2012-12-06 14:40 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-06 13:03 [PATCH] sctp: Fix compiler warning when CONFIG_DEBUG_SECTION_MISMATCH=y Christoph Paasch
2012-12-06 13:03 ` Christoph Paasch
2012-12-06 14:11 ` Neil Horman
2012-12-06 14:11 ` Neil Horman
2012-12-06 14:40 ` Vlad Yasevich [this message]
2012-12-06 14:40 ` Vlad Yasevich
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=50C0AE45.3030902@gmail.com \
--to=vyasevich@gmail.com \
--cc=christoph.paasch@uclouvain.be \
--cc=davem@davemloft.net \
--cc=linux-sctp@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=nhorman@tuxdriver.com \
--cc=sri@us.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.