Hi Pablo,
I love your patch! Perhaps something to improve:
[auto build test WARNING on nf-next/master]
[also build test WARNING on v5.10-rc7 next-20201211]
[cannot apply to nf/master]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url:
https://github.com/0day-ci/linux/commits/Pablo-Neira-Ayuso/netfilter-nfta...
base:
https://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next.git master
compiler: riscv64-linux-gcc (GCC) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
"cppcheck warnings: (new ones prefixed by >>)"
> net/netfilter/nft_dynset.c:337:61: warning: Uninitialized
variable: i [uninitvar]
if (nft_expr_dump(skb, NFTA_DYNSET_EXPR,
priv->expr_array[i]))
^
--
cppcheck possible warnings: (new ones prefixed by >>, may not real problems)
> net/netfilter/nft_set_hash.c:90:3: warning: Address of local
auto-variable assigned to a function parameter. [autoVariables]
*ext =
&he->ext;
^
net/netfilter/nft_set_hash.c:149:2: warning: Address of local auto-variable assigned to
a function parameter. [autoVariables]
*ext = &he->ext;
^
net/netfilter/nft_set_hash.c:176:3: warning: Address of local auto-variable assigned to
a function parameter. [autoVariables]
*ext = &prev->ext;
^
net/netfilter/nft_set_hash.c:448:4: warning: Address of local auto-variable assigned to
a function parameter. [autoVariables]
*ext = &he->ext;
^
net/netfilter/nft_set_hash.c:489:4: warning: Address of local auto-variable assigned to
a function parameter. [autoVariables]
*ext = &he->ext;
^
net/netfilter/nft_set_hash.c:527:4: warning: Address of local auto-variable assigned to
a function parameter. [autoVariables]
*ext = &he->ext;
^
vim +337 net/netfilter/nft_dynset.c
316
317 static int nft_dynset_dump(struct sk_buff *skb, const struct nft_expr *expr)
318 {
319 const struct nft_dynset *priv = nft_expr_priv(expr);
320 u32 flags = priv->invert ? NFT_DYNSET_F_INV : 0;
321 int i;
322
323 if (nft_dump_register(skb, NFTA_DYNSET_SREG_KEY, priv->sreg_key))
324 goto nla_put_failure;
325 if (priv->set->flags & NFT_SET_MAP &&
326 nft_dump_register(skb, NFTA_DYNSET_SREG_DATA, priv->sreg_data))
327 goto nla_put_failure;
328 if (nla_put_be32(skb, NFTA_DYNSET_OP, htonl(priv->op)))
329 goto nla_put_failure;
330 if (nla_put_string(skb, NFTA_DYNSET_SET_NAME, priv->set->name))
331 goto nla_put_failure;
332 if (nla_put_be64(skb, NFTA_DYNSET_TIMEOUT,
333 cpu_to_be64(jiffies_to_msecs(priv->timeout)),
334 NFTA_DYNSET_PAD))
335 goto nla_put_failure;
336 if (priv->num_exprs == 1) {
337 if (nft_expr_dump(skb, NFTA_DYNSET_EXPR,
priv->expr_array[i]))
338 goto nla_put_failure;
339 }
340 if (nla_put_be32(skb, NFTA_DYNSET_FLAGS, htonl(flags)))
341 goto nla_put_failure;
342 return 0;
343
344 nla_put_failure:
345 return -1;
346 }
347
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org