From patchwork Mon Oct 29 16:57:56 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 12568 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 5D18C23F6F for ; Mon, 29 Oct 2012 16:58:14 +0000 (UTC) Received: from mail-ia0-f180.google.com (mail-ia0-f180.google.com [209.85.210.180]) by fiordland.canonical.com (Postfix) with ESMTP id 06C71A180EC for ; Mon, 29 Oct 2012 16:58:13 +0000 (UTC) Received: by mail-ia0-f180.google.com with SMTP id f6so3897775iag.11 for ; Mon, 29 Oct 2012 09:58:13 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:x-gm-message-state; bh=MJJUm1wQIOiHQ07+PJFG+EIEg73xU2BisfYrv3gsavo=; b=SKNdfvffgpxDFZwfKmMhMT/lBblmAcq+bL6VcVZSBzhlS3pOOWnGNiXpfOnpqMTbk5 46MB15Alzdch4WFFPosgIB2sX1hLIpoHwmBp3VQ447iIovICh9aHv57/3hiZRFoDYvGc QBsqv/BfkzP7NaOfQqTwZxzTiE32OZ9nAX4DHuX2Fm7OVoQs2subUNAqKdda7cHhBHYf IU3xI09RJ0mEc2d6aci6PdsoN/cYxAogEPdZa0uuFDR/gZSd7o0GvbfcTNuKBf4kIo8N HNRa6givHEPc35onOgjEvP5jI4l+DCrfoqvNh92ywqC1YRKdWJjhaSfk7HUQPs/9fIaY s/vA== Received: by 10.50.140.97 with SMTP id rf1mr10079184igb.70.1351529893352; Mon, 29 Oct 2012 09:58:13 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.50.67.148 with SMTP id n20csp243024igt; Mon, 29 Oct 2012 09:58:12 -0700 (PDT) Received: by 10.68.197.101 with SMTP id it5mr6193896pbc.91.1351529892261; Mon, 29 Oct 2012 09:58:12 -0700 (PDT) Received: from mail-pa0-f50.google.com (mail-pa0-f50.google.com [209.85.220.50]) by mx.google.com with ESMTPS id sr2si13625561pbc.199.2012.10.29.09.58.11 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 29 Oct 2012 09:58:12 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.50 is neither permitted nor denied by best guess record for domain of viresh.kumar@linaro.org) client-ip=209.85.220.50; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.50 is neither permitted nor denied by best guess record for domain of viresh.kumar@linaro.org) smtp.mail=viresh.kumar@linaro.org Received: by mail-pa0-f50.google.com with SMTP id hz11so3670454pad.37 for ; Mon, 29 Oct 2012 09:58:11 -0700 (PDT) Received: by 10.68.204.34 with SMTP id kv2mr11035846pbc.136.1351529891601; Mon, 29 Oct 2012 09:58:11 -0700 (PDT) Received: from localhost ([122.166.182.101]) by mx.google.com with ESMTPS id wf8sm6243574pbc.65.2012.10.29.09.58.06 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 29 Oct 2012 09:58:09 -0700 (PDT) From: Viresh Kumar To: davem@davemloft.net Cc: linaro-dev@lists.linaro.org, patches@linaro.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Viresh Kumar Subject: [PATCH] net: dsa/slave: Fix compilation warnings Date: Mon, 29 Oct 2012 22:27:56 +0530 Message-Id: <5afab1ebe83e4361f1fd75bbea0c559af195bf02.1351529738.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 1.7.12.rc2.18.g61b472e X-Gm-Message-State: ALoCoQl49JXWh/1s/TgujmAGxGcInIfmFP4AvjU7/t3xZ2ech8Th+W9Td8ZeMUadFFyqbZUbihT7 Currently when none of CONFIG_NET_DSA_TAG_DSA, CONFIG_NET_DSA_TAG_EDSA and CONFIG_NET_DSA_TAG_TRAILER is defined, we get following compilation warnings: net/dsa/slave.c:51:12: warning: 'dsa_slave_init' defined but not used [-Wunused-function] net/dsa/slave.c:60:12: warning: 'dsa_slave_open' defined but not used [-Wunused-function] net/dsa/slave.c:98:12: warning: 'dsa_slave_close' defined but not used [-Wunused-function] net/dsa/slave.c:116:13: warning: 'dsa_slave_change_rx_flags' defined but not used [-Wunused-function] net/dsa/slave.c:127:13: warning: 'dsa_slave_set_rx_mode' defined but not used [-Wunused-function] net/dsa/slave.c:136:12: warning: 'dsa_slave_set_mac_address' defined but not used [-Wunused-function] net/dsa/slave.c:164:12: warning: 'dsa_slave_ioctl' defined but not used [-Wunused-function] Fix them by enclosing these routines under #ifdef,endif. Signed-off-by: Viresh Kumar --- net/dsa/slave.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/net/dsa/slave.c b/net/dsa/slave.c index e32083d..5606fae 100644 --- a/net/dsa/slave.c +++ b/net/dsa/slave.c @@ -48,6 +48,8 @@ void dsa_slave_mii_bus_init(struct dsa_switch *ds) /* slave device handling ****************************************************/ +#if defined(CONFIG_NET_DSA_TAG_DSA) || defined(CONFIG_NET_DSA_TAG_EDSA) || \ + defined(CONFIG_NET_DSA_TAG_TRAILER) static int dsa_slave_init(struct net_device *dev) { struct dsa_slave_priv *p = netdev_priv(dev); @@ -170,6 +172,8 @@ static int dsa_slave_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) return -EOPNOTSUPP; } +#endif /* defined(CONFIG_NET_DSA_TAG_DSA) || defined(CONFIG_NET_DSA_TAG_EDSA || + defined(CONFIG_NET_DSA_TAG_TRAILER) */ /* ethtool operations *******************************************************/