From patchwork Sat Nov 24 05:53:54 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 13167 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 C750223E13 for ; Sat, 24 Nov 2012 05:55:03 +0000 (UTC) Received: from mail-ie0-f180.google.com (mail-ie0-f180.google.com [209.85.223.180]) by fiordland.canonical.com (Postfix) with ESMTP id 5A9C9A18150 for ; Sat, 24 Nov 2012 05:55:03 +0000 (UTC) Received: by mail-ie0-f180.google.com with SMTP id c10so2618109ieb.11 for ; Fri, 23 Nov 2012 21:55:02 -0800 (PST) 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=+MDiCzVSk32v0tWdKNIGkZGCcNBHwGbxg26dDqgRC7U=; b=an8gc7CqdHjgDa6wbh5Tr5PPp1paYCXmlCd+O/a7AHtLSG7o0maKV6mnkHKfeKRAok LQTNmDj4XMDDtpkIYhfJPhXId53pL9cL5m0b/QSP1vBoVmGM8zvEAGU3OioWiplCej99 2kt5k/RK9W1m2srV6la0glCqNAhJmoh7oNgK2ID+dDyU7DrWtTI0aGox1bgUP5wqdsmx R1gu62GLMJlcySyX5CVRC1TjZNYYDKEhPdRmkEj4Rrlou+dCKElrZ5LMWtcIlos1F00i rRo7W84Re426En5JyahleilO1MCtdX9aOQUIQhqRQILj7VpQwHG4Jn/lFw/sykDmsG/C LPBA== Received: by 10.50.173.34 with SMTP id bh2mr5349566igc.70.1353736502614; Fri, 23 Nov 2012 21:55:02 -0800 (PST) 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 n20csp441690igt; Fri, 23 Nov 2012 21:55:02 -0800 (PST) Received: by 10.66.85.195 with SMTP id j3mr15910674paz.1.1353736501718; Fri, 23 Nov 2012 21:55:01 -0800 (PST) Received: from mail-pa0-f54.google.com (mail-pa0-f54.google.com [209.85.220.54]) by mx.google.com with ESMTPS id yk3si10703089pbc.249.2012.11.23.21.55.01 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 23 Nov 2012 21:55:01 -0800 (PST) Received-SPF: neutral (google.com: 209.85.220.54 is neither permitted nor denied by best guess record for domain of viresh.kumar@linaro.org) client-ip=209.85.220.54; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.54 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-f54.google.com with SMTP id bi5so1573195pad.27 for ; Fri, 23 Nov 2012 21:55:01 -0800 (PST) Received: by 10.68.251.130 with SMTP id zk2mr19972537pbc.19.1353736501293; Fri, 23 Nov 2012 21:55:01 -0800 (PST) Received: from localhost ([122.167.245.93]) by mx.google.com with ESMTPS id sy1sm4953461pbc.66.2012.11.23.21.54.56 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 23 Nov 2012 21:54:59 -0800 (PST) From: Viresh Kumar To: bhutchings@solarflare.com, davem@davemloft.net, akpm@linux-foundation.org Cc: netdev@vger.kernel.org, linaro-dev@lists.linaro.org, linux-kernel@vger.kernel.org, patches@linaro.org, Viresh Kumar Subject: [PATCH V2 resend] net: dsa/slave: Fix compilation warnings Date: Sat, 24 Nov 2012 11:23:54 +0530 Message-Id: X-Mailer: git-send-email 1.7.12.rc2.18.g61b472e X-Gm-Message-State: ALoCoQlgBbREO0ALkwgxdI1lCJueNN7Uu2wJA8oymlBiXk6LN1EUoFFPRm/ieQKE+l6cQwXii7pi 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] Earlier approach to fix this was discussed here: lkml.org/lkml/2012/10/29/549 This is another approach to fix it. This is done by some changes in config options, which make more sense than the earlier approach. As, atleast one tagging option must always be selected for using net/dsa/ infrastructure, this patch selects NET_DSA from tagging configs instead of having it as an selectable config. Signed-off-by: Viresh Kumar --- I am resending it as the earlier thread is lost somewhere in Maintainers mailbox :) drivers/net/dsa/Kconfig | 1 - net/dsa/Kconfig | 16 +++++++++------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/drivers/net/dsa/Kconfig b/drivers/net/dsa/Kconfig index dd151d5..96eae22 100644 --- a/drivers/net/dsa/Kconfig +++ b/drivers/net/dsa/Kconfig @@ -1,5 +1,4 @@ menu "Distributed Switch Architecture drivers" - depends on NET_DSA config NET_DSA_MV88E6XXX tristate diff --git a/net/dsa/Kconfig b/net/dsa/Kconfig index 9c09f6e..3588e54 100644 --- a/net/dsa/Kconfig +++ b/net/dsa/Kconfig @@ -1,5 +1,5 @@ config NET_DSA - tristate "Distributed Switch Architecture support" + tristate default n depends on NETDEVICES && !S390 select PHYLIB @@ -8,19 +8,21 @@ config NET_DSA the Distributed Switch Architecture. -if NET_DSA +menu "Distributed Switch Architecture support" # tagging formats config NET_DSA_TAG_DSA - bool + bool "Original DSA packet tagging format" + select NET_DSA default n config NET_DSA_TAG_EDSA - bool + bool "Ethertype DSA packet tagging format" + select NET_DSA default n config NET_DSA_TAG_TRAILER - bool + bool "Trailer DSA packet tagging format" + select NET_DSA default n - -endif +endmenu