[PATCH] net/ipv6/sysctl_net_ipv6.c: fix sparse warnings

From: H Hartley Sweeten
Date: Wed Apr 22 2009 - 20:57:55 EST


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@xxxxxxxxxxxxxxxxxxx>

---

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;

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/