From: David Miller <davem@davemloft.net>
To: jakub.kicinski@netronome.com
Cc: oss-drivers@netronome.com, netdev@vger.kernel.org
Subject: Re: [PATCH net v2] net: sched: cls_flower: validate nested enc_opts_policy to avoid warning
Date: Sat, 10 Nov 2018 09:56:10 -0800 (PST) [thread overview]
Message-ID: <20181110.095610.2051169073778854246.davem@davemloft.net> (raw)
In-Reply-To: <20181110050626.6659-1-jakub.kicinski@netronome.com>
From: Jakub Kicinski <jakub.kicinski@netronome.com>
Date: Fri, 9 Nov 2018 21:06:26 -0800
> TCA_FLOWER_KEY_ENC_OPTS and TCA_FLOWER_KEY_ENC_OPTS_MASK can only
> currently contain further nested attributes, which are parsed by
> hand, so the policy is never actually used resulting in a W=1
> build warning:
>
> net/sched/cls_flower.c:492:1: warning: ‘enc_opts_policy’ defined but not used [-Wunused-const-variable=]
> enc_opts_policy[TCA_FLOWER_KEY_ENC_OPTS_MAX + 1] = {
>
> Add the validation anyway to avoid potential bugs when other
> attributes are added and to make the attribute structure slightly
> more clear. Validation will also set extact to point to bad
> attribute on error.
>
> Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
> Acked-by: Simon Horman <simon.horman@netronome.com>
Applied and queued up for -stable.
prev parent reply other threads:[~2018-11-11 3:42 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-10 5:06 [PATCH net v2] net: sched: cls_flower: validate nested enc_opts_policy to avoid warning Jakub Kicinski
2018-11-10 7:18 ` Jiri Pirko
2018-11-10 17:56 ` David Miller [this message]
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=20181110.095610.2051169073778854246.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=jakub.kicinski@netronome.com \
--cc=netdev@vger.kernel.org \
--cc=oss-drivers@netronome.com \
/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