From: Cong Wang <xiyou.wangcong@gmail.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Jamal Hadi Salim <jhs@mojatatu.com>,
Jiri Pirko <jiri@resnulli.us>,
"David S. Miller" <davem@davemloft.net>,
Vlad Buslov <vladbu@mellanox.com>,
Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>,
Davide Caratti <dcaratti@redhat.com>,
Simon Horman <simon.horman@netronome.com>,
Adi Nissim <adin@mellanox.com>, wenxu <wenxu@ucloud.cn>,
Linux Kernel Network Developers <netdev@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] net/sched: avoid unused-label warning
Date: Tue, 5 Mar 2019 16:28:23 -0800 [thread overview]
Message-ID: <CAM_iQpXC6s1fL_U-riRAoHT+gtcP8hE=w2MXyY7SGjSNO34dGg@mail.gmail.com> (raw)
In-Reply-To: <20190304204049.2150878-1-arnd@arndb.de>
On Mon, Mar 4, 2019 at 12:40 PM Arnd Bergmann <arnd@arndb.de> wrote:
>
> The label is only used from inside the #ifdef and should be
> hidden the same way, to avoid this warning:
>
> net/sched/act_tunnel_key.c: In function 'tunnel_key_init':
> net/sched/act_tunnel_key.c:389:1: error: label 'release_tun_meta' defined but not used [-Werror=unused-label]
> release_tun_meta:
>
> Fixes: 41411e2fd6b8 ("net/sched: act_tunnel_key: Add dst_cache support")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> net/sched/act_tunnel_key.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/net/sched/act_tunnel_key.c b/net/sched/act_tunnel_key.c
> index 2a5f215ae876..3beb4717d3b7 100644
> --- a/net/sched/act_tunnel_key.c
> +++ b/net/sched/act_tunnel_key.c
> @@ -392,8 +392,8 @@ static int tunnel_key_init(struct net *net, struct nlattr *nla,
> #ifdef CONFIG_DST_CACHE
> if (metadata)
> dst_cache_destroy(&metadata->u.tun_info.dst_cache);
> -#endif
> release_tun_meta:
> +#endif
These #ifdef's are ugly, either we should select DST_CACHE
or provide a nop for these dst_cache_*() APIs when it is not
enabled.
next prev parent reply other threads:[~2019-03-06 0:28 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-04 20:40 [PATCH] net/sched: avoid unused-label warning Arnd Bergmann
2019-03-04 21:24 ` David Miller
2019-03-06 0:28 ` Cong Wang [this message]
2019-03-06 8:32 ` Arnd Bergmann
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='CAM_iQpXC6s1fL_U-riRAoHT+gtcP8hE=w2MXyY7SGjSNO34dGg@mail.gmail.com' \
--to=xiyou.wangcong@gmail.com \
--cc=adin@mellanox.com \
--cc=arnd@arndb.de \
--cc=davem@davemloft.net \
--cc=dcaratti@redhat.com \
--cc=jhs@mojatatu.com \
--cc=jiri@resnulli.us \
--cc=linux-kernel@vger.kernel.org \
--cc=marcelo.leitner@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=simon.horman@netronome.com \
--cc=vladbu@mellanox.com \
--cc=wenxu@ucloud.cn \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).