From patchwork Thu Dec 6 02:04:04 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amerigo Wang X-Patchwork-Id: 204096 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 0F9672C0180 for ; Thu, 6 Dec 2012 13:05:35 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753622Ab2LFCEm (ORCPT ); Wed, 5 Dec 2012 21:04:42 -0500 Received: from mx1.redhat.com ([209.132.183.28]:8041 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751980Ab2LFCEl (ORCPT ); Wed, 5 Dec 2012 21:04:41 -0500 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id qB624I5E011474 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 5 Dec 2012 21:04:18 -0500 Received: from cr0.redhat.com (vpn1-115-141.nay.redhat.com [10.66.115.141]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id qB624Ej8016445; Wed, 5 Dec 2012 21:04:15 -0500 From: Cong Wang To: netdev@vger.kernel.org Cc: Shan Wei , "David S. Miller" , Cong Wang Subject: [PATCH net-next] net: fix some compiler warning in net/core/neighbour.c Date: Thu, 6 Dec 2012 10:04:04 +0800 Message-Id: <1354759444-4937-1-git-send-email-amwang@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Cong Wang 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 Cc: Shan Wei Cc: David S. Miller Signed-off-by: Cong Wang Acked-by: Shan Wei --- -- 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 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)