Content-Type: multipart/mixed; boundary="===============6021690497783789447==" MIME-Version: 1.0 From: kernel test robot To: kbuild-all@lists.01.org Subject: Re: [PATCH nf-next, v4 3/4] netfilter: nftables: generalize set extension to support for several expressions Date: Sat, 12 Dec 2020 22:20:29 +0800 Message-ID: <202012122219.prJ9esOK-lkp@intel.com> In-Reply-To: <20201212103214.12940-3-pablo@netfilter.org> List-Id: --===============6021690497783789447== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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/netfilte= r-nftables-generalize-set-expressions-support/20201212-183708 base: https://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next.git m= aster compiler: riscv64-linux-gcc (GCC) 9.3.0 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot "cppcheck warnings: (new ones prefixed by >>)" >> net/netfilter/nft_dynset.c:337:61: warning: Uninitialized variable: i [u= ninitvar] 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-variab= le assigned to a function parameter. [autoVariables] *ext =3D &he->ext; ^ net/netfilter/nft_set_hash.c:149:2: warning: Address of local auto-varia= ble assigned to a function parameter. [autoVariables] *ext =3D &he->ext; ^ net/netfilter/nft_set_hash.c:176:3: warning: Address of local auto-varia= ble assigned to a function parameter. [autoVariables] *ext =3D &prev->ext; ^ net/netfilter/nft_set_hash.c:448:4: warning: Address of local auto-varia= ble assigned to a function parameter. [autoVariables] *ext =3D &he->ext; ^ net/netfilter/nft_set_hash.c:489:4: warning: Address of local auto-varia= ble assigned to a function parameter. [autoVariables] *ext =3D &he->ext; ^ net/netfilter/nft_set_hash.c:527:4: warning: Address of local auto-varia= ble assigned to a function parameter. [autoVariables] *ext =3D &he->ext; ^ vim +337 net/netfilter/nft_dynset.c 316 = 317 static int nft_dynset_dump(struct sk_buff *skb, const struct nft_exp= r *expr) 318 { 319 const struct nft_dynset *priv =3D nft_expr_priv(expr); 320 u32 flags =3D 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 =3D=3D 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(a)lists.01.org --===============6021690497783789447==--