All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] net/ipv6/sysctl_net_ipv6.c: fix sparse warnings
@ 2009-04-23  0:57 H Hartley Sweeten
  0 siblings, 0 replies; only message in thread
From: H Hartley Sweeten @ 2009-04-23  0:57 UTC (permalink / raw)
  To: linux-kernel

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;
  

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2009-04-23  0:57 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-04-23  0:57 [PATCH] net/ipv6/sysctl_net_ipv6.c: fix sparse warnings H Hartley Sweeten

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.