All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Lezcano <daniel.lezcano@linaro.org>
To: Viresh Kumar <viresh.kumar@linaro.org>
Cc: Ben Hutchings <bhutchings@solarflare.com>,
	netdev@vger.kernel.org, linaro-dev@lists.linaro.org,
	davem@davemloft.net, linux-kernel@vger.kernel.org,
	patches@linaro.org
Subject: Re: [PATCH] net: dsa/slave: Fix compilation warnings
Date: Tue, 30 Oct 2012 08:53:29 +0100	[thread overview]
Message-ID: <508F8779.8070300@linaro.org> (raw)
In-Reply-To: <CAKohponOKk5e2Sxyhjw-XvzVxF3tNp66rsnYCwvwHazAPAauKw@mail.gmail.com>

On 10/30/2012 08:31 AM, Viresh Kumar wrote:
> On 30 October 2012 12:15, Viresh Kumar <viresh.kumar@linaro.org> wrote:
>> And so, if we select NET_DSA from these tagging drivers, then only slave.c will
>> get compiled. Otherwise slave.c dsa.c dsa_core.c wouldn't be compiled and so
>> no warnings.
> 
> If my above explanation/assumption is correct, then please review following
> patch:
> 
> --------------------------x-----------------------x----------------
> 
> From: Viresh Kumar <viresh.kumar@linaro.org>
> Date: Mon, 29 Oct 2012 22:19:14 +0530
> Subject: [PATCH] net: dsa/slave: Fix compilation warnings
> 
> 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>
> ---
>  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 274791c..f7c6cef 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 EXPERIMENTAL && 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_DSt

typo 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
> 
> _______________________________________________
> linaro-dev mailing list
> linaro-dev@lists.linaro.org
> http://lists.linaro.org/mailman/listinfo/linaro-dev


-- 
 <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog


  reply	other threads:[~2012-10-30  7:53 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-29 16:57 [PATCH] net: dsa/slave: Fix compilation warnings Viresh Kumar
2012-10-29 19:59 ` Ben Hutchings
2012-10-30  6:45   ` Viresh Kumar
2012-10-30  7:31     ` Viresh Kumar
2012-10-30  7:53       ` Daniel Lezcano [this message]
2012-10-30  7:55         ` Viresh Kumar
2012-10-30  9:00           ` Daniel Lezcano
2012-10-30  9:03             ` Viresh Kumar
2012-10-30  9:26               ` Daniel Lezcano
2012-10-30  9:45                 ` Viresh Kumar
2012-10-30 10:04                   ` Daniel Lezcano
     [not found]       ` <CAKohponOKk5e2Sxyhjw-XvzVxF3tNp66rsnYCwvwHazAPAauKw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-11-07  3:50         ` Viresh Kumar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=508F8779.8070300@linaro.org \
    --to=daniel.lezcano@linaro.org \
    --cc=bhutchings@solarflare.com \
    --cc=davem@davemloft.net \
    --cc=linaro-dev@lists.linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=patches@linaro.org \
    --cc=viresh.kumar@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.