lkml.org 
[lkml]   [2009]   [Apr]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH] net/ipv6/sysctl_net_ipv6.c: fix sparse warnings
Date
From
Fix two sparse warnings in net/ipv6/sysctl_net_ipv6.c.

Both sparse warnings are as follows:

warning: symbol 'ipv6_table' shadows an earlier one

ipv6_sysctl_net_init() and ipv6_sysctl_net_exit() both use the same
symbol name for the struct ctl_table used to do the
{register/unregister}_net_sysctl_table().

The static symbol is only used in ipv6_sysctl_register() for the
struct ctl_table used to do the register_net_sysctl_rotable().

Rename the static symbol to ipv6_rotable to remove the sparse warnings.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>

---

diff --git a/net/ipv6/sysctl_net_ipv6.c b/net/ipv6/sysctl_net_ipv6.c
index a031034..0dc6a4e 100644
--- a/net/ipv6/sysctl_net_ipv6.c
+++ b/net/ipv6/sysctl_net_ipv6.c
@@ -40,7 +40,7 @@ static ctl_table ipv6_table_template[] = {
{ .ctl_name = 0 }
};

-static ctl_table ipv6_table[] = {
+static ctl_table ipv6_rotable[] = {
{
.ctl_name = NET_IPV6_MLD_MAX_MSF,
.procname = "mld_max_msf",
@@ -130,7 +130,7 @@ int ipv6_sysctl_register(void)
{
int err = -ENOMEM;

- ip6_header = register_net_sysctl_rotable(net_ipv6_ctl_path, ipv6_table);
+ ip6_header = register_net_sysctl_rotable(net_ipv6_ctl_path, ipv6_rotable);
if (ip6_header == NULL)
goto out;


\
 
 \ /
  Last update: 2009-04-23 03:01    [W:0.038 / U:0.112 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site