Re: [PATCH v2] vfio/pci: Properly hide first-in-list PCIe extended capability

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, 23 Nov 2024 05:33:10 +0800
kernel test robot <lkp@xxxxxxxxx> wrote:

> Hi Avihai,
> 
> kernel test robot noticed the following build errors:
> 
> [auto build test ERROR on awilliam-vfio/next]
> [also build test ERROR on linus/master awilliam-vfio/for-linus v6.12 next-20241122]
> [If your patch is applied to the wrong git tree, kindly drop us a note.
> And when submitting patch, we suggest to use '--base' as documented in
> https://git-scm.com/docs/git-format-patch#_base_tree_information]
> 
> url:    https://github.com/intel-lab-lkp/linux/commits/Avihai-Horon/vfio-pci-Properly-hide-first-in-list-PCIe-extended-capability/20241121-220249
> base:   https://github.com/awilliam/linux-vfio.git next
> patch link:    https://lore.kernel.org/r/20241121140057.25157-1-avihaih%40nvidia.com
> patch subject: [PATCH v2] vfio/pci: Properly hide first-in-list PCIe extended capability
> config: s390-randconfig-r053-20241122 (https://download.01.org/0day-ci/archive/20241123/202411230727.abAsDI8W-lkp@xxxxxxxxx/config)
> compiler: clang version 16.0.6 (https://github.com/llvm/llvm-project 7cbf1a2591520c2491aa35339f227775f4d3adf6)
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241123/202411230727.abAsDI8W-lkp@xxxxxxxxx/reproduce)

...
> >> drivers/vfio/pci/vfio_pci_config.c:322:27: error: initializer element is not a compile-time constant  
>            [0 ... PCI_CAP_ID_MAX] = direct_ro_perms
>                                     ^~~~~~~~~~~~~~~
>    drivers/vfio/pci/vfio_pci_config.c:325:31: error: initializer element is not a compile-time constant
>            [0 ... PCI_EXT_CAP_ID_MAX] = direct_ro_perms
>                                         ^~~~~~~~~~~~~~~
>    12 warnings and 2 errors generated.
> 
> 
> vim +322 drivers/vfio/pci/vfio_pci_config.c
> 
>    319	
>    320	/* Default capability regions to read-only, no-virtualization */
>    321	static struct perm_bits cap_perms[PCI_CAP_ID_MAX + 1] = {
>  > 322		[0 ... PCI_CAP_ID_MAX] = direct_ro_perms  
>    323	};

I thought declaring direct_ro_perms as const was enough to resolve
this, it is with gcc but I didn't test clang.  Feel free to leave the
existing declarations alone if there's not an obvious fix.  Thanks,

Alex





[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux