From patchwork Fri Dec 7 00:06:44 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cong Ding X-Patchwork-Id: 204352 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 2175B2C00D0 for ; Fri, 7 Dec 2012 11:10:48 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754988Ab2LGAKe (ORCPT ); Thu, 6 Dec 2012 19:10:34 -0500 Received: from mail-qc0-f174.google.com ([209.85.216.174]:57563 "EHLO mail-qc0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754489Ab2LGAKc (ORCPT ); Thu, 6 Dec 2012 19:10:32 -0500 Received: by mail-qc0-f174.google.com with SMTP id o22so3622754qcr.19 for ; Thu, 06 Dec 2012 16:10:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer; bh=NY66fslNjysZmY0JsTa14GMvxFoNy8RuJHHust+sFb8=; b=OJDLOPgOFYwHEt2QHkaP83f3s2FYuqzD2ZyJz8RxtU8y7CHJKuwC85Oxn8+/Tl9AGF mQee1rDlBcCfXwuSqw14bzzHybSimyhY2oE3l36SsWvEzqQjJTqJayhjxAGbvkeUcT6o QnVYmZdp1PwrCt0nceqEA5F2HJKfAFfT7kjODXVtjVEuo8Uk95sVktHAVdXcG5UlrrDZ m3B5U4+AxdZakAu2P42bs5N/9ZwRsj9O2keypIo+bbgOTjNErS85caPIeEs2nYvvmB8T 5pUaxB6w/x8vI0owTKSOj1Cew2mY9Z/NQvT9i9Y3xKinz8QSL4Haqbuct9ZqbqPjT3E5 tVIQ== Received: by 10.224.35.137 with SMTP id p9mr6002182qad.85.1354839032152; Thu, 06 Dec 2012 16:10:32 -0800 (PST) Received: from localhost.localdomain (ec2-54-243-39-165.compute-1.amazonaws.com. [54.243.39.165]) by mx.google.com with ESMTPS id r13sm6201409qaa.20.2012.12.06.16.10.30 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 06 Dec 2012 16:10:31 -0800 (PST) From: Cong Ding To: "David S. Miller" , "Eric W. Biederman" , Eric Dumazet , Pavel Emelyanov , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Cong Ding Subject: [PATCH] net: core: fix unused variable sparse warning Date: Fri, 7 Dec 2012 00:06:44 +0000 Message-Id: <1354838913-20084-1-git-send-email-dinggnu@gmail.com> X-Mailer: git-send-email 1.7.4.5 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org 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 --- net/core/neighbour.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/net/core/neighbour.c b/net/core/neighbour.c index 36fc692..4a15278 100644 --- a/net/core/neighbour.c +++ b/net/core/neighbour.c @@ -62,8 +62,10 @@ 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); +#ifdef CONFIG_SYSCTL static int zero; static int unres_qlen_max = INT_MAX / SKB_TRUESIZE(ETH_FRAME_LEN); +#endif static struct neigh_table *neigh_tables; #ifdef CONFIG_PROC_FS