Re: [PATCH 1/3] vfio/pci: Set VFIO_PCI_OFFSET_SHIFT to 48

From: kernel test robot

Date: Thu Feb 12 2026 - 17:47:56 EST


Hi Julian,

kernel test robot noticed the following build warnings:

[auto build test WARNING on 05f7e89ab9731565d8a62e3b5d1ec206485eeb0b]

url: https://github.com/intel-lab-lkp/linux/commits/Julian-Ruess/vfio-pci-Set-VFIO_PCI_OFFSET_SHIFT-to-48/20260212-220938
base: 05f7e89ab9731565d8a62e3b5d1ec206485eeb0b
patch link: https://lore.kernel.org/r/20260212-vfio_pci_ism-v1-1-333262ade074%40linux.ibm.com
patch subject: [PATCH 1/3] vfio/pci: Set VFIO_PCI_OFFSET_SHIFT to 48
config: riscv-randconfig-001-20260213 (https://download.01.org/0day-ci/archive/20260213/202602130659.urh1Dx2i-lkp@xxxxxxxxx/config)
compiler: riscv64-linux-gcc (GCC) 11.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260213/202602130659.urh1Dx2i-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/202602130659.urh1Dx2i-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

drivers/vfio/pci/nvgrace-gpu/main.c: In function 'addr_to_pgoff':
>> drivers/vfio/pci/nvgrace-gpu/main.c:196:22: warning: left shift count >= width of type [-Wshift-count-overflow]
196 | ((1U << (VFIO_PCI_OFFSET_SHIFT - PAGE_SHIFT)) - 1);
| ^~
drivers/vfio/pci/nvgrace-gpu/main.c: In function 'nvgrace_gpu_mmap':
drivers/vfio/pci/nvgrace-gpu/main.c:272:22: warning: left shift count >= width of type [-Wshift-count-overflow]
272 | ((1U << (VFIO_PCI_OFFSET_SHIFT - PAGE_SHIFT)) - 1);
| ^~


vim +196 drivers/vfio/pci/nvgrace-gpu/main.c

a23b10608d4203 Ankit Agrawal 2025-11-27 191
9db65489b87298 Ankit Agrawal 2025-11-27 192 static unsigned long addr_to_pgoff(struct vm_area_struct *vma,
9db65489b87298 Ankit Agrawal 2025-11-27 193 unsigned long addr)
9db65489b87298 Ankit Agrawal 2025-11-27 194 {
9db65489b87298 Ankit Agrawal 2025-11-27 195 u64 pgoff = vma->vm_pgoff &
9db65489b87298 Ankit Agrawal 2025-11-27 @196 ((1U << (VFIO_PCI_OFFSET_SHIFT - PAGE_SHIFT)) - 1);
9db65489b87298 Ankit Agrawal 2025-11-27 197
9db65489b87298 Ankit Agrawal 2025-11-27 198 return ((addr - vma->vm_start) >> PAGE_SHIFT) + pgoff;
9db65489b87298 Ankit Agrawal 2025-11-27 199 }
9db65489b87298 Ankit Agrawal 2025-11-27 200

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