[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20181110.095610.2051169073778854246.davem@davemloft.net>
Date: Sat, 10 Nov 2018 09:56:10 -0800 (PST)
From: David Miller <davem@...emloft.net>
To: jakub.kicinski@...ronome.com
Cc: oss-drivers@...ronome.com, netdev@...r.kernel.org
Subject: Re: [PATCH net v2] net: sched: cls_flower: validate nested
enc_opts_policy to avoid warning
From: Jakub Kicinski <jakub.kicinski@...ronome.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@...ronome.com>
> Acked-by: Simon Horman <simon.horman@...ronome.com>
Applied and queued up for -stable.
Powered by blists - more mailing lists