* [linux-next:master 11904/14198] drivers/vfio/pci/vfio_pci_config.c:411:20: sparse: sparse: restricted pci_power_t degrades to integer
@ 2022-05-28 5:10 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2022-05-28 5:10 UTC (permalink / raw)
To: Abhishek Sahu; +Cc: kbuild-all, Linux Memory Management List, Alex Williamson
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: d3fde8ff50ab265749704bd7fbcf70d35235421f
commit: 2b2c651baf1c24414be4f76b152de80fae7c7786 [11904/14198] vfio/pci: Invalidate mmaps and block the access in D3hot power state
config: csky-randconfig-s032-20220524 (https://download.01.org/0day-ci/archive/20220528/202205281333.Mw1XyMXP-lkp@intel.com/config)
compiler: csky-linux-gcc (GCC) 11.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.4-14-g5a0004b5-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=2b2c651baf1c24414be4f76b152de80fae7c7786
git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
git fetch --no-tags linux-next master
git checkout 2b2c651baf1c24414be4f76b152de80fae7c7786
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=csky SHELL=/bin/bash drivers/vfio/pci/
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>
sparse warnings: (new ones prefixed by >>)
>> drivers/vfio/pci/vfio_pci_config.c:411:20: sparse: sparse: restricted pci_power_t degrades to integer
drivers/vfio/pci/vfio_pci_config.c:411:38: sparse: sparse: restricted pci_power_t degrades to integer
drivers/vfio/pci/vfio_pci_config.c:705:13: sparse: sparse: restricted pci_power_t degrades to integer
drivers/vfio/pci/vfio_pci_config.c:705:22: sparse: sparse: restricted pci_power_t degrades to integer
vim +411 drivers/vfio/pci/vfio_pci_config.c
397
398 /* Caller should hold memory_lock semaphore */
399 bool __vfio_pci_memory_enabled(struct vfio_pci_core_device *vdev)
400 {
401 struct pci_dev *pdev = vdev->pdev;
402 u16 cmd = le16_to_cpu(*(__le16 *)&vdev->vconfig[PCI_COMMAND]);
403
404 /*
405 * Memory region cannot be accessed if device power state is D3.
406 *
407 * SR-IOV VF memory enable is handled by the MSE bit in the
408 * PF SR-IOV capability, there's therefore no need to trigger
409 * faults based on the virtual value.
410 */
> 411 return pdev->current_state < PCI_D3hot &&
412 (pdev->no_command_memory || (cmd & PCI_COMMAND_MEMORY));
413 }
414
--
0-DAY CI Kernel Test Service
https://01.org/lkp
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-05-28 5:10 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-05-28 5:10 [linux-next:master 11904/14198] drivers/vfio/pci/vfio_pci_config.c:411:20: sparse: sparse: restricted pci_power_t degrades to integer kernel test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).