Re: [net-next PATCH v1 06/15] octeontx2-af: Add support for CPT second pass

kernel test robot
2025-05-07T07:59:04Z

Hi Tanmay,

kernel test robot noticed the following build warnings:

[auto build test WARNING on net-next/main]

url: https://github.com/intel-lab-lkp/linux/commits/Tanmay-Jagdale/crypto-octeontx2-Share-engine-group-info-with-AF-driver/20250502-213203
base: net-next/main
patch link: https://lore.kernel.org/r/20250502132005.611698-7-tanmay%40marvell.com
patch subject: [net-next PATCH v1 06/15] octeontx2-af: Add support for CPT second pass
config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20250507/202505071511.neU9Siwr-lkp@intel.com/config)
compiler: clang version 20.1.2 (https://github.com/llvm/llvm-project 58df0ef89dd64126512e4ee27b4ac3fd8ddf6247)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250507/202505071511.neU9Siwr-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202505071511.neU9Siwr-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c:6723:6: warning: variable 'rq_mask' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
6723 | if (req->ipsec_cfg1.rq_mask_enable) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c:6729:41: note: uninitialized use occurs here
6729 | configure_rq_mask(rvu, blkaddr, nixlf, rq_mask,
| ^~~~~~~
drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c:6723:2: note: remove the 'if' if its condition is always true
6723 | if (req->ipsec_cfg1.rq_mask_enable) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c:6710:13: note: initialize the variable 'rq_mask' to silence this warning
6710 | int rq_mask, err;
| ^
| = 0
1 warning generated.

vim +6723 drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c

6702
6703 int rvu_mbox_handler_nix_lf_inline_rq_cfg(struct rvu *rvu,
6704 struct nix_rq_cpt_field_mask_cfg_req *req,
6705 struct msg_rsp *rsp)
6706 {
6707 struct rvu_hwinfo *hw = rvu->hw;
6708 struct nix_hw *nix_hw;
6709 int blkaddr, nixlf;
6710 int rq_mask, err;
6711
6712 err = nix_get_nixlf(rvu, req->hdr.pcifunc, &nixlf, &blkaddr);
6713 if (err)
6714 return err;
6715
6716 nix_hw = get_nix_hw(rvu->hw, blkaddr);
6717 if (!nix_hw)
6718 return NIX_AF_ERR_INVALID_NIXBLK;
6719
6720 if (!hw->cap.second_cpt_pass)
6721 return NIX_AF_ERR_INVALID_NIXBLK;
6722
> 6723 if (req->ipsec_cfg1.rq_mask_enable) {

--
0-DAY CI Kernel Test Service