the variables zero and unres_qlen_max are only used when CONFIG_SYSCTL is
defined, otherwise it causes the following sparse warning when we turn on
CONFIG_SYSCTL.
Signed-off-by: Cong Ding <redacted>
---
net/core/neighbour.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
On Fri, Dec 07, 2012 at 12:06:44AM +0000, Cong Ding wrote:
the variables zero and unres_qlen_max are only used when CONFIG_SYSCTL is
defined, otherwise it causes the following sparse warning when we turn on
CONFIG_SYSCTL.
sorry for disturbing again, the sparse warning is
net/core/neighbour.c:65:12: warning: ‘zero’ defined but not used [-Wunused-variable]
net/core/neighbour.c:66:12: warning: ‘unres_qlen_max’ defined but not used [-Wunused-variable]
it happens if we turn off CONFIG_SYSCTL.
From: Cong Wang <hidden> Date: 2012-12-07 02:26:59
On Fri, 07 Dec 2012 at 00:06 GMT, Cong Ding [off-list ref] wrote:
the variables zero and unres_qlen_max are only used when CONFIG_SYSCTL is
defined, otherwise it causes the following sparse warning when we turn on
CONFIG_SYSCTL.
commit b93196dc5af7729ff7cc50d3d322ab1a364aa14f
Author: Cong Wang [off-list ref]
Date: Thu Dec 6 10:04:04 2012 +0800
net: fix some compiler warning in net/core/neighbour.c
net/core/neighbour.c:65:12: warning: 'zero' defined but
not used [-Wunused-variable]
net/core/neighbour.c:66:12: warning: 'unres_qlen_max' defined but
not used [-Wunused-variable]
These variables are only used when CONFIG_SYSCTL is defined,
so move them under #ifdef CONFIG_SYSCTL.
Reported-by: Fengguang Wu [off-list ref]
Signed-off-by: Cong Wang [off-list ref]
Acked-by: Shan Wei [off-list ref]
Signed-off-by: David S. Miller [off-list ref]
On Fri, Dec 07, 2012 at 12:06:44AM +0000, Cong Ding wrote:
quoted
the variables zero and unres_qlen_max are only used when CONFIG_SYSCTL is
defined, otherwise it causes the following sparse warning when we turn on
CONFIG_SYSCTL.
sorry for disturbing again, the sparse warning is
net/core/neighbour.c:65:12: warning: ‘zero’ defined but not used [-Wunused-variable]
net/core/neighbour.c:66:12: warning: ‘unres_qlen_max’ defined but not used [-Wunused-variable]
it happens if we turn off CONFIG_SYSCTL.
A patch for this has already in my tree for nearly a whole day.
On Fri, Dec 07, 2012 at 12:06:44AM +0000, Cong Ding wrote:
quoted
the variables zero and unres_qlen_max are only used when CONFIG_SYSCTL is
defined, otherwise it causes the following sparse warning when we turn on
CONFIG_SYSCTL.
sorry for disturbing again, the sparse warning is
net/core/neighbour.c:65:12: warning: ‘zero’ defined but not used [-Wunused-variable]
net/core/neighbour.c:66:12: warning: ‘unres_qlen_max’ defined but not used [-Wunused-variable]
it happens if we turn off CONFIG_SYSCTL.
It has been fixed yesterday.
see b93196dc5af7729ff7cc50d3d322ab1a364aa14f
@@ -62,8 +62,10 @@ static void __neigh_notify(struct neighbour *n, int type, int flags);staticvoidneigh_update_notify(structneighbour*neigh);staticintpneigh_ifdown(structneigh_table*tbl,structnet_device*dev);+#ifdef CONFIG_SYSCTLstaticintzero;staticintunres_qlen_max=INT_MAX/SKB_TRUESIZE(ETH_FRAME_LEN);+#endifstaticstructneigh_table*neigh_tables;#ifdef CONFIG_PROC_FS
--
1.7.4.5
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html