Skip to content

Commit

Permalink
net: dsa/slave: Fix compilation warnings
Browse files Browse the repository at this point in the history
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 <viresh.kumar@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
vireshk authored and davem330 committed Nov 25, 2012
1 parent a303fbf commit 82167cb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
1 change: 0 additions & 1 deletion drivers/net/dsa/Kconfig
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
menu "Distributed Switch Architecture drivers"
depends on NET_DSA

config NET_DSA_MV88E6XXX
tristate
Expand Down
16 changes: 9 additions & 7 deletions net/dsa/Kconfig
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
config NET_DSA
tristate "Distributed Switch Architecture support"
tristate
default n
depends on EXPERIMENTAL && NETDEVICES && !S390
select PHYLIB
Expand All @@ -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

0 comments on commit 82167cb

Please sign in to comment.