All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Otavio Salvador <otavio@ossystems.com.br>
Cc: oe-kbuild-all@lists.linux.dev
Subject: [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'
Date: Fri, 1 Sep 2023 19:30:52 +0800	[thread overview]
Message-ID: <202309011903.aDagWciI-lkp@intel.com> (raw)

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

                 reply	other threads:[~2023-09-01 11:31 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202309011903.aDagWciI-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=otavio@ossystems.com.br \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.