drivers/net/ethernet/marvell/octeontx2/af/mcs_rvu_if.c:29 rvu_mcs_set_lmac_bmap() error: uninitialized symbol 'lmac_bmap'.
From: Dan Carpenter
Date: Wed Feb 22 2023 - 09:18:32 EST
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 925cf0457d7e62ce08878ffb789189ac08ca8677
commit: ca7f49ff884677f97858c3934806e0e666425af0 octeontx2-af: cn10k: Introduce driver for macsec block.
config: s390-randconfig-m031-20230219 (https://download.01.org/0day-ci/archive/20230219/202302191621.sVquZwLz-lkp@xxxxxxxxx/config)
compiler: s390-linux-gcc (GCC) 12.1.0
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Reported-by: Dan Carpenter <error27@xxxxxxxxx>
| Link: https://lore.kernel.org/r/202302191621.sVquZwLz-lkp@xxxxxxxxx/
smatch warnings:
drivers/net/ethernet/marvell/octeontx2/af/mcs_rvu_if.c:29 rvu_mcs_set_lmac_bmap() error: uninitialized symbol 'lmac_bmap'.
vim +/lmac_bmap +29 drivers/net/ethernet/marvell/octeontx2/af/mcs_rvu_if.c
ca7f49ff884677 Geetha sowjanya 2022-10-01 16 static void rvu_mcs_set_lmac_bmap(struct rvu *rvu)
ca7f49ff884677 Geetha sowjanya 2022-10-01 17 {
ca7f49ff884677 Geetha sowjanya 2022-10-01 18 struct mcs *mcs = mcs_get_pdata(0);
ca7f49ff884677 Geetha sowjanya 2022-10-01 19 unsigned long lmac_bmap;
ca7f49ff884677 Geetha sowjanya 2022-10-01 20 int cgx, lmac, port;
ca7f49ff884677 Geetha sowjanya 2022-10-01 21
ca7f49ff884677 Geetha sowjanya 2022-10-01 22 for (port = 0; port < mcs->hw->lmac_cnt; port++) {
ca7f49ff884677 Geetha sowjanya 2022-10-01 23 cgx = port / rvu->hw->lmac_per_cgx;
ca7f49ff884677 Geetha sowjanya 2022-10-01 24 lmac = port % rvu->hw->lmac_per_cgx;
ca7f49ff884677 Geetha sowjanya 2022-10-01 25 if (!is_lmac_valid(rvu_cgx_pdata(cgx, rvu), lmac))
ca7f49ff884677 Geetha sowjanya 2022-10-01 26 continue;
ca7f49ff884677 Geetha sowjanya 2022-10-01 27 set_bit(port, &lmac_bmap);
This doesn't work. lmac_bmap needs to be initialized to zero.
ca7f49ff884677 Geetha sowjanya 2022-10-01 28 }
ca7f49ff884677 Geetha sowjanya 2022-10-01 @29 mcs->hw->lmac_bmap = lmac_bmap;
ca7f49ff884677 Geetha sowjanya 2022-10-01 30 }
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests