All of lore.kernel.org
 help / color / mirror / Atom feed
* drivers/vfio/pci/virtio/legacy_io.c:401:2: error: call to '__compiletime_assert_637' declared with 'error' attribute: BUILD_BUG_ON failed: !is_power_of_2(virtvdev->bar0_virtual_buf_size)
@ 2026-06-09 23:08 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-06-09 23:08 UTC (permalink / raw)
  To: oe-kbuild; +Cc: lkp

:::::: 
:::::: Manual check reason: "__compiletime_assert_NNN"
:::::: 

BCC: lkp@intel.com
CC: llvm@lists.linux.dev
CC: oe-kbuild-all@lists.linux.dev
CC: linux-kernel@vger.kernel.org
TO: "Thomas Weißschuh" <thomas.weissschuh@linutronix.de>
CC: Shuah Khan <skhan@linuxfoundation.org>
CC: Johannes Berg <johannes@sipsolutions.net>
CC: David Gow <davidgow@google.com>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   2d3090a8aeb596a26935db0955d46c9a5db5c6ce
commit: 031cdd3bc3f369553933c1b0f4cb18000162c8ff kunit: Enable PCI on UML without triggering WARN()
date:   9 months ago
:::::: branch date: 32 hours ago
:::::: commit date: 9 months ago
config: um-randconfig-001-20260610 (https://download.01.org/0day-ci/archive/20260610/202606100722.gkvfPSFZ-lkp@intel.com/config)
compiler: clang version 23.0.0git (https://github.com/llvm/llvm-project 7917772d7d61384696c61102c08c2ea158e610fa)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260610/202606100722.gkvfPSFZ-lkp@intel.com/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
| Fixes: 031cdd3bc3f3 ("kunit: Enable PCI on UML without triggering WARN()")
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/r/202606100722.gkvfPSFZ-lkp@intel.com/

All errors (new ones prefixed by >>):

   In file included from drivers/vfio/pci/virtio/legacy_io.c:9:
   In file included from include/linux/pci.h:38:
   In file included from include/linux/interrupt.h:11:
   In file included from include/linux/hardirq.h:11:
   In file included from arch/um/include/asm/hardirq.h:5:
   In file included from include/asm-generic/hardirq.h:17:
   In file included from include/linux/irq.h:20:
   In file included from include/linux/io.h:12:
   In file included from arch/um/include/asm/io.h:24:
   include/asm-generic/io.h:1175:55: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
    1175 |         return (port > MMIO_UPPER_LIMIT) ? NULL : PCI_IOBASE + port;
         |                                                   ~~~~~~~~~~ ^
>> drivers/vfio/pci/virtio/legacy_io.c:401:2: error: call to '__compiletime_assert_637' declared with 'error' attribute: BUILD_BUG_ON failed: !is_power_of_2(virtvdev->bar0_virtual_buf_size)
     401 |         BUILD_BUG_ON(!is_power_of_2(virtvdev->bar0_virtual_buf_size));
         |         ^
   include/linux/build_bug.h:50:2: note: expanded from macro 'BUILD_BUG_ON'
      50 |         BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
         |         ^
   include/linux/build_bug.h:39:37: note: expanded from macro 'BUILD_BUG_ON_MSG'
      39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
         |                                     ^
   include/linux/compiler_types.h:572:2: note: expanded from macro 'compiletime_assert'
     572 |         _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
         |         ^
   include/linux/compiler_types.h:560:2: note: expanded from macro '_compiletime_assert'
     560 |         __compiletime_assert(condition, msg, prefix, suffix)
         |         ^
   include/linux/compiler_types.h:553:4: note: expanded from macro '__compiletime_assert'
     553 |                         prefix ## suffix();                             \
         |                         ^
   <scratch space>:151:1: note: expanded from here
     151 | __compiletime_assert_637
         | ^
   1 warning and 1 error generated.


vim +401 drivers/vfio/pci/virtio/legacy_io.c

40bcdb12c68dbb Yishai Hadas 2024-11-13  389  
40bcdb12c68dbb Yishai Hadas 2024-11-13  390  int virtiovf_init_legacy_io(struct virtiovf_pci_core_device *virtvdev)
40bcdb12c68dbb Yishai Hadas 2024-11-13  391  {
40bcdb12c68dbb Yishai Hadas 2024-11-13  392  	struct pci_dev *pdev = virtvdev->core_device.pdev;
40bcdb12c68dbb Yishai Hadas 2024-11-13  393  	int ret;
40bcdb12c68dbb Yishai Hadas 2024-11-13  394  
40bcdb12c68dbb Yishai Hadas 2024-11-13  395  	ret = virtiovf_read_notify_info(virtvdev);
40bcdb12c68dbb Yishai Hadas 2024-11-13  396  	if (ret)
40bcdb12c68dbb Yishai Hadas 2024-11-13  397  		return ret;
40bcdb12c68dbb Yishai Hadas 2024-11-13  398  
40bcdb12c68dbb Yishai Hadas 2024-11-13  399  	virtvdev->bar0_virtual_buf_size = VIRTIO_PCI_CONFIG_OFF(true) +
40bcdb12c68dbb Yishai Hadas 2024-11-13  400  				virtiovf_get_device_config_size(pdev->device);
40bcdb12c68dbb Yishai Hadas 2024-11-13 @401  	BUILD_BUG_ON(!is_power_of_2(virtvdev->bar0_virtual_buf_size));
40bcdb12c68dbb Yishai Hadas 2024-11-13  402  	virtvdev->bar0_virtual_buf = kzalloc(virtvdev->bar0_virtual_buf_size,
40bcdb12c68dbb Yishai Hadas 2024-11-13  403  					     GFP_KERNEL);
40bcdb12c68dbb Yishai Hadas 2024-11-13  404  	if (!virtvdev->bar0_virtual_buf)
40bcdb12c68dbb Yishai Hadas 2024-11-13  405  		return -ENOMEM;
40bcdb12c68dbb Yishai Hadas 2024-11-13  406  	mutex_init(&virtvdev->bar_mutex);
40bcdb12c68dbb Yishai Hadas 2024-11-13  407  	return 0;
40bcdb12c68dbb Yishai Hadas 2024-11-13  408  }
40bcdb12c68dbb Yishai Hadas 2024-11-13  409  

:::::: The code at line 401 was first introduced by commit
:::::: 40bcdb12c68dbb6f457deb0adab5008ef61c13d7 vfio/virtio: Enable live migration once VIRTIO_PCI was configured

:::::: TO: Yishai Hadas <yishaih@nvidia.com>
:::::: CC: Alex Williamson <alex.williamson@redhat.com>

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-06-09 23:09 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-09 23:08 drivers/vfio/pci/virtio/legacy_io.c:401:2: error: call to '__compiletime_assert_637' declared with 'error' attribute: BUILD_BUG_ON failed: !is_power_of_2(virtvdev->bar0_virtual_buf_size) kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.