[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202206241450.BMFfdnHk-lkp@intel.com>
Date: Sat, 25 Jun 2022 10:57:59 +0800
From: kernel test robot <lkp@...el.com>
To: Dafna Hirschfeld <dhirschfeld@...ana.ai>
Cc: kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
Oded Gabbay <ogabbay@...nel.org>
Subject: [ogabbay:habanalabs-next 33/36]
drivers/misc/habanalabs/gaudi/gaudi.c:4852:25: warning: variable 'dummy_val'
set but not used
tree: https://git.kernel.org/pub/scm/linux/kernel/git/ogabbay/linux.git habanalabs-next
head: 5bb2e42792471d81bfca831170896f13eefdadf6
commit: f56478b84f20394337c7fbb981e34b4f503527ca [33/36] habanalabs: don't send addr and size to scrub_device_mem cb
config: i386-randconfig-a001
compiler: gcc-11 (Debian 11.3.0-3) 11.3.0
reproduce (this is a W=1 build):
# https://git.kernel.org/pub/scm/linux/kernel/git/ogabbay/linux.git/commit/?id=f56478b84f20394337c7fbb981e34b4f503527ca
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 f56478b84f20394337c7fbb981e34b4f503527ca
# save the config file
mkdir build_dir && cp config build_dir/.config
make W=1 O=build_dir ARCH=i386 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/gaudi/gaudi.c: In function 'gaudi_scrub_device_mem':
>> drivers/misc/habanalabs/gaudi/gaudi.c:4852:25: warning: variable 'dummy_val' set but not used [-Wunused-but-set-variable]
4852 | u64 addr, size, dummy_val;
| ^~~~~~~~~
vim +/dummy_val +4852 drivers/misc/habanalabs/gaudi/gaudi.c
4848
4849 static int gaudi_scrub_device_mem(struct hl_device *hdev)
4850 {
4851 struct asic_fixed_properties *prop = &hdev->asic_prop;
> 4852 u64 addr, size, dummy_val;
4853 int rc = 0;
4854 u64 val = 0;
4855
4856 if (!hdev->memory_scrub)
4857 return 0;
4858
4859 /* Wait till device is idle */
4860 rc = hl_poll_timeout(hdev,
4861 mmDMA0_CORE_STS0 /* dummy */,
4862 dummy_val /* dummy */,
4863 (hdev->asic_funcs->is_device_idle(hdev, NULL, 0, NULL)),
4864 1000,
4865 HBM_SCRUBBING_TIMEOUT_US);
4866 if (rc) {
4867 dev_err(hdev->dev, "waiting for idle timeout\n");
4868 return -EIO;
4869 }
4870
4871 /* Scrub SRAM */
4872 addr = prop->sram_user_base_address;
4873 size = hdev->pldm ? 0x10000 : prop->sram_size - SRAM_USER_BASE_OFFSET;
4874 val = 0x7777777777777777ull;
4875
4876 dev_dbg(hdev->dev, "Scrubing SRAM: 0x%09llx - 0x%09llx val: 0x%llx\n",
4877 addr, addr + size, val);
4878 rc = gaudi_memset_device_memory(hdev, addr, size, val);
4879 if (rc) {
4880 dev_err(hdev->dev, "Failed to clear SRAM (%d)\n", rc);
4881 return rc;
4882 }
4883
4884 /* Scrub HBM using all DMA channels in parallel */
4885 rc = gaudi_scrub_device_dram(hdev, 0xdeadbeaf);
4886 if (rc) {
4887 dev_err(hdev->dev, "Failed to clear HBM (%d)\n", rc);
4888 return rc;
4889 }
4890
4891 return 0;
4892 }
4893
--
0-DAY CI Kernel Test Service
https://01.org/lkp
View attachment "config" of type "text/plain" (150410 bytes)
Powered by blists - more mailing lists