drivers/pci/tsm.c:31:12: warning: variable 'pci_tsm_devsec_count' set but not used

From: kernel test robot

Date: Sun Mar 29 2026 - 21:29:30 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 7aaa8047eafd0bd628065b15757d9b48c5f9c07d
commit: 3225f52cde56f46789a4972d3c54df8a4d75f022 PCI/TSM: Establish Secure Sessions and Link Encryption
date: 5 months ago
config: loongarch-randconfig-001-20260330 (https://download.01.org/0day-ci/archive/20260330/202603300952.ekhJSBmW-lkp@xxxxxxxxx/config)
compiler: clang version 23.0.0git (https://github.com/llvm/llvm-project 054e11d1a17e5ba88bb1a8ef32fad3346e80b186)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260330/202603300952.ekhJSBmW-lkp@xxxxxxxxx/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@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202603300952.ekhJSBmW-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

>> drivers/pci/tsm.c:31:12: warning: variable 'pci_tsm_devsec_count' set but not used [-Wunused-but-set-global]
31 | static int pci_tsm_devsec_count;
| ^
1 warning generated.


vim +/pci_tsm_devsec_count +31 drivers/pci/tsm.c

25
26 /*
27 * Count of TSMs registered that support physical link operations vs device
28 * security state management.
29 */
30 static int pci_tsm_link_count;
> 31 static int pci_tsm_devsec_count;
32

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki