netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] net: fix some compiler warning in net/core/neighbour.c
@ 2012-12-06  2:04 Cong Wang
  2012-12-06  2:39 ` Shan Wei
  0 siblings, 1 reply; 3+ messages in thread
From: Cong Wang @ 2012-12-06  2:04 UTC (permalink / raw)
  To: netdev; +Cc: Shan Wei, David S. Miller, Cong Wang

From: Cong Wang <amwang@redhat.com>

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 <fengguang.wu@intel.com>
Cc: Shan Wei <davidshan@tencent.com>
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: Cong Wang <amwang@redhat.com>

---
diff --git a/net/core/neighbour.c b/net/core/neighbour.c
index 36fc692..c815f28 100644
--- a/net/core/neighbour.c
+++ b/net/core/neighbour.c
@@ -62,9 +62,6 @@ static void __neigh_notify(struct neighbour *n, int type, int flags);
 static void neigh_update_notify(struct neighbour *neigh);
 static int pneigh_ifdown(struct neigh_table *tbl, struct net_device *dev);
 
-static int zero;
-static int unres_qlen_max = INT_MAX / SKB_TRUESIZE(ETH_FRAME_LEN);
-
 static struct neigh_table *neigh_tables;
 #ifdef CONFIG_PROC_FS
 static const struct file_operations neigh_stat_seq_fops;
@@ -2772,6 +2769,8 @@ EXPORT_SYMBOL(neigh_app_ns);
 #endif /* CONFIG_ARPD */
 
 #ifdef CONFIG_SYSCTL
+static int zero;
+static int unres_qlen_max = INT_MAX / SKB_TRUESIZE(ETH_FRAME_LEN);
 
 static int proc_unres_qlen(ctl_table *ctl, int write, void __user *buffer,
 			   size_t *lenp, loff_t *ppos)

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next] net: fix some compiler warning in net/core/neighbour.c
  2012-12-06  2:04 [PATCH net-next] net: fix some compiler warning in net/core/neighbour.c Cong Wang
@ 2012-12-06  2:39 ` Shan Wei
  2012-12-06  2:51   ` David Miller
  0 siblings, 1 reply; 3+ messages in thread
From: Shan Wei @ 2012-12-06  2:39 UTC (permalink / raw)
  To: Cong Wang; +Cc: netdev, Shan Wei, David S. Miller

Cong Wang said, at 2012/12/6 10:04:
> From: Cong Wang <amwang@redhat.com>
> 
> 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 <fengguang.wu@intel.com>
> Cc: Shan Wei <davidshan@tencent.com>
> Cc: David S. Miller <davem@davemloft.net>
> Signed-off-by: Cong Wang <amwang@redhat.com>

Rapid response~~~ :-)
Same patch in my tree,and i see your patch when prepare to submit it.

Acked-by: Shan Wei <davidshan@tencent.com>


Best Regards
Shan Wei

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next] net: fix some compiler warning in net/core/neighbour.c
  2012-12-06  2:39 ` Shan Wei
@ 2012-12-06  2:51   ` David Miller
  0 siblings, 0 replies; 3+ messages in thread
From: David Miller @ 2012-12-06  2:51 UTC (permalink / raw)
  To: shanwei88; +Cc: amwang, netdev, davidshan

From: Shan Wei <shanwei88@gmail.com>
Date: Thu, 06 Dec 2012 10:39:00 +0800

> Cong Wang said, at 2012/12/6 10:04:
>> From: Cong Wang <amwang@redhat.com>
>> 
>> 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 <fengguang.wu@intel.com>
>> Cc: Shan Wei <davidshan@tencent.com>
>> Cc: David S. Miller <davem@davemloft.net>
>> Signed-off-by: Cong Wang <amwang@redhat.com>
> 
> Rapid response~~~ :-)
> Same patch in my tree,and i see your patch when prepare to submit it.
> 
> Acked-by: Shan Wei <davidshan@tencent.com>

Applied.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-12-06  2:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-06  2:04 [PATCH net-next] net: fix some compiler warning in net/core/neighbour.c Cong Wang
2012-12-06  2:39 ` Shan Wei
2012-12-06  2:51   ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).