From patchwork Thu Dec 6 13:03:12 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Paasch X-Patchwork-Id: 204221 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 95ABC2C0318 for ; Fri, 7 Dec 2012 00:09:00 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1423513Ab2LFNI5 (ORCPT ); Thu, 6 Dec 2012 08:08:57 -0500 Received: from smtp.sgsi.ucl.ac.be ([130.104.5.67]:33409 "EHLO smtp6.sgsi.ucl.ac.be" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755010Ab2LFNI4 (ORCPT ); Thu, 6 Dec 2012 08:08:56 -0500 X-Greylist: delayed 335 seconds by postgrey-1.27 at vger.kernel.org; Thu, 06 Dec 2012 08:08:56 EST Received: from cpaasch-mac.dhcp.info.ucl.ac.be (cpaasch-mac.dhcp.info.ucl.ac.be [130.104.228.20]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: cpaasch@smtp6.sgsi.ucl.ac.be) by smtp6.sgsi.ucl.ac.be (Postfix) with ESMTPSA id 63BD81C57D1; Thu, 6 Dec 2012 14:03:16 +0100 (CET) X-DKIM: Sendmail DKIM Filter v2.8.3 smtp6.sgsi.ucl.ac.be 63BD81C57D1 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=uclouvain.be; s=selucl; t=1354798996; bh=/IqLw9/Sv3NNTtPnzOdl1/w1EhgUmpM7fBKIJSmErmk=; h=From:To:Cc:Subject:Date:Message-Id; b=c/wl4ejqI57gQwWLyyiT8tR2Xqt15y0ohhq/qKPxYhq13VPlel+S+8EiJWR6zoRQ4 FIgYTJYP3fCF8/Ifaq4epf22FPvBFWTvDMxTbqKFaa6J4y8cdqD8asbZNin8E3Mgx/ 3tUKuvAMBtNuLDyxnAC41CJKsVSyDQNDb7HsjtxE= From: Christoph Paasch To: vyasevich@gmail.com, linux-sctp@vger.kernel.org, davem@davemloft.net Cc: sri@us.ibm.com, nhorman@tuxdriver.com, netdev@vger.kernel.org Subject: [PATCH] sctp: Fix compiler warning when CONFIG_DEBUG_SECTION_MISMATCH=y Date: Thu, 6 Dec 2012 14:03:12 +0100 Message-Id: <1354798992-25622-1-git-send-email-christoph.paasch@uclouvain.be> X-Mailer: git-send-email 1.7.10.4 X-Virus-Scanned: clamav-milter 0.97.3-exp at smtp-6.sipr-dc.ucl.ac.be X-Virus-Status: Clean X-Sgsi-Spamcheck: SASL authenticated, X-SGSI-MailScanner-ID: 63BD81C57D1.A3D99 X-SGSI-MailScanner: Found to be clean X-SGSI-From: christoph.paasch@uclouvain.be X-SGSI-Spam-Status: No Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org 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 Acked-by: Neil Horman Acked-by: Vlad Yasevich --- 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);