Skip to contentSkip to conversation

net: fix some compiler warning in net/core/neighbour.c

PATCH Applied Cong Wang 3 participants 3 messages Dec 6, 2012

Subsystems (2)
lore
Share & tools
lore

Cong Wang

author
#0 lore raw

PATCH 1/1 net: fix some compiler warning in net/core/neighbour.c

From: Cong Wang <[email protected]>

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.

---

net/core/neighbour.c +2 -3
index 36fc692..c815f28 100644
@@ -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)
Acked-by on v1 1/1
#1 lore raw

Cong Wang said, at 2012/12/6 10:04:

Quoted 5 lines

From: Cong Wang <[email protected]>

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]

Quoted 7 lines

These variables are only used when CONFIG_SYSCTL is defined, so move them under #ifdef CONFIG_SYSCTL.

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

Best Regards
Shan Wei

maintainer Applied
#2 lore raw

From: Shan Wei <[email protected]>
Date: Thu, 06 Dec 2012 10:39:00 +0800

Quoted 14 lines

Cong Wang said, at 2012/12/6 10:04:

Quoted 5 lines

From: Cong Wang <[email protected]>

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]

Quoted 7 lines

These variables are only used when CONFIG_SYSCTL is defined, so move them under #ifdef CONFIG_SYSCTL.

Quoted 4 lines

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

Applied.