* [freescale-fslc:pr/639 4345/24603] drivers/vfio/fsl-mc/vfio_fsl_mc.c:360:22: error: incompatible types when assigning to type 'pgprot_t {aka struct pgprot}' from type 'int'
@ 2023-09-01 11:30 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2023-09-01 11:30 UTC (permalink / raw)
To: Otavio Salvador; +Cc: oe-kbuild-all
tree: https://github.com/Freescale/linux-fslc pr/639
head: 857fbf7cebaba3b1ffccc558deee1d13ac0e11d7
commit: 053c79cd5d897b39d3659d46370e3b8917f92806 [4345/24603] vfio/fsl-mc: Map the VFIO region according to the flags received from the mc firmware
config: x86_64-buildonly-randconfig-004-20230831 (https://download.01.org/0day-ci/archive/20230901/202309011903.aDagWciI-lkp@intel.com/config)
compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20230901/202309011903.aDagWciI-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
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202309011903.aDagWciI-lkp@intel.com/
All errors (new ones prefixed by >>):
drivers/vfio/fsl-mc/vfio_fsl_mc.c: In function 'vfio_fsl_mc_mmap_mmio':
drivers/vfio/fsl-mc/vfio_fsl_mc.c:360:24: error: implicit declaration of function 'pgprot_cached_ns'; did you mean 'pgprot_noncached'? [-Werror=implicit-function-declaration]
vma->vm_page_prot = pgprot_cached_ns(vma->vm_page_prot);
^~~~~~~~~~~~~~~~
pgprot_noncached
>> drivers/vfio/fsl-mc/vfio_fsl_mc.c:360:22: error: incompatible types when assigning to type 'pgprot_t {aka struct pgprot}' from type 'int'
vma->vm_page_prot = pgprot_cached_ns(vma->vm_page_prot);
^
cc1: some warnings being treated as errors
vim +360 drivers/vfio/fsl-mc/vfio_fsl_mc.c
344
345 static int vfio_fsl_mc_mmap_mmio(struct vfio_fsl_mc_region region,
346 struct vm_area_struct *vma)
347 {
348 u64 size = vma->vm_end - vma->vm_start;
349 u64 pgoff, base;
350
351 pgoff = vma->vm_pgoff &
352 ((1U << (VFIO_FSL_MC_OFFSET_SHIFT - PAGE_SHIFT)) - 1);
353 base = pgoff << PAGE_SHIFT;
354
355 if (region.size < PAGE_SIZE || base + size > region.size)
356 return -EINVAL;
357
358 if (region.type & FSL_MC_REGION_CACHEABLE) {
359 if (!(region.type & FSL_MC_REGION_SHAREABLE))
> 360 vma->vm_page_prot = pgprot_cached_ns(vma->vm_page_prot);
361 } else
362 vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
363
364 vma->vm_pgoff = (region.addr >> PAGE_SHIFT) + pgoff;
365
366 return remap_pfn_range(vma, vma->vm_start, vma->vm_pgoff,
367 size, vma->vm_page_prot);
368 }
369
--
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:[~2023-09-01 11:31 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-01 11:30 [freescale-fslc:pr/639 4345/24603] drivers/vfio/fsl-mc/vfio_fsl_mc.c:360:22: error: incompatible types when assigning to type 'pgprot_t {aka struct pgprot}' from type 'int' 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.