Patchwork [v2] ipvs: fixed sparse warning

login
register
mail settings
Submitter Claudiu Ghioc
Date July 18, 2012, 9:10 a.m.
Message ID <1342602622-2728-1-git-send-email-claudiu.ghioc@gmail.com>
Download mbox | patch
Permalink /patch/171615/
State Superseded
Headers show

Comments

Claudiu Ghioc - July 18, 2012, 9:10 a.m.
Removed the following sparse warnings, wether CONFIG_SYSCTL
is defined or not:
*       warning: symbol 'ip_vs_control_net_init_sysctl' was not
	declared. Should it be static?
*       warning: symbol 'ip_vs_control_net_cleanup_sysctl' was
	not declared. Should it be static?

Signed-off-by: Claudiu Ghioc <claudiu.ghioc@gmail.com>
---
 net/netfilter/ipvs/ip_vs_ctl.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
Simon Horman - July 19, 2012, 1:43 a.m.
On Wed, Jul 18, 2012 at 12:10:22PM +0300, Claudiu Ghioc wrote:
> Removed the following sparse warnings, wether CONFIG_SYSCTL
> is defined or not:
> *       warning: symbol 'ip_vs_control_net_init_sysctl' was not
> 	declared. Should it be static?
> *       warning: symbol 'ip_vs_control_net_cleanup_sysctl' was
> 	not declared. Should it be static?
> 
> Signed-off-by: Claudiu Ghioc <claudiu.ghioc@gmail.com>

Thanks, I have queued this up for 3.6.
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/net/netfilter/ipvs/ip_vs_ctl.c b/net/netfilter/ipvs/ip_vs_ctl.c
index d43e3c1..044e845 100644
--- a/net/netfilter/ipvs/ip_vs_ctl.c
+++ b/net/netfilter/ipvs/ip_vs_ctl.c
@@ -3674,7 +3674,7 @@  static void ip_vs_genl_unregister(void)
  * per netns intit/exit func.
  */
 #ifdef CONFIG_SYSCTL
-int __net_init ip_vs_control_net_init_sysctl(struct net *net)
+static int __net_init ip_vs_control_net_init_sysctl(struct net *net)
 {
 	int idx;
 	struct netns_ipvs *ipvs = net_ipvs(net);
@@ -3742,7 +3742,7 @@  int __net_init ip_vs_control_net_init_sysctl(struct net *net)
 	return 0;
 }
 
-void __net_exit ip_vs_control_net_cleanup_sysctl(struct net *net)
+static void __net_exit ip_vs_control_net_cleanup_sysctl(struct net *net)
 {
 	struct netns_ipvs *ipvs = net_ipvs(net);
 
@@ -3753,8 +3753,8 @@  void __net_exit ip_vs_control_net_cleanup_sysctl(struct net *net)
 
 #else
 
-int __net_init ip_vs_control_net_init_sysctl(struct net *net) { return 0; }
-void __net_exit ip_vs_control_net_cleanup_sysctl(struct net *net) { }
+static int __net_init ip_vs_control_net_init_sysctl(struct net *net) { return 0; }
+static void __net_exit ip_vs_control_net_cleanup_sysctl(struct net *net) { }
 
 #endif