lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202210021438.qCk9hCcE-lkp@intel.com>
Date:   Sun, 2 Oct 2022 14:50:17 +0800
From:   kernel test robot <lkp@...el.com>
To:     Huacai Chen <chenhuacai@...ngson.cn>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org
Subject: [chenhuacai-loongson:loongarch-next 10/21]
 drivers/misc/habanalabs/common/pci/pci.c:78:16: warning: variable 'bar' set
 but not used

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson.git loongarch-next
head:   c145c62399b789b70f8730e0e73f6dc4c2f9d320
commit: 85add6313234aab619257a11e682d40df69e2ed2 [10/21] LoongArch: Use TLB for ioremap()
config: loongarch-allmodconfig
compiler: loongarch64-linux-gcc (GCC) 12.1.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/chenhuacai/linux-loongson.git/commit/?id=85add6313234aab619257a11e682d40df69e2ed2
        git remote add chenhuacai-loongson https://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson.git
        git fetch --no-tags chenhuacai-loongson loongarch-next
        git checkout 85add6313234aab619257a11e682d40df69e2ed2
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=loongarch SHELL=/bin/bash drivers/clk/ 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/common/pci/pci.c: In function 'hl_pci_bars_unmap':
>> drivers/misc/habanalabs/common/pci/pci.c:78:16: warning: variable 'bar' set but not used [-Wunused-but-set-variable]
      78 |         int i, bar;
         |                ^~~


vim +/bar +78 drivers/misc/habanalabs/common/pci/pci.c

b6f897d75d651f drivers/misc/habanalabs/pci.c Tomer Tayar 2019-03-05  68  
df123c9dcde7f1 drivers/misc/habanalabs/pci.c Lee Jones   2020-07-01  69  /**
b6f897d75d651f drivers/misc/habanalabs/pci.c Tomer Tayar 2019-03-05  70   * hl_pci_bars_unmap() - Unmap PCI BARS.
b6f897d75d651f drivers/misc/habanalabs/pci.c Tomer Tayar 2019-03-05  71   * @hdev: Pointer to hl_device structure.
b6f897d75d651f drivers/misc/habanalabs/pci.c Tomer Tayar 2019-03-05  72   *
b6f897d75d651f drivers/misc/habanalabs/pci.c Tomer Tayar 2019-03-05  73   * Release all PCI BARs and unmap their virtual addresses.
b6f897d75d651f drivers/misc/habanalabs/pci.c Tomer Tayar 2019-03-05  74   */
b6f897d75d651f drivers/misc/habanalabs/pci.c Tomer Tayar 2019-03-05  75  static void hl_pci_bars_unmap(struct hl_device *hdev)
b6f897d75d651f drivers/misc/habanalabs/pci.c Tomer Tayar 2019-03-05  76  {
b6f897d75d651f drivers/misc/habanalabs/pci.c Tomer Tayar 2019-03-05  77  	struct pci_dev *pdev = hdev->pdev;
b6f897d75d651f drivers/misc/habanalabs/pci.c Tomer Tayar 2019-03-05 @78  	int i, bar;
b6f897d75d651f drivers/misc/habanalabs/pci.c Tomer Tayar 2019-03-05  79  
b6f897d75d651f drivers/misc/habanalabs/pci.c Tomer Tayar 2019-03-05  80  	for (i = 2 ; i >= 0 ; i--) {
b6f897d75d651f drivers/misc/habanalabs/pci.c Tomer Tayar 2019-03-05  81  		bar = i * 2; /* 64-bit BARs */
b6f897d75d651f drivers/misc/habanalabs/pci.c Tomer Tayar 2019-03-05  82  		iounmap(hdev->pcie_bar[bar]);
b6f897d75d651f drivers/misc/habanalabs/pci.c Tomer Tayar 2019-03-05  83  	}
b6f897d75d651f drivers/misc/habanalabs/pci.c Tomer Tayar 2019-03-05  84  
b6f897d75d651f drivers/misc/habanalabs/pci.c Tomer Tayar 2019-03-05  85  	pci_release_regions(pdev);
b6f897d75d651f drivers/misc/habanalabs/pci.c Tomer Tayar 2019-03-05  86  }
b6f897d75d651f drivers/misc/habanalabs/pci.c Tomer Tayar 2019-03-05  87  

:::::: The code at line 78 was first introduced by commit
:::::: b6f897d75d651f86a3988a602e767696f9e08de6 habanalabs: Move PCI code into common file

:::::: TO: Tomer Tayar <ttayar@...ana.ai>
:::::: CC: Oded Gabbay <oded.gabbay@...il.com>

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

View attachment "config" of type "text/plain" (316795 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ