tree:   https://gitlab.freedesktop.org/drm/misc/kernel.git drm-misc-next
head:   00ffe45ece80160aef446d74ded906352f21dd72
commit: 99bda20d6d4cac30ed6d357658d8bc328c3b27d9 [4/11] drm/gem: Introduce 
drm_gem_get_unmapped_area() fop
config: m68k-randconfig-r072-20251210 
(https://download.01.org/0day-ci/archive/20251210/[email protected]/config)
compiler: m68k-linux-gcc (GCC) 15.1.0
reproduce (this is a W=1 build): 
(https://download.01.org/0day-ci/archive/20251210/[email protected]/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 <[email protected]>
| Closes: 
https://lore.kernel.org/oe-kbuild-all/[email protected]/

All errors (new ones prefixed by >>):

   drivers/gpu/drm/drm_gem.c: In function 'drm_gem_get_unmapped_area':
>> drivers/gpu/drm/drm_gem.c:1261:24: error: implicit declaration of function 
>> 'mm_get_unmapped_area'; did you mean 'shmem_get_unmapped_area'? 
>> [-Wimplicit-function-declaration]
    1261 |                 return mm_get_unmapped_area(current->mm, filp, 
uaddr, len, 0,
         |                        ^~~~~~~~~~~~~~~~~~~~
         |                        shmem_get_unmapped_area


vim +1261 drivers/gpu/drm/drm_gem.c

  1229  
  1230  /**
  1231   * drm_gem_get_unmapped_area - get memory mapping region routine for 
GEM objects
  1232   * @filp: DRM file pointer
  1233   * @uaddr: User address hint
  1234   * @len: Mapping length
  1235   * @pgoff: Offset (in pages)
  1236   * @flags: Mapping flags
  1237   *
  1238   * If a driver supports GEM object mapping, before ending up in 
drm_gem_mmap(),
  1239   * mmap calls on the DRM file descriptor will first try to find a free 
linear
  1240   * address space large enough for a mapping. Since GEM objects are 
backed by
  1241   * shmem buffers, this should preferably be handled by the shmem 
virtual memory
  1242   * filesystem which can appropriately align addresses to huge page 
sizes when
  1243   * needed.
  1244   *
  1245   * Look up the GEM object based on the offset passed in (vma->vm_pgoff 
will
  1246   * contain the fake offset we created) and call 
shmem_get_unmapped_area() with
  1247   * the right file pointer.
  1248   *
  1249   * If a GEM object is not available at the given offset or if the 
caller is not
  1250   * granted access to it, fall back to mm_get_unmapped_area().
  1251   */
  1252  unsigned long drm_gem_get_unmapped_area(struct file *filp, unsigned 
long uaddr,
  1253                                          unsigned long len, unsigned 
long pgoff,
  1254                                          unsigned long flags)
  1255  {
  1256          struct drm_gem_object *obj;
  1257          unsigned long ret;
  1258  
  1259          obj = drm_gem_object_lookup_at_offset(filp, pgoff, len >> 
PAGE_SHIFT);
  1260          if (IS_ERR(obj) || !obj->filp || 
!obj->filp->f_op->get_unmapped_area)
> 1261                  return mm_get_unmapped_area(current->mm, filp, uaddr, 
> len, 0,
  1262                                              flags);
  1263  
  1264          ret = obj->filp->f_op->get_unmapped_area(obj->filp, uaddr, len, 
0,
  1265                                                   flags);
  1266  
  1267          drm_gem_object_put(obj);
  1268  
  1269          return ret;
  1270  }
  1271  EXPORT_SYMBOL_GPL(drm_gem_get_unmapped_area);
  1272  

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

Reply via email to