[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202207111802.srWD68LS-lkp@intel.com>
Date: Mon, 11 Jul 2022 18:39:14 +0800
From: kernel test robot <lkp@...el.com>
To: Tomer Tayar <ttayar@...ana.ai>
Cc: kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
Oded Gabbay <ogabbay@...nel.org>
Subject: [ogabbay:habanalabs-next 82/88]
drivers/misc/habanalabs/gaudi2/gaudi2.c:4595:40: warning: variable 'msix_id'
set but not used
tree: https://git.kernel.org/pub/scm/linux/kernel/git/ogabbay/linux.git habanalabs-next
head: a3f3678bf18854ca324dc7110821b27004e1a11c
commit: 584cc611ae39d2ff74b6a4593ebe0e369ce38102 [82/88] habanalabs/gaudi2: modify decoder to use virtual MSI-X doorbell
config: microblaze-randconfig-r013-20220710
compiler: microblaze-linux-gcc (GCC) 11.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/ogabbay/linux.git/commit/?id=584cc611ae39d2ff74b6a4593ebe0e369ce38102
git remote add ogabbay https://git.kernel.org/pub/scm/linux/kernel/git/ogabbay/linux.git
git fetch --no-tags ogabbay habanalabs-next
git checkout 584cc611ae39d2ff74b6a4593ebe0e369ce38102
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross W=1 O=build_dir ARCH=microblaze SHELL=/bin/bash drivers/misc/
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@...el.com>
All warnings (new ones prefixed by >>):
drivers/misc/habanalabs/gaudi2/gaudi2.c: In function 'gaudi2_init_dec':
>> drivers/misc/habanalabs/gaudi2/gaudi2.c:4595:40: warning: variable 'msix_id' set but not used [-Wunused-but-set-variable]
4595 | u32 dcore_id, dec_id, dec_bit, msix_id;
| ^~~~~~~
vim +/msix_id +4595 drivers/misc/habanalabs/gaudi2/gaudi2.c
31abf12e827d31 Oded Gabbay 2022-06-26 4591
31abf12e827d31 Oded Gabbay 2022-06-26 4592 static void gaudi2_init_dec(struct hl_device *hdev)
31abf12e827d31 Oded Gabbay 2022-06-26 4593 {
31abf12e827d31 Oded Gabbay 2022-06-26 4594 struct gaudi2_device *gaudi2 = hdev->asic_specific;
31abf12e827d31 Oded Gabbay 2022-06-26 @4595 u32 dcore_id, dec_id, dec_bit, msix_id;
31abf12e827d31 Oded Gabbay 2022-06-26 4596 u64 base_addr;
31abf12e827d31 Oded Gabbay 2022-06-26 4597
31abf12e827d31 Oded Gabbay 2022-06-26 4598 if (!hdev->asic_prop.decoder_enabled_mask)
31abf12e827d31 Oded Gabbay 2022-06-26 4599 return;
31abf12e827d31 Oded Gabbay 2022-06-26 4600
31abf12e827d31 Oded Gabbay 2022-06-26 4601 if ((gaudi2->dec_hw_cap_initialized & HW_CAP_DEC_MASK) == HW_CAP_DEC_MASK)
31abf12e827d31 Oded Gabbay 2022-06-26 4602 return;
31abf12e827d31 Oded Gabbay 2022-06-26 4603
31abf12e827d31 Oded Gabbay 2022-06-26 4604 for (dcore_id = 0 ; dcore_id < NUM_OF_DCORES ; dcore_id++)
31abf12e827d31 Oded Gabbay 2022-06-26 4605 for (dec_id = 0 ; dec_id < NUM_OF_DEC_PER_DCORE ; dec_id++) {
31abf12e827d31 Oded Gabbay 2022-06-26 4606 dec_bit = dcore_id * NUM_OF_DEC_PER_DCORE + dec_id;
31abf12e827d31 Oded Gabbay 2022-06-26 4607
31abf12e827d31 Oded Gabbay 2022-06-26 4608 if (!(hdev->asic_prop.decoder_enabled_mask & BIT(dec_bit)))
31abf12e827d31 Oded Gabbay 2022-06-26 4609 continue;
31abf12e827d31 Oded Gabbay 2022-06-26 4610
31abf12e827d31 Oded Gabbay 2022-06-26 4611 base_addr = mmDCORE0_DEC0_CMD_BASE +
31abf12e827d31 Oded Gabbay 2022-06-26 4612 BRDG_CTRL_BLOCK_OFFSET +
31abf12e827d31 Oded Gabbay 2022-06-26 4613 dcore_id * DCORE_OFFSET +
31abf12e827d31 Oded Gabbay 2022-06-26 4614 dec_id * DCORE_VDEC_OFFSET;
31abf12e827d31 Oded Gabbay 2022-06-26 4615
31abf12e827d31 Oded Gabbay 2022-06-26 4616 msix_id = GAUDI2_IRQ_NUM_DCORE0_DEC0_NRM +
31abf12e827d31 Oded Gabbay 2022-06-26 4617 (dcore_id * NUM_OF_DEC_PER_DCORE + dec_id) * 2;
31abf12e827d31 Oded Gabbay 2022-06-26 4618
584cc611ae39d2 Tomer Tayar 2022-06-30 4619 gaudi2_init_vdec_brdg_ctrl(hdev, base_addr, dec_bit);
31abf12e827d31 Oded Gabbay 2022-06-26 4620
31abf12e827d31 Oded Gabbay 2022-06-26 4621 gaudi2->dec_hw_cap_initialized |= BIT_ULL(HW_CAP_DEC_SHIFT + dec_bit);
31abf12e827d31 Oded Gabbay 2022-06-26 4622 }
31abf12e827d31 Oded Gabbay 2022-06-26 4623
31abf12e827d31 Oded Gabbay 2022-06-26 4624 for (dec_id = 0 ; dec_id < NUM_OF_PCIE_VDEC ; dec_id++) {
31abf12e827d31 Oded Gabbay 2022-06-26 4625 dec_bit = PCIE_DEC_SHIFT + dec_id;
31abf12e827d31 Oded Gabbay 2022-06-26 4626 if (!(hdev->asic_prop.decoder_enabled_mask & BIT(dec_bit)))
31abf12e827d31 Oded Gabbay 2022-06-26 4627 continue;
31abf12e827d31 Oded Gabbay 2022-06-26 4628
31abf12e827d31 Oded Gabbay 2022-06-26 4629 base_addr = mmPCIE_DEC0_CMD_BASE + BRDG_CTRL_BLOCK_OFFSET +
31abf12e827d31 Oded Gabbay 2022-06-26 4630 dec_id * DCORE_VDEC_OFFSET;
31abf12e827d31 Oded Gabbay 2022-06-26 4631
31abf12e827d31 Oded Gabbay 2022-06-26 4632 msix_id = GAUDI2_IRQ_NUM_SHARED_DEC0_NRM + (dec_id * 2);
31abf12e827d31 Oded Gabbay 2022-06-26 4633
584cc611ae39d2 Tomer Tayar 2022-06-30 4634 gaudi2_init_vdec_brdg_ctrl(hdev, base_addr, dec_bit);
31abf12e827d31 Oded Gabbay 2022-06-26 4635
31abf12e827d31 Oded Gabbay 2022-06-26 4636 gaudi2->dec_hw_cap_initialized |= BIT_ULL(HW_CAP_DEC_SHIFT + dec_bit);
31abf12e827d31 Oded Gabbay 2022-06-26 4637 }
31abf12e827d31 Oded Gabbay 2022-06-26 4638 }
31abf12e827d31 Oded Gabbay 2022-06-26 4639
:::::: The code at line 4595 was first introduced by commit
:::::: 31abf12e827d31d69400cfd3df2515ddadeca600 habanalabs: add gaudi2 asic-specific code
:::::: TO: Oded Gabbay <ogabbay@...nel.org>
:::::: CC: Oded Gabbay <ogabbay@...nel.org>
--
0-DAY CI Kernel Test Service
https://01.org/lkp
View attachment "config" of type "text/plain" (154020 bytes)
Powered by blists - more mailing lists